Hi all,
I'm trying to generate a predicted outcome holding a categorical variable (x2) constant.
I'm doing the following:
What I can't figure out is how to then store that result in a variable as the -predict- command does.
Is this doable? What am I doing wrong?
Thanks in advance.
I'm trying to generate a predicted outcome holding a categorical variable (x2) constant.
I'm doing the following:
Code:
reg y i.x1 i.x2 margins i.x1, at(x2==1) predict(xb)
Is this doable? What am I doing wrong?
Thanks in advance.
Comment