Skip to contents

Returns the number of observations that are used by an initialized model. If there are missing values, the number of used observations may differ from the numbers of observations of the data set that was passed to the model's initialization.

Usage

# S4 method for market_model
nobs(object)

# S4 method for market_fit
nobs(object)

Arguments

object

A model object.

Value

The number of used observations.

Examples

# \donttest{
model <- new(
  "diseq_basic", # model type
  subject = ID, time = TREND, quantity = HS, price = RM,
  demand = RM + TREND + W + CSHS + L1RM + L2RM + MONTH,
  supply = RM + TREND + W + L1RM + MA6DSF + MA3DHF + MONTH,
  fair_houses()
)

# get the number observations
nobs(model)
#> [1] 130
# }