Hi everyone,
I have encountered this problem while using 'segmented' plugin for R
i386 2.15.0 (for Windows 32bit OS) and I just cannot find neither explanation
nor solution for it.
I am trying to run this data
gpp temp
1.661 5
5.028 10
9.772 15
8.692 20
5.693 25
6.293 30
7.757 5
4.604 10
8.763 15
8.134 20
4.616 25
8.417 30
3.483 5
5.046 10
8.306 15
9.142 20
4.686 25
7.301 30
and with the 'segmented' I wanted to find the brakepoint for the curve,
however I get this error mesasge:
Error in 1:ncol(U) : argument of length 0
In addition: Warning message:
In o0$boot.restart <- ris : Coercing LHS to a list
I was using the following code:
library("segmented")
curva<-read.table("gppdata.txt", header=T)
attach(curva)
fit.glm<-glm(gpp~temp, weight=NULL, family=gaussian)
fit.seg<-segmented(fit.glm, seg.Z=~temp, psi=15)
summary(fit.seg)
Is anyone able to help me and direct me for the source of the problem?
Thanks for your help.
Regards,
Szymon
dear Szymon, it is a bug (in the new version), thanks. It depends on the flat underlying relationship you are trying to estimate with a small sample.. I will correct it as soon as possible. Meanwhile you can use o1<-glm(gpp ~ temp) os1<-segmented(o1, seg.Z=~temp, psi=15, control=seg.control(n.boot=0, display=T, it.max=2)) best, vito -- ===================================Vito M.R. Muggeo Dip.to Sc Statist e Matem `Vianelli' Universit? di Palermo viale delle Scienze, edificio 13 90128 Palermo - ITALY tel: 091 23895240 fax: 091 485726 http://dssm.unipa.it/vmuggeo