[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Lina Jonsson" <lina.jonsson@vti.se> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: nl-command sensitive (sometimes) to unit of measurement |

Date |
Tue, 9 Sep 2008 17:51:35 +0200 |

Dear all, I have encountered a strange phenomenon using the nl-command. I am estimating a model on two subsets. Among the independet variables are two variables that measure a distance and when I changed the unit from meters into km the estimates of other variables in the models changed (by a substantial amount) for one of the subsets but not the other. See the code below where i defines the subset (all observations with a noise level above 50 or 55 dB) and j defines if the distance variables (avststn and påfart) is measured in meters or km where j=1 is meters and j=2 is km. forval i = 50(5)55 { forval j = 1/2 { nl(ksumma04 = {b0}*exp({area}*boyta+{standard}*stand+{rad}*radhus+{kedje}*kedjeh+{Aspen1}*Aspen1+{Aspen2}*Aspen2+{Aspedalen1}*Aspedalen1+{Aspedalen2}*Aspedalen2+{Lerum1}*Lerum1+{Lerum2}*Lerum2+{Landsbygd}*Landsbygd+{Stenkullen1}*Stenkullen1+{Stenkullen2}*Stenkullen2+{Floda1}*Floda1+{väg100}*väg100+{stn}*avststn_`j'+{E20acces}*påfart_`j')*(1+(1-{b1}-(1-{b1})*exp((exp({c1})/(1+exp({c1})))*vag45inklmiss))/(exp(30*(exp({c1})/(1+exp({c1}))))-1))*(1+(1-{b2}-(1-{b2})*exp((exp({c2})/(1+exp({c2})))*tag45inklmiss))/(exp(30*(exp({c2})/(1+exp({c2}))))-1))) if sumbuller>=`i', nolog variables(boyta stand radhus kedjeh Aspen1 Aspen2 Aspedalen1 Aspedalen2 Lerum1 Lerum2 Landsbygd Stenkullen1 Stenkullen2 Floda1 väg100 avststn påfartm vag45inklmiss tag45inklmiss) initial (b1 0.5 b2 0.5 c1 -7 c2 -2) } } The really strange thing is that for the larger subset the parameters estimated is almost exactly the same while for the smaller subset the difference is quite large, large enough to make me feel uncomfortable with my results. How can this be, is it normal for the nl-command to be so sensitive to how a variable is measured? As an example look at the estimates for subset>=55 dB and the distance measured in meters. b and c are the parameters of interest in the model... ksumma04 | Coef. Std. Err. t P>|t| [95% Conf. Interval] b1 | .5557641 .0101552 54.73 0.000 .5357827 .5757455 c1 | -26.50561 .3261469 -81.27 0.000 -27.14734 -25.86389 b2 | .560812 .3102769 1.81 0.072 -.0496879 1.171312 c2 | -1.703428 .7838958 -2.17 0.031 -3.245818 -.1610369 Compared to the same subset but with distance measured in km. ksumma04 | Coef. Std. Err. t P>|t| [95% Conf. Interval] b1 | .4780946 .06464 7.40 0.000 .3509092 .6052801 /c1 | -22.80489 7.034353 -3.24 0.001 -36.64566 -8.964127 /b2 | .5103717 .3242317 1.57 0.116 -.1275854 1.148329 /c2 | -1.64759 .7374526 -2.23 0.026 -3.098599 -.1965809 b1 is 0.56 when the distance variables are measured in meters and 0.48 when measured in km, a quite large difference. Any suggestions how to deal with this? Thanks! /Lina Jonsson * * 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/

**Follow-Ups**:**Re: st: nl-command sensitive (sometimes) to unit of measurement***From:*"Brian P. Poi" <bpoi@stata.com>

- Prev by Date:
**st: sampling weight in --sum,--fsum** - Next by Date:
**Re: st: sampling weight in --sum,--fsum** - Previous by thread:
**st: sampling weight in --sum,--fsum** - Next by thread:
**Re: st: nl-command sensitive (sometimes) to unit of measurement** - Index(es):

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