Statalist


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

Re: st: Interpretation of regressionmodel of ln-transformed variable


From   "roland andersson" <[email protected]>
To   [email protected]
Subject   Re: st: Interpretation of regressionmodel of ln-transformed variable
Date   Wed, 5 Nov 2008 15:12:13 +0100

Maarten

Det er jo glimrende o dejlig

Just to assure I have understood. In this model I keep age 10-19 and
non-perforated appendicitis (the largest groups) as reference level so
I do not bother with mean centering with age.


lnLOS              exp(b)       Std. Err.      t        P>t
[95% Conf. Interval]

lapscopy         1.015229   .0069404     2.21   0.027     1.001716    1.028924
_Iappdgn2_1    1.854565   .0133561    85.76   0.000     1.828571    1.880929
_Iappdgn2_3    1.172527   .0139403    13.39   0.000      1.14552    1.200171
_Ialderkat_0     1.113349   .0124712     9.59   0.000     1.089172    1.138063
_Ialderka~20    .9669727   .0081023    -4.01   0.000     .9512217    .9829846
_Ialderka~30    1.013716   .0091096     1.52   0.130     .9960177     1.03173
_Ialderka~40    1.074382   .0115025     6.70   0.000     1.052072    1.097165
_Ialderka~50    1.181179   .0134386    14.64   0.000      1.15513    1.207815
_Ialderka~60    1.309059   .0192205    18.34   0.000     1.271924    1.347279
_Ialderka~70    1.685401   .0312085    28.19   0.000     1.625328    1.747694
_Ialderka~80    2.303874   .0611701    31.43   0.000     2.187045    2.426943
prepermalign    1.190686    .027653     7.51   0.000     1.137701     1.24614
precardios~s    1.024731   .0266026     0.94   0.347     .9738935    1.078222
preperlung~d    1.076669   .0182661     4.35   0.000     1.041456    1.113073
preperhype~i    1.024272   .0208447     1.18   0.239     .9842196    1.065954
preperhjar~t     1.293909   .0480737     6.94   0.000     1.203033    1.391651
prepernjur~t     1.050412   .0516992     1.00   0.318      .953814    1.156792
preperdiab~s    1.168423   .0287019     6.34   0.000     1.113499    1.226055
cons                1.858693   .0106446   108.24   0.000     1.837946
  1.879675

And here I calculate the effect of laparoscopy

. nlcom exp((_b[cons]+ _b[lapscopy]) -  exp((_b[cons])))

_nl_1:  exp((_b[cons]+ _b[lapscopy]) - exp((_b[cons])))


vtidln       Coef.   Std. Err.      t    P>t     [95% Conf. Interval]

_nl_1    .2941382   .0027509   106.92   0.000     .2887463    .2995302

ie open appendectomy in nonperforated patients age 10-19 have a
geometric mean LOS of 1.86 (95% CI 1.83-1.88) days after adjustment
for comorbidity and lapscopy patients have 0.29 (95% CI 0.28-0.30)
days longer LOS.

Correct?

Greetings o stort tack

Roland Andersson



2008/11/5 Maarten buis <[email protected]>:
> --- roland andersson <[email protected]> wrote:
>> It is also difficult to imaging that there should be censoring
>> for conditions that normally need 1 to 7 days of hospital visit.
>
> Ok, sounds reasonable.
>
>> Following your example I have made this model
>>
>> xi:regress lnLOS  lapscopic i.appdgn age agesq cons, eform("exp(b)")
>> nocons
>>
>> and get this result
>>
>> lnLOS         exp(b)      [95% Conf.  Interval]
>> lapscopic     1.018056    1.004532    1.031762
>> _Iappdgn2_1   1.850726    1.824841    1.876978
>> _Iappdgn2_3   1.174283    1.147247    1.201956
>> age           .9852508    .9841405    .9863623
>> agesq         1.000275    1.000261    1.000289
>> cons          2.208685    2.168225    2.2499
>>
>> I now understand that the exp(b) is a multiplicator, ie that open
>> appendectomy has a geometric mean LOS of 2.21 days whereas
>> laparoscopic patients have 1.02*2.21=2.25 days or 0.04 days longer
>> geometric mean LOS. Is it correct to recalculate the CI of this
>> difference as 2.21-1.0045*2.21=0.01 and 2.21-1.032*2.21=0.07?
>
> In that case I would use -adjust- and -nlcom- like in the example
> below:
>
> *--------------- begin example --------------------------
> sysuse cancer, clear
> gen ln_t = ln(studytime)
> gen cons = 1
> xi: reg ln_t i.drug age cons, nocons eform("exp(b)")
>
> adjust _Idrug_3=0 age, by(_Idrug_2) exp ci
> sum age if e(sample)
> nlcom exp((_b[cons] + _b[age]*`r(mean)')+ _b[_Idrug_2]) -  ///
>      exp((_b[cons] + _b[age]*`r(mean)'))
> *---------------- end example ---------------------------
>
> Notice that the difference in LOS now depends on the values of the
> other explanatory variables. These other variables define the baseline
> LOS (in your case the LOS for someone who received an open
> appendectomy). So if you haven't mean centered age, then the difference
> in geometric mean LOS you reported applies to newly born babies. You
> can report the difference in geometric mean LOS for someone of average
> age either by first mean centering age (subtract the mean age from the
> variable age as I did in the example in my previous post), or take mean
> age into account like in the example above.
>
> Hope this helps,
> Maarten
>
> -----------------------------------------
> Maarten L. Buis
> Department of Social Research Methodology
> Vrije Universiteit Amsterdam
> Boelelaan 1081
> 1081 HV Amsterdam
> The Netherlands
>
> visiting address:
> Buitenveldertselaan 3 (Metropolitan), room N515
>
> +31 20 5986715
>
> http://home.fsw.vu.nl/m.buis/
> -----------------------------------------
>
>
>
> *
> *   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index