Thanks Maarten. I tried -nlcom- and it works. But it is still a bit
weird. I am not sure but I think it is OK. The Manuals explain
problems with confidence testing using -nlcom-, and so with the p-values
and confidence intervals.
I tested this by calculating ORs, CIs, P-values for a single
coefficient. I found that when I wrote:
nlcom exp(_b[var1])
I got the correct answer (same as in svrmodel) for the OR, but not for
the t, p-value and CIs.
And when I just asked for the coefficient:
nlcom _b[var1]
, I got the correct t and p-value. I could then manually calculate the
correct CIs, by inserting the given value in:
display exp(x.xxx)
This is a bit tedious but seems to work. So it must be taking into
account the survey design, replicate weights etc in svrmodel.
So I guess I can assume it works when I do:
nlcom exp(_b[var1] + _b[var2])
nlcom _b[var1] + _b[var2]
So far the results seem to look sensible.
Cheers
David
David P Thomas
Postdoctoral Research Fellow (Mondays - Thursdays)
Menzies School of Health Research, PO Box 41096, Casuarina NT 0811
ph: 08 89227610
fax: 08 89275187
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Maarten buis
Sent: Thursday, June 08, 2006 3:35 PM
To: [email protected]
Subject: Re: st: lincom post-estimation using svr commands in Stata8
--- David Thomas <[email protected]> wrote:
> I am using data from the Australian Bureau of Statistics with
> replicate weights. I have built a logistic regression model which
> includes a couple of interaction terms <snip>. I would like to
> calculate ORs with confidence intervals for the different age groups
> vs reference category for the variables with significant
interactions.
> I tried using -lincom- <snip> But was left with the error message:
> unrecognized command: svysvrmodel <snip> I could calculate the ORs
> manually, but would have trouble with calculating the CIs that way.
You could try -nlcom- like the example below:
*------------begin example-------------
sysuse auto, clear
recode rep78 1=3 2=3
xi: logit foreign i.rep78*mpg, or
nlcom (mpg4: exp(_b[mpg] + _b[_IrepXmpg_4])) /*
*/ (mpg5: exp(_b[mpg] + _b[_IrepXmpg_5]))
*------------end example----------------
HTH,
Maarten
-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands
visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z214
+31 20 5986715
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
Send instant messages to your online friends
http://uk.messenger.yahoo.com
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/