offset_values_extract {mdmb} | R Documentation |
Extracts Offset Values
Description
Extracts offset values by applying a formula with an offset term to a data frame.
Usage
offset_values_extract(formula, data)
Arguments
formula |
An R Formula |
data |
Data frame |
Value
Vector containing offset values
See Also
stats::offset
,
stats::model.offset
Examples
#############################################################################
# EXAMPLE 1: Toy example for extraction of offset values
#############################################################################
data(data.ma01, package="miceadds")
dat <- data.ma01
dat1 <- mdmb::offset_values_extract( formula=~ migrant + offset(books), data=dat )
dat1[1:5]
## [1] 6 6 5 2 6
[Package mdmb version 1.9-22 Index]