Displaying 2 results from an estimated 2 matches for "tstfit".
Did you mean:
testfit
2016 Aug 07
1
problem with abine(lm(...)) for plot(y~x, log='xy')
Hello:
In the following plot, the fitted line plots 100 percent above
the points:
tstDat <- data.frame(x=10^(1:3), y=10^(1:3+.1*rnorm(3)))
tstFit <- lm(log(y)~log(x), tstDat)
plot(y~x, tstDat, log='xy')
abline(tstFit)
I can get the correct line with the following:
tstPredDat <- data.frame(x=10^seq(1, 3, len=2))
tstPred <- predict(tstFit, tstPredDat)
lines(tstPredDat$x, exp(tstPred))
I tried "abline...
2006 Nov 16
0
nmle for time of structural change?
...t I've come to
what I want using 'nlme':
library(nlme)
tstDF5 <- data.frame(t.=rep(1:5, 3), subj=rep(1:3, e=5),
y=c(rep(0:1, c(1,4)), rep(0:1, c(2,3)),
rep(0:1, c(3,2)) ) )
breakpoint0seg2t <- function(t., lT){
t1 <- 5*plogis(-lT)
((t.<=t1)+(t1<t.))
}
tstFit <- nlme(y~breakpoint0seg2t(t., lT1),
data=tstDF5, fixed=lT1~1,
random=list(subj=pdDiag(l1~1)), start=0 )
Error in chol((value + t(value))/2) : the leading minor of order 1 is
not positive definite
The function 'breakpoint0seg2t' is constant except at the data
points, wh...