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 on April 23, and its replacement, statalist.org is already up and running.


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

RE: st: Thread-Index: Ac2zpwBrnny9GG5FQQ6Vz7stZfQOCw==


From   Amal Khanolkar <Amal.Khanolkar@ki.se>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Thread-Index: Ac2zpwBrnny9GG5FQQ6Vz7stZfQOCw==
Date   Fri, 26 Oct 2012 19:50:31 +0000

Thanks for pointing out the comma!

It seems to be working now, but Stata takes a very long time to produce results after entering the 'roccomp' command. In fact I'm not getting any results at all - I see that Stata is still running but it's not producing anything. Does the roccomp command take a while to run? Or maybe it doesn't run too well with models with too many categorical covariates?

I ran the below (after the logistic regression models shown below in my first email)

roccomp hon xb1 xb2 xb3 xb4, graph summary

Thanks,

/Amal.
________________________________________
From: owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu] on behalf of Richard Goldstein [richgold@ix.netcom.com]
Sent: 26 October 2012 20:43
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: Thread-Index: Ac2zpwBrnny9GG5FQQ6Vz7stZfQOCw==

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/

*
*   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