nobs.wbm: Number of observations used in 'wbm' models

Description Usage Arguments Examples

View source: R/utils.R

Description

This S3 method allows you to retrieve either the number of observations or number of entities in the data used to fit wbm objects.

Usage

1
2
## S3 method for class 'wbm'
nobs(object, entities = TRUE, ...)

Arguments

object

A fitted model object.

entities

Should nobs return the number of entities in the panel or the number of rows in the panel_data frame? Default is TRUE, returning the number of entities.

...

Further arguments to be passed to methods.

Examples

1
2
3
4
data("WageData")
wages <- panel_data(WageData, id = id, wave = t)
model <- wbm(lwage ~ lag(union) + wks, data = wages)
nobs(model)

panelr documentation built on Oct. 23, 2020, 8:26 p.m.