Description Usage Arguments Value Author(s) References See Also Examples
Obtains linear predictor- or data-scale predictions for a fitted gppr object
1 | predict.gppr(object,newdata,type="link")
|
object |
a fitted gppr object |
newdata |
an optional data frame containing new predictor variable values. If 'newdata' is omitted, then the predictions are made for the original data from which the gppr model was fitted. |
type |
the type of prediction required. The default is the scale of the linear predictor, alternativels 'type="response"' gives expected values. |
A vector of predictions.
Michael Morrissey michael.morrissey@st-andrews.ac.uk
M.B. Morrissey. in prep.
1 2 3 4 5 6 7 8 9 10 11 | # simulated data (two traits, stabilizing selection on trait 1)
n<-250
z<-cbind(rnorm(n,0,1),rnorm(n,0,1))
W<-rpois(n,exp(2-0.6*z[,1]^2))
d<-as.data.frame(cbind(W,z))
names(d)<-c("W","z1","z2")
fit.func<-gppr(y="W",xterms=c("z1","z2"),data=d,family="poisson",
nterms=2,max.terms=2)
# hist(predict(fit.func))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.