Hi!!
I am trying to run this code:
gen v_eth= `ethnici1'*b[1,1] + edumo2*b[2,1] + edumo3*b[3,1] + edufa2*b[4,1] + edufa*b[5,1] + female*b[6,1] + b[7,1],
where `ethnici1' is a local containing the mean of a variable ethnici1 from an OLS regression ==> regress ln_PERCAPITA ethnici1 edumo2 edumo3 edufa2 edufa3 female [iw=FEX_C] if FG==1)
b is a column vector with 7 rows
I want to multiply the original values of the variables edumo2, edumo3, edufa2, edufa3 and female with their corresponding estimated cefficients of the regression containes in b
I get this error,
gen v_eth= `ethnici1'*b[1,1] + edumo2*b[2,1] + edumo3*b[3,1] + edufa2*b[4,1] + edufa3*b[5,1] + female*b[6,1] + b[7,1]
*b invalid name
Thanks for your help!
I am trying to run this code:
gen v_eth= `ethnici1'*b[1,1] + edumo2*b[2,1] + edumo3*b[3,1] + edufa2*b[4,1] + edufa*b[5,1] + female*b[6,1] + b[7,1],
where `ethnici1' is a local containing the mean of a variable ethnici1 from an OLS regression ==> regress ln_PERCAPITA ethnici1 edumo2 edumo3 edufa2 edufa3 female [iw=FEX_C] if FG==1)
b is a column vector with 7 rows
I want to multiply the original values of the variables edumo2, edumo3, edufa2, edufa3 and female with their corresponding estimated cefficients of the regression containes in b
I get this error,
gen v_eth= `ethnici1'*b[1,1] + edumo2*b[2,1] + edumo3*b[3,1] + edufa2*b[4,1] + edufa3*b[5,1] + female*b[6,1] + b[7,1]
*b invalid name
Thanks for your help!


Comment