plm Questions

4

Solved

Is it possible to do regressions in R using a panel data set with a binary dependent variable? I am familiar with using glm for logit and probit and plm for panel data, but am not sure how to combi...
Condescending asked 10/5, 2010 at 15:36

2

Solved

Let's consider model : library(plm) data("Produc", package = "plm") model <- plm(pcap ~ hwy + water, data = Produc, model = 'within') To calculate fitted value of the model ...
Sciurine asked 13/1, 2021 at 13:6

1

Solved

Is it ok to run a "plm" fixed effect model and add a factor dummy variable in R as below? The three factors "Time", "Firm” and "Country" are all separate indices ...
Archiplasm asked 25/1, 2022 at 1:22

2

Solved

Is there an easy way to do a fixed-effects regression in R when the number of dummy variables leads to a model matrix that exceeds the R maximum vector length? E.g., > m <- lm(log(bid) ~ af...
Apiarist asked 1/3, 2010 at 12:32

1

Solved

I would like to extract the log likelihood from a plm object. It works fine when using the logLik function from the base stats package with either felm from the lfe package or feols from the fixest...
Aeolipile asked 3/10, 2020 at 15:19

3

Solved

This is a very simple question, but I haven't been able to find a definitive answer, so I thought I would ask it. I use the plm package for dealing with panel data. I am attempting to use the lag f...
Lacunar asked 23/10, 2012 at 19:3

4

Solved

I have a panel data set in R (time and cross section) and would like to compute standard errors that are clustered by two dimensions, because my residuals are correlated both ways. Googling around ...
Occultation asked 5/12, 2011 at 18:12

1

Solved

I'm trying to run a fixed effects regression using the plm package. The regression code is as following: fixed = plm(hp~crime,index=c('year','country'),data=data,model='within') which returns th...
Cedeno asked 7/5, 2020 at 14:21

5

Solved

I have a small N large T panel which I am estimating via plm::plm (panel linear regression model), with fixed effects. Is there any way to get predicted values for a new dataset? (I want to estimat...
Canice asked 19/8, 2011 at 14:28

2

I have a plm object created using: require(plm) plm1 <- plm(Sepal.Length ~ Petal.Length + Petal.Width, data = iris, index = "Species") I'm trying to extract the residuals to manually calculat...
Hyperaesthesia asked 4/8, 2014 at 21:27

3

So I am running a fixed effects model using the plm package in R, and I am wondering how I can compare which of two models are more suitable. For example, here is the code for two models I have c...
Beelzebub asked 5/2, 2015 at 0:43

1

Solved

Here I have temperature time series panel data and I intend to run piecewise regression or cubic spline regression for it. So first I quickly looked into piecewise regression concepts and its basic...
Orvie asked 13/6, 2018 at 14:11

3

Solved

How do I customize the goodness of fit (gof) in a texreg call? I have some plm models I want to display, but I only get "Num. obs.", "Adj. R^2", and , "R^2" (see working example below). I would ho...
Cupp asked 24/5, 2018 at 11:0

1

Solved

Can I specify a Random and a Fixed Effects model on Panel Data using lme4? I am redoing Example 14.4 from Wooldridge (2013, p. 494-5) in r. Thanks to this site and this blog post I've manged to d...
Pansie asked 28/2, 2018 at 15:24

4

Solved

Please note: I am trying to get the code to work with both time & individual fixed effects, and an unbalanced dataset. The sample code below works with a balanced dataset. See edit below too, ...
Monogamy asked 6/10, 2013 at 14:2

0

When estimating the pooled model using the plm package using this syntax I get an R2 that is nearly 0.8. library(plm) data <- employmentsez data$lfirms2 <- data$lfirms*data$lfirms data$sezna...
Multilateral asked 21/11, 2017 at 15:9

2

I have a balanced panel data set, df, that essentially consists in three variables, A, B and Y, that vary over time for a bunch of uniquely identified regions. I would like to run a regression that...
Architectonic asked 26/4, 2017 at 14:13

1

Thank you all in advance for your help. My question is essentially a "bump" of the following question: R: plm -- year fixed effects -- year and quarter data. Basically, I was wondering if there is...
Ellora asked 1/3, 2015 at 3:29

1

Solved

I have a dataframe ('math') like this (there are three different methods, although only one is shown) - dataframe I am trying to create a multi-level growth model for MathScore, where VerbalScore ...
Kraus asked 15/7, 2017 at 19:7

2

Solved

My data frame looks like something as follows: unique.groups<- letters[1:5] unique_timez<- 1:20 groups<- rep(unique.groups, each=20) my.times<-rep(unique_timez, 5) play.data<- data...
Foxtail asked 13/4, 2015 at 6:8

3

Solved

I am trying to estimate a panel dataset with an interaction term for geographical areas (LoadArea, DischargeArea) which signifies a route. Using the fixed effects specification, it does not like th...
Unclose asked 23/5, 2013 at 15:57

1

I am estimating Fama-Macbeth regression. I have taken the code from this site fpmg <- pmg(Mumbo~Jumbo, test, index=c("year","firmid")) summary(fpmg) Mean Groups model Call:...
Nightcap asked 25/5, 2016 at 15:13

2

Solved

I'm trying to run a regression in R's plm package with fixed effects and model = 'within', while having clustered standard errors. Using the Cigar dataset from plm, I'm running: require(plm) requ...
Ralphralston asked 15/10, 2015 at 18:13

2

I've created two regression models using a linear panel model with plm, and a generalized panel model using poisson with the pglm package. library(plm); library(pglm) data(Unions) # from pglm-pack...
Territorialism asked 12/8, 2015 at 0:13

1

Solved

When I run a cluster standard error panel specification with plm and lfe I get results that differ at the second significant figure. Does anyone know why they differ in their calculation of the SE'...
Billfold asked 8/5, 2015 at 5:0

© 2022 - 2024 — McMap. All rights reserved.