pred.sglmm: Model Predictions

Description Usage Arguments Value Examples

View source: R/fll_pred.R

Description

pred.sglmm is a function for predictions from the results of fsglmm.

Usage

1
pred.sglmm(fit.sglmm, data, coords, ntrial = 1, offset = NA)

Arguments

fit.sglmm

a list from fsglmm

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.

Value

a vector of predicted mean parameters. (e.g. probabilities for binomial case)

Examples

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,)

fastLaplace documentation built on June 28, 2021, 9:07 a.m.