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_bin alder2006 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 timeseries operators not allowed
However, if I try doing this without the svyprefix, spost manages to predict nicely. I'm not that skilled, so perhaps there is some kind 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, what command line are you using, and what do you mean by "not possible"? In Stata 10.1, using spost9, I just ran svy: reg depvar age gender followed by prvalue, x(age=50) and got a sensible answer from prvalue (I did not, however, verify that the answer was correct). Michael Rune Nielsen wrote: Dear statalistmembers,
I'm running a model (multiple linear regression) using the /svy/prefix to adjust for a stratified sample. The outcome is logtransformed due to large leftskewing.
I would like to do some predictions using prvalue from the spostpackage. However, this is not possible when I've used the surveyversion of/ regress/. Does anybody know a simple solution to this? I've already tried running the model without svy, but specifying pweight and vce(cluster clustervar), but then I don't get reliable confidence intervals.
Grateful for any answers (in simple language for a nonstatician)
Best wishes,
Rune Nielsen

Rune Nielsen, MD, research fellow
Institute of Medicine, Bergen, Norway
 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: 7168984751 / FAX: 7168983536 * * 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/
