Hello,
We are running a model with a continuous variable Y and two binary endonegous X variables X1 and X2 which we are instrumenting with Z1 and Z2. X1 and X2 are also dummy variables. We are using the following code for our analysis:
cmp (Y= X1 X2 `Other Xvars') (X1 = Z1 Z2 `Other Xvars') (X2 = Z1 Z2 `Other Xvars'), indicators($cmp_cont $cmp_probit $cmp_probit)
We want to predict the expected outcome Y (it is a continuous variable) when X1=0 and when X1=1 (X1 is a dummy). Eg. Y is a continuous index for material deprivation and X1 is a dummy that takes value 0 if drop-out from high school, 0 otherwise. We want to calculate the expected value of material deprivaton for those who drop-out and the corresponding one for those who do not.
We have used the "condition" option after predict, but we obtain an error
predict out0, e eq(Y) cond(pr, eq(X1))
In "pr" the default values are (0,.)
The error is "pr ambigous abbreviation"
We have tried using (0,.) but the error is the same.
We would highly appreciate if someone could guide us on how we can get conditional in our context, following the CMP command. Thanks a lot in advance!
Ana I. Moro
We are running a model with a continuous variable Y and two binary endonegous X variables X1 and X2 which we are instrumenting with Z1 and Z2. X1 and X2 are also dummy variables. We are using the following code for our analysis:
cmp (Y= X1 X2 `Other Xvars') (X1 = Z1 Z2 `Other Xvars') (X2 = Z1 Z2 `Other Xvars'), indicators($cmp_cont $cmp_probit $cmp_probit)
We want to predict the expected outcome Y (it is a continuous variable) when X1=0 and when X1=1 (X1 is a dummy). Eg. Y is a continuous index for material deprivation and X1 is a dummy that takes value 0 if drop-out from high school, 0 otherwise. We want to calculate the expected value of material deprivaton for those who drop-out and the corresponding one for those who do not.
We have used the "condition" option after predict, but we obtain an error
predict out0, e eq(Y) cond(pr, eq(X1))
In "pr" the default values are (0,.)
The error is "pr ambigous abbreviation"
We have tried using (0,.) but the error is the same.
We would highly appreciate if someone could guide us on how we can get conditional in our context, following the CMP command. Thanks a lot in advance!
Ana I. Moro
Comment