similar to: Fixed effects using Within transformation in PLM package

Displaying 20 results from an estimated 10000 matches similar to: "Fixed effects using Within transformation in PLM package"

2018 Feb 20
1
"Within" model in plm package: is the reported R-squared correct?
Hi everyone, I am doing panel data analysis using the 'plm' package. However, I have noticed that the plm() function reports a different value of R-squared from the R-squared of the lm() function with time-demeaned data. To be clear, I have tried to compute the within model both manually (run an OLS regression with time-demeaned data using lm()) and by using plm(). The two methods give me
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
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 >
2010 Feb 04
1
plm issues: error for "within" or "random", but not for "pooling"
Dear all I am working on unbalanced panel data and I can readily fit a "pooling" model using plm(), but not a "within" or "random" model. Reproducing the examples in vignette("plm") and in the AER package I encountered no such issues. ##unfortunately I cannot disclose the data, and it is too big anyway > dim(ibes.kld.exp.p[x.subs , ]) [1] 13189 34
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 =
2012 Apr 26
1
PLM package PGGLS strange behavior
When using the PLM package (version 1.2-8), I encounter the probem that calling the FGLS estimator evokes strange behavior, when choosing the "random" effects model. After calling the PGGLS function to estimate FGLS, PLM gives me a warning, stating that the "random" model has been replaced with the "pooling" model. I would, however, really like to estimate the random
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 May 24
1
Fixed Effects Estimations (in Panel Data)
dear readers---I struggled with how to do nice fixed-effects regressions in large economic samples for a while. Eventually, I realized that nlme is not really what I needed (too complex), and all I really wanted is the plm package. so, I thought I would share a quick example. ################ sample code to show fixed-effects models? in R # create a sample panel data set with firms and years
2013 Sep 04
2
Attribute Length Error when Trying plm Regression
Hello, I am trying to run a fixed effects panel regression on data containing 5 columns and 1,494 rows. I read the data in as follows: >drugsXX<-read.csv(file="C:\\Folder\\vX.X\\Drugs\\drugsXX_panel.csv", head=TRUE, sep=",") Verified it read in correctly and had a good data.frame: >dim(drugsXX) [1] 1494 5 >drugs XX produce expected data with correct column
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 Jan 04
1
plm random effect: the estimated variance of the individual effect is negative
Matteo, I fully agree with David: please read the posting guide. Anyway, the error message says it all: "the estimated variance of the individual effect is negative". See e.g. the "basic panel" chapter (10 or 11) in Wooldridge's "Econometric Analysis of XS and Panel Data" to understand why this may happen. Stata's behaviour is (as far as I remember) to
2009 May 08
1
plm: plm.data vs pdata.frame
Hello, I am trying to use the plm package for panel econometrics. I am just trying to get started and load my data. It seems from most of the sample documentation that I need to use the pdata.frame function to get my data loaded. However, even after installing the "plm" package, my R installation cannot find the function. I am trying to follow the example in plmEN.pdf (
2009 Aug 03
1
plm summary error
Dear "plm"-Package insiders, [I posted the following observation is April already but unfortunately I am not aware of any answers. With the hope that someone found an answer in the mean time, I ask again:] I realized the following difficulty with the summary.plm function (demonstrated with the example from the ?plm documentation). library(plm) data("Produc",
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 Apr 25
2
plm Hausman-Taylor model
Dear all- I am have trouble in using the model="ht" option in function plm from the plm library. I am using Package: plm Version: 1.1-1; R version 2.8.1 (2008-12-22) running on a FC-8 linux machine. Here is what I am trying to do: ##---------------------------------------------------------------------------- R> ###Prob 6 Chapter 3 Use R! Applied Econometrics with R (Kleiber
2009 Jul 09
2
plm Issues
Hi List I'm having difficulty understanding how plm should work with dynamic formulas. See the commands and output below on a standard data set. Notice that the first summary(plm(...)) call returns the same result as the second (it shouldn't if it actually uses the lagged variable requested). The third call results in error (trying to use diff'ed variable in regression) Other info:
2006 Nov 22
1
problem with the plm package
Hi all, I have a problem in installing and using the plm package using R 2.2.0 on windows xp. I installed it from a .zip file downloaded from the CRAN. Apparently everything is ok: > utils:::menuInstallLocal() package 'plm' successfully unpacked and MD5 sums checked updating HTML package descriptions However, when I try to load it: > library(plm) Errore in lazyLoadDBfetch(key,
2011 Feb 10
1
Longitudinal Weights in PLM package
Hi all, I a semi-beginner with R and I am working with the plm package to examine a longitudinal dataset. Each individual in this dataset has a longitudinal weight for the probability that he or she remains in the sample. Unfortunately, I have not found an argument to use weights in the plm function? I tried ?weights=? like in standard lm or in nlme or lm4 but it does not work. I asked the
2011 Sep 22
0
corrigendum on fixed effects and R2 in within models
Dear list, dear Cecilia and Daniel, sorry for coming in ten days late, I've been very busy lately so I came across this email only today. This is just to make some points clearer re: fixed effects and r2 in package 'plm', to both you and the list. In particular, to make you aware of some additional features. Please see my comments below, with '##'. Best, Giovanni
2011 Nov 21
1
Problems using log() in a plm() regression.
hey guys I have a panel data set that i want to perform some regressions on. I am using the /plm/ package. I defined a model in the following way: PWBw.pool <- plm(*PWB* ~ log(*I_EQON*) + log(*RD*) + ... + *PAGRI*, data = pfem, na.action=na.exclude, model="pooling") When i run this it gives the following error (the error remains when i use other model = "" specifications