Displaying 20 results from an estimated 1000 matches similar to: "panel regression with twoways random effects, on unbalanced data?"
2010 Mar 16
2
plm "within" models: is the correct F-statistic reported?
Dear R users
I get different F-statistic results for a "within" model, when using
"time" or "twoways" effects in plm() [1] and when manually specifying
the time control dummies [2].
[1] vignette("plm")
[2] http://cran.r-project.org/doc/contrib/Farnsworth-EconometricsInR.pdf
Two examples below:
library("AER")
data("Grunfeld", package =
2013 Jan 11
0
Manual two-way demeaning of unbalanced panel data (Wansbeek/Kapteyn transformation)
Dear R users,
I wish to manually demean a panel over time and entities. I tried to code
the Wansbeek and Kapteyn (1989) transformation (from Baltagi's book Ch. 9).
As a benchmark I use both the pmodel.response() and model.matrix() functions
in package plm and the results from using dummy variables. As far as I
understood the transformation (Ch.3), Q%*%y (with y being the dependent
variable)
2010 May 17
0
plm(..., model="within", effect="twoways") is very slow on unablanaced data (was: Re: Regressions with fixed-effect in R)
Hello Giovanni
I made a minor modification to your function, which now allows to
compute the within R-sq in Twoways Within models (see below).
However I ran into an issue that I have already encountered before:
whenever I try to fit Twoways Within models on my unbalanced data, the
process is strangely slow and I usually terminate it either after
~15min or when my CPU hits 100C. This is similar to
2010 Apr 08
1
plm package twoways effect problem
Hello everyone,
I have a peoblem to create the twoways effect in the plm package.
when i try to create the following
dsn1<-plm(lnQ~lnC+lnL+lnM+lnE+eco+RD,data=newdata,effect="twoways",model="within")
i have this error:
Error in rep.int(c(1, numeric(n)), n - 1L) : negative length vectors
are not allowed
and to be honest i have no idea what does it mean!! can someone
2013 May 17
2
How could I see the source code of functions in an R package?
Hi,
How could I see the source code of functions in an R package?
If we type ?function_name , we will see documentations of the
function_name.
If we type function_name, is what returns just the source code? Could we
just save it in an .R file and modify as we want? However, it seems that
sometimes the source code is hidden (or stored elsewhere?) As an example,
could we see the source
2011 Jun 18
0
Unexpected result with lag() et diff() in plm package.
I have an unexpected result with the functions lag() and diff() in the plm
(panel data) package when used with transform(). These plm-specific
functions are supposed to generate lags and first differences within each
panel.
lag() does not work properly the first time (it reproduces the same
series--this is a common time series pitfall), BUT then it does work
properly when it is run a second
2012 Mar 20
1
MA process in panels
Dear R users,
I have an unbalanced panel with an average of I=100 individuals and a total
of T=1370 time intervals, i.e. T>>I. So far, I have been using the plm
package.
I wish to estimate a FE model like:
res<-plm(x~c+v, data=pdata_frame, effect="twoways", model="within",
na.action=na.omit)
?where c varies over i and t, and v represents an exogenous impact on x
2018 May 08
0
plm(...,"within","twoways") extremely slow on unbalanced panel
I am using it on a big dataset. The estimation was done in hours. But summary() takes forever. Any suggestion is greatly appreciated!
[[alternative HTML version deleted]]
2009 Mar 30
0
pgmm (Blundell-Bond) sample needed)
Dear Ivo, dear list,
(see: Message: 70
Date: Thu, 26 Mar 2009 21:39:19 +0000
From: ivowel at gmail.com
Subject: [R] pgmm (Blundell-Bond) sample needed)
I think I finally figured out how to replicate your supersimple GMM
example with pgmm() so as to get the very same results as Stata.
Having no other regressors in the formula initially drove me crazy. This was a case where simpler models are
2009 Mar 08
1
singular matrices in plm::pgmm()
Hi list,
has anyone succeeded in using pgmm() on any dataset besides
Arellano/Bond's EmplUK, as shown in the vignette?
Whatever I try, I eventually get a runtime error because of a singular
matrix at various points in pgmm.diff() (which gets called by pgmm()).
For example, when estimating a "dynamic" version of the Grunfeld data:
data(Grunfeld, package="Ecdat")
grun
2018 Jan 26
1
plm empty model error
Hi,
I am trying to estimate a two-way model with both individual and time fixed
effects. I am using plm with "twoways" specification.
plm(as.integer(yvar) ~ xvar, index = c("id", "time"), model="within",
data=dataset, effect = "twoways")
But I get keep getting the following message and I don't know what to do
about it, because I don't
2011 Oct 06
1
Coefficients for lagged plm model variables not calculated
Hello,
So I am afraid I am having a recurring problem that I just can't figure out.
I am using the plm package to conduct a panel analysis - although I am not
sure if the problem is arising as a result of the plm package or something
more general.
I am trying to run a fixed effects model with effects over time and
individual. The model has various lags, and the problem is that these lags
do
2013 Mar 08
1
question on package plm
Hi R users:
I am using the plm package for linear panel data analysis but encountered the following message when I try plm function to estimate an random model with individual effect.
data.re.ind <- plm(X.RETURN. ~ IOB + IOBS,data=E,model="random",effect = "individual")
Error in swar(object, data, effect) : the estimated variance of the individual effect is negative
2009 Aug 21
1
Panel Data Analysis (PLM) - Fixed Effects - "cannot allocate vector of length"
Hello to all on the list,
I'm trying to estimate a fixed effects model from a large (unbalanced) panel
data set.
I have no problems when using only an individual effect or only a time
effect, but I get an error message when I try for a "twoways" effect. Here
is some of the code:
paneldata27 is the entire panel data set:
> dim(paneldata27)
[1] 1178831 8
>
2018 Jan 27
0
plm empty model error (data is linked)
Hi,
I am trying to estimate a two-way model with both individual and time fixed
effects. I am using plm with "twoways" specification.
plm(as.integer(yvar) ~ xvar, index = c("id", "time"), model="within",
data=dataset, effect = "twoways")
But I get keep getting the following message and I don't know what to do
about it, because I don't
2013 Apr 01
1
plm: Hausman Test error
Hi, I am trying to run a panel regression using 88 observations and 9
variables. In-built Hausman Test did not work, then I found a code for
auxiliary regression method for the Hausman test.
The panel models are:
fe=plm(gd ~ l+g+o+c+g1+h+n+r, model = "within", data = new.frame,index =
c("id"))
re=plm(gd ~ l+g+o+c+g1+h+n+r, model = "random", data = new.frame,index =
2012 May 03
0
error in La.svd Lapack routine 'dgesdd'
Dear Philipp,
this is just a tentative answer because debugging is really not possible
without a reproducible example (or, at a very bare minimum, the output
from traceback()).
Anyway, thank you for reporting this interesting numerical issue; I'll
try to replicate some similar behaviour on a similarly dimensioned
artificial dataset when I have some time (which might not be soon). As
for now,
2010 Mar 29
1
plm package duplication problem
hi,
i am writing my master thesis and i am dealing with 146474 observations
(panel data), i have just learned the R so i am a beginner!!
i am trying to use the "plm" package and i have a duplication problem;
i have written the following commands to read my data and create my model
>dsn<-plm.data(ds, c("stno", "year")) ds=name of my data, stno=individual
2012 Mar 08
1
Panel models: Fixed effects & random coefficients in plm
Hello,
I am using {plm} to estimate panel models. I want to estimate a model that
includes fixed effects for time and individual, but has a random individual
effect for the coefficient on the independent variable.
That is, I would like to estimate the model:
Y_it = a_i + a_t + B_i * X_it + e_it
Where i denotes individuals, t denotes time, X is my independent variable,
and B (beta) is the
2011 Nov 22
0
Unexpected result with lag() et diff() in plm package.
I didn't see you got an answer posted to this question:
You can't modify a pdata.frame object. Your transforms turn it back to a normal data frame and diff and lag won't work as expected.
Try:
Grunfeld.p <- pdata.frame(Grunfeld,c("firm","year"))
tmp <- transform(Grunfeld.p, d.value = diff(Grunfeld.p$value,1))
tmp <- cbind(tmp, l.value =