You are not logged in. You can browse but not post. Login or Register by clicking 'Login or Register' at the top-right of this page. For more information on Statalist, see the FAQ.
you don't show us your code but the error message implies that the variable you name after the word "margins" in your command line is neither a factor variable nor an interaction - and those two are what -margins- deals with; if you want more specific help you need to post, within CODE blocks (see the FAQ if you don't know what this means), the command line that preceded the -margins- command as well as the -margins- command; please give us, as the FAQ advises, exactly, what you typed
Thanks for responding. Here are the details: I tried two estimation commands, xi: svy:mlogit and svy:mlogit. In both cases the DV represents three levels of safe storage among gun-owning households. All the IVs are categorical; some are binary, e.g. sex, marital status (married/unmarried), veteran (yes/no), and children in home (yes/no; other are multi-level, e.g. education and income levels, age group and race/ethnic group. These were all entered preceded by i. The results were as previously estimated, and I got clear results from another post-estimation command, mlogitgof, table. Here's how I wrote the margins command: margins sex, predict(outcome(1)). Regardless of which variable I specified or how I specified it, the error message was the same: "factor 'sex' not found in list of covariates." Even when I recoded these factors as dummy variables and replaced the originals in the model, the same error message (322) appeared. The Stata Reference Manual says I should be able to use margins with mlogit and survey data, but clearly I am doing something wrong. Thanks again for responding. I hope this additional info will help you suggest what I should do.
[svy/mlogit[/margins] Changing syntax for interaction variables to # in fvvarlist from * in xi: documentation worked for all but one binary variable (veteran), which produced return code 322, an "unexpected result" from the estimation command. I'm using Stata 13 (with current updates) on data from BRFSS 2004. Thanks again. I hope I'm now posting correctly.
Comment