predict.wbgee: Predictions and simulations from within-between GEE models

Description Usage Arguments Examples

View source: R/utils.R

Description

These methods facilitate fairly straightforward predictions from wbgee models.

Usage

1
2
3
4
5
6
7
8
9
## S3 method for class 'wbgee'
predict(
  object,
  newdata = NULL,
  se.fit = FALSE,
  raw = FALSE,
  type = c("link", "response"),
  ...
)

Arguments

object

Object of class inheriting from "lm"

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 newdata a geeglm model frame or panel_data? TRUE indicates a geeglm-style newdata, with all of the extra columns created by wbgee.

type

Type of prediction (response or model term). Can be abbreviated.

...

further arguments passed to or from other methods.

Examples

1
2
3
4
5
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)

panelr documentation built on Jan. 18, 2021, 5:06 p.m.