Displaying 2 results from an estimated 2 matches for "betaq".
Did you mean:
beta
2012 Sep 25
1
REML - quasipoisson
...gam(y~s(x1)+s(x2),family="quasipoisson",method="REML",scale=-1)
phiq<-m3$scale
#1st term
S1q<-m3$smooth[[1]]$S[[1]]*m3$sp[1]
S2q<-m3$smooth[[2]]$S[[1]]*m3$sp[2]
Sq<-matrix(0,19,19)
for (i in 2:10)
{
for (j in 2:10)
{
Sq[i,j]=S1q[i-1,j-1]
Sq[i+9,j+9]=S2q[i-1,j-1]
}
}
betaq<-m3$coef
#penalised deviance
Dpq<-m3$dev+t(betaq)%*%Sq%*%betaq
F1q<-Dpq/(2*phiq)
#2nd term undefined
#3rd term
Xq<-predict(m3,type="lpmatrix")
Wq<-diag(fitted(m3))
Hq<-t(Xq)%*%Wq%*%Xq
ldhsq<-determinant(Hq+Sq,log=TRUE)$modulus[1]
eigSq<-eigen(Sq,only.values=TRUE)...
2012 Oct 01
0
[Fwd: REML - quasipoisson]
...scale=-1)
> phiq<-m3$scale
>
> #1st term
> S1q<-m3$smooth[[1]]$S[[1]]*m3$sp[1]
> S2q<-m3$smooth[[2]]$S[[1]]*m3$sp[2]
> Sq<-matrix(0,19,19)
> for (i in 2:10)
> {
> for (j in 2:10)
> {
> Sq[i,j]=S1q[i-1,j-1]
> Sq[i+9,j+9]=S2q[i-1,j-1]
> }
> }
> betaq<-m3$coef
> #penalised deviance
> Dpq<-m3$dev+t(betaq)%*%Sq%*%betaq
> F1q<-Dpq/(2*phiq)
>
> #2nd term undefined
>
> #3rd term
> Xq<-predict(m3,type="lpmatrix")
> Wq<-diag(fitted(m3))
> Hq<-t(Xq)%*%Wq%*%Xq
> ldhsq<-determinant(Hq+Sq,log=...