predict.wbgee | R Documentation |
These methods facilitate fairly straightforward predictions
from wbgee
models.
## S3 method for class 'wbgee'
predict(
object,
newdata = NULL,
se.fit = FALSE,
raw = FALSE,
type = c("link", "response"),
...
)
object |
Object of class inheriting from |
newdata |
An optional data frame in which to look for variables with which to predict. If omitted, the fitted values are used. |
se.fit |
A switch indicating if standard errors are required. |
raw |
Is |
type |
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.