Statalist


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

Re: Corrected repost: Two general questions about xt commmands and re / fe


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: Corrected repost: Two general questions about xt commmands and re / fe
Date   Sat, 11 Apr 2009 23:48:37 +0200

<>
Just try it out for the first question:

***
clear*

inp obs_rrt T unit
0 5 4
3 6 4
2 7 4
4 8 4
3 9 4
1 10 4
3 2 3
1 3 3
1 4 3
1 5 3
0 6 3
1 7 3
end

xtset unit T, monthly

//Does not converge
//xtpoisson obs_rrt, re

//Does converge, different model
xtpoisson obs_rrt T, re
***

The first version does not converge (thus commented out), the second one does. -xtset- only serves to tell Stata that it has panel data in memory, so you have to specify covariates separately...


HTH
Martin
_______________________
----- Original Message ----- From: "Mark Marshall" <mrmarsh@woosh.co.nz>
To: <statalist@hsphsun2.harvard.edu>
Sent: Saturday, April 11, 2009 11:37 PM
Subject: Corrected repost: Two general questions about xt commmands and re / fe


Hi

I am using Stata 9.2 on windows.

I am fitting an xtpoisson model to unbalanced panel data (n counts of death over T months), with a grouping variable called unit that signifies the ICU
where the data come from. E.g

obs_rrt T unit
0 5 4
3 6 4
2 7 4
4 8 4
3 9 4
1 10 4
3 2 3
1 3 3
1 4 3
1 5 3
0 6 3
1 7 3

Question 1.

When I specify

tis T

my understanding is that this does not explicitly model T in the model (I
want to model the death rate in relationship to time, amongst other things),
and I would have to specify T in the command line to do this. Is this
correct?

Question 2.

I would like to specify T and some other exposure covariates as fixed
effects, and unit as a random effect in the model. If I specify all of these
as independent variables in the command line, and then use the re option,
how can I tell which is modelled as fixed, and which is modelled as random?

Thanks,

Mark Marshall









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



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