Description Usage Arguments Value Examples
Calculates the leave-one-out prediction sums of squares of a multivariate linear regression
1 | LOO.prednError(f.object)
|
f.object |
Model formula |
A list containing residual sums of squares and leave-one-out prediction sums of squares
1 2 3 4 5 6 7 8 9 10 | data(PitTraps)
Locn=PitTraps$Locn
distance=PitTraps$distance
Counts=PitTraps[,-c(1,2)]
B=bSpline(distance,degree=2,df=5) #Spline basis for distance
First need to calculate PCOs, as these are the Y variables
D=as.matrix(vegdist(Counts>0)) #Bray-Curtis is default in vegdist
Y.pco=cmdscale(D,k=nrow(D)-1,eig=T)$points #The PCOs
LOO.prednError(Y.pco~B+Locn)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.