Eup(formula, additive.effects = c("none", "individual", "time", "twoways"), dim.criterion = c("PC1", "PC2", "PC3", "BIC3","IC1", "IC2" , "IC3", "IPC1", "IPC2", "IPC3"), d.max = NULL, sig2.hat = NULL, factor.dim = NULL, double.iteration = TRUE, start.beta = NULL, max.iteration = 500, convergence = 1e-6, restrict.mode = c("restrict.factors", "restrict.loadings"), ...)
"none"
: for no transformation
"individual"
: for within transformation
"time"
: for between transformation
"twoways"
: for twoways transformation
factor.dim
is left unspecified. The default criterion is "PC1"
d.max=NULL
) yields to an internal selection of
d.max.d.max
. The default (sig2.hat=NULL
) yields to an internal estimation.factor.dim=NULL
) yields to an internal estimation.FALSE
the update of the factor dimension d
will be done simultaneously with remaining model parameters without alternating between inner and outer iteration. This may speed up computations, but the convergence is less stable than in the default setting."restrict.factors"
: Factors are restricted to have an
euclidean norm of 1.
"restrict.loadings"
: Factor-Loadings are restricted
to have an euclidean norm of 1.
NULL
NULL
.
NULL
.
formula
Usual 'formula'-object. If you wish to
estimate a model without an intercept use '-1' in the
formula-specification. Each Variable has to be given as a
TxN-matrix. Missing values are not allowed.
additive.effects
"none"
: The data is not transformed, except for a subtraction of the overall mean, if the model is estimated with an intercept. The assumed model can be written as
$
Y_{it}=\mu+\sum_{j=1}^P\beta_{j}
X_{itj}+v_{it}+\epsilon_{it}, i=1,...,n; t=1,...,T.$
The parameter 'mu' is set to zero if '-1' is used in formula
.
"individual"
: This is the "within"-model, which
assumes that there are time-constant individual effects,
alpha_i, besides the individual time trends v_it. The
model can be written as
$
Y_{it}=\mu + \alpha_{i}+ \sum_{j=1}^P\beta_{j}
X_{itj} + v_{it} + \epsilon_{it}, i=1,...,n; t=1,...,T.$
The parameter 'mu' is set to zero if '-1' is used in formula
.
"time"
: This is the "between"-model, which assumes
that there is a common time trend (for all individuals), theta_t. The
model can be written as
$
Y_{it}=\mu+ \theta_t + \sum_{j=1}^P\beta_{j}
X_{itj}+v_i(t)+\epsilon_{it}, i=1,...,n; t=1,...,T.$
The parameter 'mu' is set to zero if '-1' is used in formula
.
"twoways"
: This is the "twoways"-model ("within" &
"between"), which assumes that there are time-constant
individual effects, alpha_i, and a common time trend,
theta_t. The model can be written as
$
Y_{it}=\mu+ \alpha_{i} + \theta_t +\sum_{j=1}^P\beta_{j}
X_{itj}+\tau_i+v_i(t)+\epsilon_{it}, i=1,...,n; t=1,...,T.$
The parameter 'mu' is set to zero if '-1' is used in formula
.
Inferences about the slope parameters can be obtained by using the method summary()
. The type of correlation and heteroskedasticity in the idiosyncratic errors can be specified by
choosing the corresponding number for the argument error.type = c(1, 2, 3, 4, 5, 6, 7, 8)
in summary()
, where
1
: indicates the presence of i.i.d. errors,
2
: indicates the presence of cross-section heteroskedasticity with $n/T \to 0$,
3
: indicates the presence of cross-section correlation and heteroskedasticity with $n/T \to 0$,
4
: indicates the presence of heteroskedasticity in the time dimension with $T/n \to 0$,
5
: indicates the presence of correlation and heteroskedasticity in the time dimension with $T/n \to 0$,
6
: indicates the presence of both time and cross-section dimensions with $T/n^2 \to$ and $n/T^2 \to 0$,
7
: indicates the presence of both time and cross-section dimensions with $n/T \to c > 0$, and
8
: indicates the presence of correlation and heteroskedasticity in both time and cross-section dimensions with $n/T \to c > 0$.
The default is 1
. In presence of serial correlations
(cases 5 and 8), the kernel weights required for estimating the
long-run covariance can be externally specified by given a
vector of weights in the argument kernel.weights
. By
default, the function uses internally the linearly decreasing
weights of Newey and West (1987) and a truncation at the lower
integer part of $\min(\sqrt{n},\sqrt{T})$. If case 7 or 8 are chosen, the method summary()
calculates the realization of the bias corrected estimators and gives appropriate inference. The bias corrected coefficients can be called by using the method coef()
to the object produced by summary()
.
## See the example in 'help(Cigar)' in order to take a look at the
## data set 'Cigar'
##########
## DATA ##
##########
data(Cigar)
## Panel-Dimensions:
N <- 46
T <- 30
## Dependent variable:
## Cigarette-Sales per Capita
d.l.Consumption <- diff(log(matrix(Cigar$sales, T,N)))
## Independent variables:
## Consumer Price Index
cpi <- matrix(Cigar$cpi, T,N)
## Real Price per Pack of Cigarettes
d.l.Price <- diff(log(matrix(Cigar$price, T,N)/cpi))
## Real Disposable Income per Capita
d.l.Income <- diff(log(matrix(Cigar$ndi, T,N)/cpi))
## Estimation:
Eup.fit <- Eup(d.l.Consumption~d.l.Price+d.l.Income)
(Eup.fit.sum <- summary(Eup.fit))
## Plot the components of the estimated individual effects
plot(Eup.fit.sum)
Run the code above in your browser using DataLab