Carsten.Urbach@physik.fu-berlin.de
2005-Sep-09 09:32 UTC
[Rd] nls fails to return correlation matrix (PR#8127)
Full_Name: Carsten Urbach Version: 2.1.1 (2005-06-20) OS: Linux Submission from: (NULL) (141.34.5.241) I observed one case where nls failed to return the correlation matrix, while the parameter estimates were computed correctly. In the follwing I include all the commands leading to this problem. R was started with 'R --vanilla':> version_ platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 2 minor 1.1 year 2005 month 06 day 20 language R> data <- read.table(file="zp.dat", header=F) > dataV1 V2 V3 V4 1 4 5.6791 0.80709 0.00094 2 6 5.8636 0.71202 0.00083 3 8 6.0219 0.67844 0.00139 4 10 6.1628 0.65797 0.00130 5 12 6.2885 0.64604 0.00119 6 16 6.4956 0.63047 0.00112> df <- data.frame(x=data$V2-6, y=data$V3) > dfx y 1 -0.3209 0.80709 2 -0.1364 0.71202 3 0.0219 0.67844 4 0.1628 0.65797 5 0.2885 0.64604 6 0.4956 0.63047> fit4 <- nls(y ~ a+b*x+c*x^2+d*x^3+e*x^4, data = df, start = list(a = 1., b -1., c = 1., d=-1., e=1.)) > summary(fit4)Formula: y ~ a + b * x + c * x^2 + d * x^3 + e * x^4 Parameters: Estimate Std. Error t value Pr(>|t|) a 0.680936 0.001327 513.002 0.00124 ** b -0.168167 0.010660 -15.775 0.04030 * c 0.325593 0.047433 6.864 0.09210 . d -0.860767 0.117710 -7.313 0.08652 . e 0.957177 0.319101 3.000 0.20486 --- Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 Residual standard error: 0.001722 on 1 degrees of freedom Correlation of Parameter Estimates: a b c d b 1 c , , 1 d * , 1 e . , * * attr(,"legend") [1] 0 ? ? 0.3 ?.? 0.6 ?,? 0.8 ?+? 0.9 ?*? 0.95 ?B? 1> fit4Nonlinear regression model model: y ~ a + b * x + c * x^2 + d * x^3 + e * x^4 data: df a b c d e 0.6809363 -0.1681674 0.3255929 -0.8607670 0.9571768 residual sum-of-squares: 2.966569e-06
Peter Dalgaard
2005-Sep-09 09:55 UTC
[Rd] nls fails to return correlation matrix (PR#8127)
Carsten.Urbach at physik.fu-berlin.de writes:> Full_Name: Carsten Urbach > Version: 2.1.1 (2005-06-20) > OS: Linux > Submission from: (NULL) (141.34.5.241) > > > I observed one case where nls failed to return the correlation matrix, while the > parameter estimates were computed correctly. In the follwing I include all the > commands leading to this problem. R was started with 'R --vanilla':.............................> > Residual standard error: 0.001722 on 1 degrees of freedom > > Correlation of Parameter Estimates: > a b c d > b 1 > c , , 1 > d * , 1 > e . , * * > attr(,"legend") > [1] 0 ? ? 0.3 ?.? 0.6 ?,? 0.8 ?+? 0.9 ?*? 0.95 ?B? 1And the problem was??? You may not like the graphical representation, but it is not a bug. Just use print(summary(fit),symbolic.cor=FALSE) to get rid of it. -- O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
Maybe Matching Threads
- likelihood ratio test between glmer and glm
- quantreg log and polinomial functions
- [Bug 2628] New: skype ((( 866 769 8127 @@@@ SKYPE tech support phone number | Skype tech support
- [Bug 2629] New: ((((866-769-8127 SKYPE Ə ೠ ್ ⅓ ॐ tech support number | skype support number
- Confusing lstat() performance