Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Thread-Index: Ac2zpwBrnny9GG5FQQ6Vz7stZfQOCw==


From   Richard Goldstein <[email protected]>
To   [email protected]
Subject   Re: st: Thread-Index: Ac2zpwBrnny9GG5FQQ6Vz7stZfQOCw==
Date   Fri, 26 Oct 2012 14:43:52 -0400

the reason for the error message is that you need to include a comma
prior to the "xb": predict xb1, xb

Rich

On 10/26/12 2:25 PM, Amal Khanolkar wrote:
> Hi,
> 
> I tried running the lroc command following my logistic regression as follows:
> 
> xi: logistic moth_wtgain_under i.mom_race2 age_mom sexx if parity!=. & gestwk_cat!=. & cigs_befx!=. & cigs_1stx!=. & cigs_2ndx!=. & cigs_3rdx!=. & gestdb!=. & gesthy!=. & ht_cm!=. & plural==1 & edu_mom!=. & marriedxx!=.
> lroc, nograph
> predict xb1 xb
> 
> Based on an example I saw online in the Stata manual, I use 'predict' as above to produce a linear predictor model. I do the same for another 4 models, i.e.
> 
> logistic model 2
> lroc, nograph 
> predict xb2 xb
> 
> logistic model 3
> lroc, nograph 
> predict xb3 xb
> 
> ..... and so on. 
> 
> All four logistic models have the same outcomes, but different explanatory variables. My aim is use the roccomp command as follows to be able to compare all 4 models easily:
> 
> roccomp hon xb1 xb2 xb3 xb4, graph summary
> 
> 
> 1. I get an error message after running the first 'predict xb1 xb' above.  ('too many variable specified'). I didn't think this would be a problem. Is there any way I can get around this, or do I have to r educe the number of covariates specified in my logistic model?
> 
> 2. Or is there a better approach?
> 
> Thanks!
> 
> /Amal.
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index