Generate CRE variables.

Share:

Description

This function generates CRE variables of type 'CRE-M' or 'AD' from variables available in a model frame. This function is not intended for direct use but is called from the function rqpd.

Usage

1
  model.cre(object, data, ids, contrasts.arg, method)

Arguments

object

A model formula or a terms object.

data

a data frame created with model.frame.

ids

An id vector (potentially as factor) specifying the structure of the panel.

contrasts.arg

A list, whose entries are values (numeric matrices or character strings naming functions) to be used as replacement values for the contrasts replacement function and whose names are the names of columns of data containing 'factor's.

method

"m"/"crem" for CRE-M specification or "ad" for the Abrevaya and Dahl type specification.

Value

Matrix with the generated CRE variables.

Author(s)

Stefan Holst Bache