Description Usage Arguments Value Examples
pred.sglmm
is a function for predictions from the results of fsglmm
.
1 | pred.sglmm(fit.sglmm, data, coords, ntrial = 1, offset = NA)
|
fit.sglmm |
a list from |
data |
a data frame to be predicted by the model. |
coords |
coordinates for prediction |
ntrial |
a numeric vector of the total number of trials ( binomial ) |
offset |
a numeric vector indicating a known component to be included in the linear predictor for predictions. |
a vector of predicted mean parameters. (e.g. probabilities for binomial case)
1 2 3 4 5 6 | ## the result from fsglmm, data to be predicted, and the coordinates for prediction is required.
result <- fsglmm(Y~-1+X1+X2, kappa=2.5, inits = startinit, data = data,coords = coords,
family = "binomial", ntrial = 1, offset = NA,method.optim = "CG",method.integrate = "NR",rank = 50)
pred.sglmm(fit.sglmm=result,data=X.pred,)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.