Learn R Programming

simplexreg (version 1.3)

predict.simplexreg: Prediction Method for simplexreg Objects

Description

Predicted values based on simplex regression object

Usage

"predict"(object, newdata = NULL, type = c("response", "dispersion"), na.action, ...)

Arguments

object
fitted model object of class "simplexreg"
newdata
an optional data frame in which to look for variables with which to predict. If omitted, original observations are used.
type
character indicating type of predictions:fitted mean of response ("response") or fitted dispersion parameter("dispersion")
na.action
function determining what should be done with missing values in newdata
...
currently not used

See Also

simplexreg

Examples

Run this code
## fit the model
data("sdac", package="simplexreg")
sim.glm2 <- simplexreg(rcd~ageadj+chemo|age, link = "logit", 
  data = sdac)

data("retinal", package = "simplexreg")
sim.gee2 <- simplexreg(Gas~LogT+LogT2+Level|LogT+Level|Time,
  link = "logit", corr = "AR1", id = ID, data = retinal)  	

## predict the mean
predict(sim.glm2, type = "response")

## predict the dispersion
predict(sim.gee2, type = "dispersion")

Run the code above in your browser using DataLab