Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

RE: st: RE: Xtpoisson and quadchk


From   Garry Anderson <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: Xtpoisson and quadchk
Date   Tue, 22 Mar 2011 19:42:01 +1100

Thank you Jesper and Anees for your suggestions.

The service variable is a continuous variable with a range of 45 to 44882. This seems usual for an exposure variable. Note that the datafile is the example in the Stata manual
use http://www.stata-press.com/data/r11/ships,clear

. codebook service

--------------------------------------------------------------------------------------------------
service                                                                                (unlabeled)
--------------------------------------------------------------------------------------------------

                  type:  numeric (float)

                 range:  [45,44882]                   units:  1
         unique values:  33                       missing .:  6/40

                  mean:      4811
              std. dev:   9644.17

           percentiles:        10%       25%       50%       75%       90%
                               127       349      1095      2244     17176

. sum service

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
     service |        34        4811    9644.166         45      44882


Best wishes , Garry


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Muhammad Anees
Sent: Tuesday, 22 March 2011 7:27 PM
To: [email protected]
Subject: Re: st: RE: Xtpoisson and quadchk

I would further the idea of jesper, if your offset or exposure variable is categorical, you might have received the error. Check if your service is not in (0,1) form.
best
Anees

On 22 March 2011 12:45, Jesper Lindhardsen <[email protected]> wrote:
> Hi Garry,
>
> My guess is that it has something to do with how you defined/created 
> your 'service' variable as it is indeed your offset if I understand 
> your model correctly (exposure(service) = offset(ln(service)) - see 
> help -xtpoisson-).
> HTH,
> Jesper
>
>
> Jesper Lindhardsen
> MD, PhD candidate
> Department of Cardiovascular Research
> Copenhagen University Hospital, Gentofte Denmark
>
>
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Garry
> Anderson
> Sent: 22 March 2011 08:31
> To: [email protected]
> Subject: st: Xtpoisson and quadchk
>
> Dear Statalisters,
>
> The message after the -quadchk- command seems a little strange.
> The message is
>
> Refitting model intpoints() =  8
> factor variables and time-series operators not allowed
> in option offset()
> error refitting model
> r(101);
>
> I do not think I am using a factor variable nor a time-series operator,
> and I am not using the offset option.
>
> Any ideas as to the meaning of this message would be appreciated.
>
>
>
>
> . use http://www.stata-press.com/data/r11/ships,clear
>
> . xtpoisson accident op_75_79 co_65_69 co_70_74 co_75_79,
> exposure(service) irr normal
>
> Fitting comparison Poisson model:
>
> Iteration 0:   log likelihood = -147.37993
> Iteration 1:   log likelihood = -80.372714
> Iteration 2:   log likelihood = -80.116093
> Iteration 3:   log likelihood = -80.115916
> Iteration 4:   log likelihood = -80.115916
>
> Fitting full model:
>
> tau =  0.0     log likelihood = -80.115916
> tau =  0.1     log likelihood = -76.060792
> tau =  0.2     log likelihood = -77.535639
>
> Iteration 0:   log likelihood = -76.360754
> Iteration 1:   log likelihood = -75.585665
> Iteration 2:   log likelihood = -74.788481
> Iteration 3:   log likelihood = -74.780993
> Iteration 4:   log likelihood = -74.780982
> Iteration 5:   log likelihood = -74.780982
>
> Random-effects Poisson regression               Number of obs      =
> 34
> Group variable: ship                            Number of groups   =
> 5
>
> Random effects u_i ~ Gaussian                   Obs per group: min =
> 6
>                                                               avg =
> 6.8
>                                                               max =
> 7
>
>                                                Wald chi2(4)       =
> 50.95
> Log likelihood  = -74.780982                    Prob > chi2        =
> 0.0000
>
> ------------------------------------------------------------------------
> ------
>    accident |        IRR   Std. Err.      z    P>|z|     [95% Conf.
> Interval]
> -------------+----------------------------------------------------------
> ------
>    op_75_79 |   1.466677   .1734403     3.24   0.001     1.163259
> 1.849236
>    co_65_69 |   2.032604   .3040933     4.74   0.000     1.516025
> 2.725205
>    co_70_74 |   2.357045   .3998397     5.05   0.000     1.690338
> 3.286717
>    co_75_79 |   1.646935   .3820235     2.15   0.031     1.045278
> 2.594905
>     service | (exposure)
> -------------+----------------------------------------------------------
> ------
>    /lnsig2u |  -2.351868   .8586262    -2.74   0.006    -4.034745
> -.6689918
> -------------+----------------------------------------------------------
> ------
>     sigma_u |   .3085306   .1324562                      .1330045
> .7156988
> ------------------------------------------------------------------------
> ------
> Likelihood-ratio test of sigma_u=0: chibar2(01) =    10.67 Pr>=chibar2 =
> 0.001
>
> . quadchk
>
> Refitting model intpoints() =  8
> factor variables and time-series operators not allowed
> in option offset()
> error refitting model
> r(101);
>
> .
>
> Best wishes, Garry
>
>
>
>
> *
> *   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/
>



-- 
Muhammad Anees
MSc in Economics
The University of Sheffield
United Kingdom

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index