Dear Statlists,

My aim is simply to multiply the transpose of ret_m with W_L (both are Stata's variables). However, after I stored the result E into Stata memory, the values of E are completely missing. Is there anyone who might be able to give me some ideas? I will really appreciate that help!!!

Here are the Mata codes:

Data is here:

My aim is simply to multiply the transpose of ret_m with W_L (both are Stata's variables). However, after I stored the result E into Stata memory, the values of E are completely missing. Is there anyone who might be able to give me some ideas? I will really appreciate that help!!!

Here are the Mata codes:

Code:

mata C = st_data(. , ("ret_m")) D = st_data(. , ("W_L)")) E = C' * D st_addvar("double","E1") end

Code:

input float(ret_m W_L) -.005025199 0 -.08080798 1 -.6153846 5 -.05714292 -2 -.24242426 0 .05999997 1 -.3773585 0 -.21212125 2 2.357986e-08 -2 -.3846154 0 -.06250003 0 -.06666666 0 0 0 -.013237344 0 -.010204043 1 .0721649 0 -.003974303 6 .03921594 9 .05660392 0 .016154103 -2 -.03571403 0 -.07407409 0 .03748569 2 -.0392157 0 -.071428575 0 .05268749 0 .02127646 0 .08333311 0

## Comment