Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Why am I getting this error: "V1: string variables may not be used as factor variables"


From   Nick Cox <njcoxstata@gmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Why am I getting this error: "V1: string variables may not be used as factor variables"
Date   Mon, 8 Apr 2013 12:16:00 +0100

Which command is complaining? Perhaps -margins (*)- doesn't do what
you expect, which is presumably to focus on the model, not to the
dataset.

Nick
njcoxstata@gmail.com


On 8 April 2013 12:06, Peter Wielhouwer <peter.wielhouwer@wmich.edu> wrote:

> I'm running a multivariate mlogit on a subset of a dataset (the subset
> N=945, and there are not very much missing data), and generating dy/dx
> and margins for all of my covariates, many of which I've included as
> indicator variables. When I run this from my do-file, after the first
> set of dy/dx output I get the red error message:
> "V1:  string variables may not be used as factor variables r(109);"
> None of my covariates are string variables, however. Any thoughts?
>
> From my do-file:
> mlogit mvote i.pid7 b4.ideolresp_1 b1.vote12full b8.educ male age
> b4.newsfollow  b5.marital bornagain2 anychildren childschoo2 c.income
> b1.grpidmet3 i.bornus i.conditions if pid3B==1, baseoutcome(5)
>     forvalues i = 1/5 {
>         margins, dydx(*) predict(outcome(`i'))
>         margins (*), predict(outcome(`i'))
>     }
>
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index