Displaying 2 results from an estimated 2 matches for "dtmax".
Did you mean:
tmax
2008 Jul 28
2
Help with a loop
...with more
than one value, so I do not know how to solve this.
Thanks
Prenewbie
The code is the following:
duration<-c(750, 8940,17180, 8693,10100, 7990,24820, 6770,
7390,8450,18400,16252,6080,11030)
tmax<-0
dt<-0
for (m in 1:14)
{
tmax[m]<-duration[m]
dtmin<-969
dtmax<-9884
i<-1
dt[m]<-round(runif(1,dtmin,(tmax[m]-1)))}
ts<-c(1)
ts1<-ts
ts2<-ts1
ts3<-ts1
ts4<-ts1
ts5<-ts1
ts6<-ts1
ts7<-ts1
ts8<-ts1
ts9<-ts1
ts10<-ts1
ts11<-ts1
ts12<...
2009 May 18
1
Predicting complicated GAMMs on response scale
...ff~s(DaysPT)+AirToC,method="REML")
p.d<-data.frame(DaysPT=seq(min(DaysPT),max(DaysPT)))
p.d$AirToC<-(6.7)
b<-predict.gam(g.m$gam,p.d,se=TRUE)
range<-c(min(b$fit-2*b$se.fit),max(b$fit+2*b$se.fit))
plot(p.d$DaysPT,b$fit,ylim=c(-4,12),xlab="Days post-tagging",ylab="dTmax
(?C)",type="l",lab=c(24,4,12),las=1,cex.lab=1.5, cex.axis=1,lwd=2)
lines(p.d$DaysPT,b$fit+b$se.fit*1.96,lty=2,lwd=1.5)
lines(p.d$DaysPT,b$fit-b$se.fit*1.96,lty=2,lwd=1.5)
points(DaysPT,Diff)
However, when I add a correlation structure and/or a variance structure so
that the model m...