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

From |
Rune Nielsen <nielsenrune@me.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: prediction of model using svy-commands |

Date |
Fri, 09 Oct 2009 20:33:31 +0200 |

Michael,

Grateful if anyone could answer this. Best wishes Rune Den 8. okt. 2009 kl. 19.31 skrev Michael I. Lichter:

Rune,I was hoping somebody with Stata 11.0 would answer you. That notbeing the case ...1. On J Scott Long's SPost web site, he says "Stata 11 news: Thepackage spost9_ado does not work with factor variables. We haveupdated prchange (v 1.8.1) and countfit (0.8.1) to work with Stata11. We are still working with StataCorp to make SPost work withmlogit under Stata 11. In the short run, the easiest thing is runmlogit under version control. So instead of: "mlogit y a b c" use"version 10.1: mlogit y a b c" Then the SPost commands should workfine. If you encounter other problems using Stata 11, let us know.10Sep09." (http://www.indiana.edu/~jslsoc/spost.htm)2. I presume you were aware of this and that's why you did not usefactor variables directly in -prvalue-. Nevertheless, -prvalue- iscomplaining about factor variables. Have you tried creating dummyvariables and using those instead? You can use, e.g., -tabGOLDogrestr, gen(GOLD)- to do this. You don't have to try it withthe whole model ... unless it works with a partial model.3. You could also try what he suggests for mlogit: "version 10.1:svy: regress y a b c".4. If I knew how to calculate confidence intervals for predictions Iwould tell you. Perhaps somebody else will chime in. Short of that,I can tell you that prvalue.ado calls _peciml.ado to find the upperand lower bounds, and you can see it with -viewsource _peciml.ado-.Michael Rune Nielsen wrote:Hi, I'm using stata 11.0 on a Mac with os 10.6. I'm using spost 9.After setting the survey parameters I try running this regression:/svyset [pweight=vekt_alle], strata(kilde)//svy: regress log_kost i.GOLDogrestr i.kjonn_omv i.smoke_binalder2006 i.utdannelse_omv if har364dg==1 & n474==100/when I try using prvalue:/prvalue, x(_IGOLDogres_2=0 _IGOLDogres_3=0 _IGOLDogres_4=0_Ikjonn_omv_1=0.415 _Ismoke_bin_1=0.559 _Iutdannels_1=0.479_Iutdannels_2=0.3047 alder2006=61.868) /I get this error: /factor variables and time-series operators not allowed/However, if I try doing this without the svy-prefix, spost managesto predict nicely. I'm not that skilled, so perhaps there is somekind of obvious error in my commands?Best wishes, Rune Den 8. okt. 2009 kl. 09.42 skrev Michael I. Lichter:What version of Stata are you using, what version of spost, whatcommand line are you using, and what do you mean by "notpossible"? In Stata 10.1, using spost9, I just ran -svy: regdepvar age gender- followed by -prvalue, x(age=50)- and got asensible answer from -prvalue- (I did not, however, verify thatthe answer was correct).Michael Rune Nielsen wrote:Dear statalist-members,I'm running a model (multiple linear regression) using the /svy/-prefix to adjust for a stratified sample. The outcome is log-transformed due to large left-skewing.I would like to do some predictions using prvalue from the spost-package. However, this is not possible when I've used the survey-version of/ regress/. Does anybody know a simple solution tothis? I've already tried running the model without svy, butspecifying pweight and vce(cluster clustervar), but then I don'tget reliable confidence intervals.Grateful for any answers (in simple language for a non-statician) Best wishes, Rune Nielsen --- Rune Nielsen, MD, research fellow Institute of Medicine, Bergen, Norway--Michael I. Lichter, Ph.D. <mlichter@buffalo.edu <mailto:mlichter@buffalo.edu>>Research Assistant Professor & NRSA Fellow UB Department of Family Medicine / Primary Care Research Institute UB Clinical Center, 462 Grider Street, Buffalo, NY 14215 Office: CC 126 / Phone: 716-898-4751 / FAX: 716-898-3536 * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/-- Michael I. Lichter, Ph.D. <mlichter@buffalo.edu> Research Assistant Professor & NRSA Fellow UB Department of Family Medicine / Primary Care Research Institute UB Clinical Center, 462 Grider Street, Buffalo, NY 14215 Office: CC 126 / Phone: 716-898-4751 / FAX: 716-898-3536 * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/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/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: prediction of model using svy-commands***From:*"Michael I. Lichter" <mlichter@buffalo.edu>

**References**:**st: prediction of model using svy-commands***From:*Rune Nielsen <nielsenrune@me.com>

**Re: st: prediction of model using svy-commands***From:*"Michael I. Lichter" <MLichter@Buffalo.EDU>

**Re: st: prediction of model using svy-commands***From:*Rune Nielsen <nielsenrune@me.com>

**Re: st: prediction of model using svy-commands***From:*"Michael I. Lichter" <mlichter@buffalo.edu>

- Prev by Date:
**st: RE: AW: RE: AW: finding date occurrences within a specified range, searching in multiple variables** - Next by Date:
**st: Upcoming NetCourses** - Previous by thread:
**Re: st: prediction of model using svy-commands** - Next by thread:
**Re: st: prediction of model using svy-commands** - Index(es):

© Copyright 1996–2016 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |