File: pmg.Rd

package info (click to toggle)
r-cran-plm 2.6-2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,032 kB
  • sloc: sh: 13; makefile: 4
file content (113 lines) | stat: -rw-r--r-- 3,381 bytes parent folder | download | duplicates (2)
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/est_mg.R
\name{pmg}
\alias{pmg}
\alias{summary.pmg}
\alias{print.summary.pmg}
\alias{residuals.pmg}
\title{Mean Groups (MG), Demeaned MG and CCE MG estimators}
\usage{
pmg(
  formula,
  data,
  subset,
  na.action,
  model = c("mg", "cmg", "dmg"),
  index = NULL,
  trend = FALSE,
  ...
)

\method{summary}{pmg}(object, ...)

\method{print}{summary.pmg}(
  x,
  digits = max(3, getOption("digits") - 2),
  width = getOption("width"),
  ...
)

\method{residuals}{pmg}(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{model}{one of \code{"mg"}, \code{"cmg"}, or \code{"dmg"},}

\item{index}{the indexes, see \code{\link[=pdata.frame]{pdata.frame()}},}

\item{trend}{logical specifying whether an individual-specific
trend has to be included,}

\item{\dots}{further arguments.}

\item{object, x}{an object of class \code{pmg},}

\item{digits}{digits,}

\item{width}{the maximum length of the lines in the print output,}
}
\value{
An object of class \code{c("pmg", "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{r.squared}{numeric, the R squared,}
\item{call}{the call,}
\item{indcoef}{the matrix of individual coefficients from
separate time series regressions.}
}
\description{
Mean Groups (MG), Demeaned MG (DMG) and Common Correlated Effects
MG (CCEMG) estimators for heterogeneous panel models, possibly with
common factors (CCEMG)
}
\details{
\code{pmg} is a function for the estimation of linear panel models with
heterogeneous coefficients by various Mean Groups estimators. Setting
argument \code{model = "mg"} specifies the standard Mean Groups estimator, based on the
average of individual time series regressions. If \code{model = "dmg"}
the data are demeaned cross-sectionally, which is believed to
reduce the influence of common factors (and is akin to what is done
in homogeneous panels when \code{model = "within"} and \code{effect = "time"}).
Lastly, if \code{model = "cmg"} the CCEMG estimator is
employed which is consistent under the hypothesis of
unobserved common factors and idiosyncratic factor loadings; it
works by augmenting the model by cross-sectional averages of the
dependent variable and regressors in order to account for the
common factors, and adding individual intercepts and possibly
trends.
}
\examples{
data("Produc", package = "plm")
## Mean Groups estimator
mgmod <- pmg(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, data = Produc)
summary(mgmod)

## demeaned Mean Groups
dmgmod <- pmg(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, 
             data = Produc, model = "dmg")
summary(dmgmod)

## Common Correlated Effects Mean Groups
ccemgmod <- pmg(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, 
                data = Produc, model = "cmg")
summary(ccemgmod)
}
\references{
\insertRef{PESA:06}{plm}
}
\author{
Giovanni Millo
}
\keyword{regression}