R package primarily concerned with panel data. Package contains a set of estimators and tests for panel data.
Questions tagged [plm]
510 questions
2
votes
1 answer
How to cluster standard error in clubSandwich's vcovCR()?
I'm trying to specify a cluster variable after plm using vcovCR() in clubSandwich package for my simulated data (which I use for power simulation), but I get the following error message:
"Error in [.data.frame(eval(mf$data, envir), , index_names) :…

Yuki Takahashi
- 45
- 7
2
votes
0 answers
"Non-unique values when setting 'row.names'" - when generating panel data frame
I'm attempting to run a random effects regression on panel data, but i receive the error message:
Error in .rowNamesDF<-(x, value = value) :
duplicate 'row.names' are not allowed
In addition: Warning message:
non-unique values when setting…

RAFrancais
- 57
- 4
2
votes
0 answers
R spml and plm: why is there an intercept in spatial fixed effects?
I am comparing a spatial panel autoregressive model with a panel regression without spatial terms. For both models I estimate individual fixed effects. I was surprised that the spml package outputs the fixed effects with an intercept term. This is…

user436994
- 601
- 5
- 15
2
votes
1 answer
r plm time and individual fixed effects - "twoways" vs. factor(index) time
I have an unbalanced panel with weekly data and want to do a panel regression with both, individual and time fixed effects.
Following the code in https://www.princeton.edu/~otorres/Panel101R.pdf my code looks like this:
tfe <- plm(y ~ x1 + x2 +…

whlmsbrg
- 23
- 3
2
votes
0 answers
R: pwfdtest (plm package) produces error message
I used a fixed effects and a first difference estimation. To decide which is more efficient Wooldridge proposes a specific test that is incorporated in the plm package via the following function:
pwfdtest(Y~X1+X2+..., data=...)
However, running…

barnari
- 21
- 2
2
votes
1 answer
R plm lag() ignores panel structure
I want to create lags of a variable. In a panel data setting, obviously lags are only considered within each panel.
How come that plm's lag() does not respect the panel structure (by default) and is there a way to change that (without manually…

safex
- 2,398
- 17
- 40
2
votes
1 answer
R: difference between plm and LSDV model
I'm just starting to wrap my head around fixed effects so apologies if the questions are redundant.
Based on the Panel101 slides by Oscar Torres-Reyna (https://www.princeton.edu/~otorres/Panel101R.pdf), I am comparing the output of two different…

M.Power
- 23
- 4
2
votes
0 answers
Large panel data regression with R
I'm trying to perform a panel data regression that accounts for fixed effects with the PLM package in R. However, PLM doesnt seem to be able to handle data with a size of almost 4 million observations and 20 control variables.
Are there other R or…

krenova
- 111
- 1
- 5
2
votes
2 answers
Extract individual coefficients from plm model (R)
I would like to ask if it is possible to extract coefficients for individual observations for a given variable in panel data using plm in R, for instance using the example data:
wi <- plm(inv ~ value + capital, data = Grunfeld, model = "within",…

Martin Hulényi
- 55
- 8
2
votes
1 answer
Panel data fixed effect issue with R, I don't see my all dummy variables in the summary
I'm running a data panel regression with R.
I use those data(sheet 2).
I want to use a fixed effect for my panel data. Please, find below the code for my fixed effect
FE_1 <- plm(GDP_per_capita_growth ~
log(GDP_per_capita) + GF_GDP +…

elmanito
- 35
- 1
- 9
2
votes
1 answer
three dimensions in plm packadge
This is a follow-up question related to this post, which in my opinion has not resolved the issue.
So I repeat the data
============================================
year | comp | count | value.x | …

msh855
- 1,493
- 1
- 15
- 36
2
votes
2 answers
Setting ID in a pair-wise panel data
I am working with bank-firm level lending panel data (i.e. loans from a group of banks to a group of firms for a country are recorded at a monthly frequency).
I want to conduct panel data FE regression. However, to conduct FE, it is required that I…

Pranav Garg
- 31
- 3
2
votes
1 answer
plm vs lm - different results?
I tried several times to use lm and plm to do a regression. And I get different results.
First, I used lm as follows:
fixed.Region1 <- lm(CapNormChange ~ Policychanges + factor(Region),
data=Panel)
Further I used plm in the following way:…

Sarah8888
- 23
- 1
- 5
2
votes
1 answer
plm-package ID-YEAR Clustered Standard Errors
I was looking for a way to do clustered standard errors based on ID-Year clusters (each ID-Year combination gets treated like a new cluster). I found that no such functions exist for plm objects, but I had an idea and I would like to know whether it…

Jan Felix
- 117
- 9
2
votes
1 answer
How to deal with NA in index for Panel data
I want run regression in panel data. There is NA in my index (ID,time). I do not want to delete NA in index.
Result<-plm(TBL~Tang+Prof+LnSALES+MB,data=Panel,model="within",index=c("Firms","Time"))
When I the above code, it returns:
at least one…
user8922408