0
votes

I am getting an error when I put in these two codes. I am using Stata 12.

I have recoded CHILDREN already as a dummy variable called CHILDRENDUMMY and the variable is located in the list of variables. I am trying to run two margins commands, but I am getting the error message

vsquish CHILDRENDUMMY not found in list of covariates

Can someone please help me?

First Code

margins, dydx (DISAGMT) at (CHILDRENDUMMY= (0 1)) vsquish

Second Code

margins, at dydx (DISAGMT= (0) CHILDRENDUMMY= (0 1)) vsquish
1

1 Answers

0
votes

See http://www.stata.com/help.cgi?margins for current syntax.

You should see that you have confused margins on what you think is a covariate. For example, vsquish is an option, not a covariate. How did that happen?

The second syntax is not what you want, as at() needs an argument. That's like saying "meet me at" without time or place.

You don't say what you want to do, but my guess is more like

margins, dydx(DISAGMT) at(CHILDRENDUMMY=(0 1)) vsquish 

Note that option names and their arguments should not be separated by spaces: the form is foobar(frog) not foobar (frog).

For future questions on Stata, knowing how to spell the software name is worth knowing: http://www.statalist.org/forums/help#spelling

For future questions, note the standard of complete self-contained examples that can be run by anyone with the software: https://stackoverflow.com/help/mcve