
Last chance! 50% off unlimited learning
Sale ends in
These methods facilitate fairly straightforward predictions
from wbgee
models.
# S3 method for wbgee
predict(
object,
newdata = NULL,
se.fit = FALSE,
raw = FALSE,
type = c("link", "response"),
...
)
Object of class inheriting from "lm"
An optional data frame in which to look for variables with which to predict. If omitted, the fitted values are used.
A switch indicating if standard errors are required.
Is newdata
a geeglm
model frame or panel_data
? TRUE
indicates a geeglm
-style newdata, with all of the extra columns
created by wbgee
.
Type of prediction (response or model term). Can be abbreviated.
further arguments passed to or from other methods.
if (requireNamespace("geepack")) {
data("WageData")
wages <- panel_data(WageData, id = id, wave = t)
model <- wbgee(lwage ~ lag(union) + wks, data = wages)
# By default, assumes you're using the processed data for newdata
predict(model)
}
Run the code above in your browser using DataLab