Learn R Programming

plm (version 1.2-0)

pmodel.response: A function to extract the model.response

Description

pmodel.response has several method to extract conveniently the response of several objects

Usage

pmodel.response(object, ...)
## S3 method for class 'data.frame':
pmodel.response(object,
                                     model = c("pooling","within","Between",
                                               "between","mean","random","fd"),
                                    effect = c("individual","time","twoways"),
                                    lhs = NULL,
                                    theta = NULL, ...)
## S3 method for class 'pFormula':
pmodel.response(object, data,
                                   model = c("pooling","within","Between",
                                             "between","mean","random","fd"),
                                   effect = c("individual","time","twoways"),
                                   lhs = NULL,
                                   theta = NULL, ...)
## S3 method for class 'plm':
pmodel.response(object,
                              model = c("pooling","within","Between",
                                        "between","mean","random","fd"),
                              effect = c("individual","time","twoways"),
                              theta = NULL, ...)

Arguments

object
an object of class "plm",
data
a data.frame,
effect
the effects introduced in the model, one of "individual", "time" or "twoways",
model
one of "pooling", "within", "between", "random", "fd" and "ht",
theta
the parameter for the transformation if model = "random",
lhs
,
...
further arguments.

Value

  • A numeric vector.

Details

The model response is extracted (from a data.frame, a pFormula or a plm object, and the transformation specified by effect and model is applied to it.