1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/est_ggls.R
\name{pggls}
\alias{pggls}
\alias{summary.pggls}
\alias{print.summary.pggls}
\alias{residuals.pggls}
\title{General FGLS Estimators}
\usage{
pggls(
formula,
data,
subset,
na.action,
effect = c("individual", "time"),
model = c("within", "pooling", "fd"),
index = NULL,
...
)
\method{summary}{pggls}(object, ...)
\method{print}{summary.pggls}(
x,
digits = max(3, getOption("digits") - 2),
width = getOption("width"),
...
)
\method{residuals}{pggls}(object, ...)
}
\arguments{
\item{formula}{a symbolic description of the model to be estimated,}
\item{data}{a \code{data.frame},}
\item{subset}{see \code{\link[=lm]{lm()}},}
\item{na.action}{see \code{\link[=lm]{lm()}},}
\item{effect}{the effects introduced in the model, one of
\code{"individual"} or \code{"time"},}
\item{model}{one of \code{"within"}, \code{"pooling"}, \code{"fd"},}
\item{index}{the indexes, see \code{\link[=pdata.frame]{pdata.frame()}},}
\item{\dots}{further arguments.}
\item{object, x}{an object of class \code{pggls},}
\item{digits}{digits,}
\item{width}{the maximum length of the lines in the print output,}
}
\value{
An object of class \code{c("pggls","panelmodel")} containing:
\item{coefficients}{the vector of coefficients,}
\item{residuals}{the vector of residuals,}
\item{fitted.values}{the vector of fitted values,}
\item{vcov}{the covariance matrix of the coefficients,}
\item{df.residual}{degrees of freedom of the residuals,}
\item{model}{a data.frame containing the variables used for the
estimation,}
\item{call}{the call,}
\item{sigma}{the estimated intragroup (or cross-sectional, if
\code{effect = "time"}) covariance of errors,}
}
\description{
General FGLS estimators for panel data (balanced or unbalanced)
}
\details{
\code{pggls} is a function for the estimation of linear panel models by
general feasible generalized least squares, either with or without
fixed effects. General FGLS is based on a two-step estimation
process: first a model is estimated by OLS (\code{model = "pooling"}),
fixed effects (\code{model = "within"}) or first differences
(\code{model = "fd"}), then its residuals are used to estimate an error
covariance matrix for use in a feasible-GLS analysis. This framework allows
the error covariance structure inside every group
(if \code{effect = "individual"}, else symmetric) of observations to be fully
unrestricted and is therefore robust against any type of intragroup
heteroskedasticity and serial correlation. Conversely, this
structure is assumed identical across groups and thus general FGLS
estimation is inefficient under groupwise heteroskedasticity. Note
also that this method requires estimation of \eqn{T(T+1)/2}
variance parameters, thus efficiency requires N >> T
(if \code{effect = "individual"}, else the opposite).
If \code{model = "within"} (the default) then a FEGLS (fixed effects GLS, see
Wooldridge, Ch. 10.5) is estimated; if \code{model = "fd"} a FDGLS
(first-difference GLS). Setting \code{model = "pooling"} produces an unrestricted
FGLS model (see ibid.) (\code{model = "random"} does the same, but using this value
is deprecated and included only for retro--compatibility reasons).
}
\examples{
data("Produc", package = "plm")
zz_wi <- pggls(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,
data = Produc, model = "within")
summary(zz_wi)
zz_pool <- pggls(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,
data = Produc, model = "pooling")
summary(zz_pool)
zz_fd <- pggls(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,
data = Produc, model = "fd")
summary(zz_fd)
}
\references{
\insertRef{IM:SEUN:SCHM:WOOL:99}{plm}
\insertRef{KIEF:80}{plm}
\insertRef{WOOL:02}{plm}
\insertRef{WOOL:10}{plm}
}
\author{
Giovanni Millo
}
\keyword{regression}
|