Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
44 views

I am trying to create a indicator variable for panel data flagging "on/before" a certain year and "after". Trying both "ifelse" and "case_when" approaches, I do ...
Va Nee L. Van Vleck's user avatar
0 votes
0 answers
27 views

Here is a dataset I want to run Pesaran's panel unit root test using the cipstest function in the plm library. It keeps giving me the error "x and y lengths differ", and I cannot sort this ...
Jose Luis Iparraguirre D'Elia's user avatar
2 votes
1 answer
62 views

I've recently encountered a problem with predict() function for plm regression that uses AR(1) term in form of lag(). Here is an toy example: 3 countries, 3 periods, current population as a function a ...
user19957's user avatar
1 vote
1 answer
37 views

Below is a small sample of my database. As you can see, there two units (3100104 and 3100203) and a variable X that is numerical, assuming values in 2010 and 2011. The problem is that I need to ...
RandomWalker's user avatar
0 votes
1 answer
63 views

I made up some dummy data that has a very similar structure as our internal data I cannot share. I would like to know how to prepare it for the Cox Regression. Could you help me to pre-process the ...
Lubomir Burian's user avatar
0 votes
1 answer
62 views

I am trying to run a plm panel fixed effects model. The panel index runs at the county-year level. The challenge? I want to run fixed effects at the (higher order) state level. I can easily program ...
YouLocalRUser's user avatar
0 votes
0 answers
30 views

I want to run a fixed effect regression with net migration being the response and gini index a predictor. I add some control variables. The data is from WDI. Because the response in the data set has ...
user24820468's user avatar
0 votes
2 answers
61 views

I have a panel dataset in R that documents the percent change in population for cities over several years. A simplified version looks like this: city_pop<-tibble(city=c("NYC", "NYC&...
James Rider's user avatar
1 vote
1 answer
172 views

I'm trying to use Panel for the first time in Jupyter Notebook. I've pip installed it and trying to just run in my python environment: import panel as pn however I get this error: ValueError: Missing ...
13johs's user avatar
  • 23
1 vote
0 answers
40 views

rm(list=ls()) library(quantreg) library(SparseM) library(stats) rq.fit.panel <- function(X,y,s,w=c(1),taus=0.30,lambda = 0){ # prototype function for panel data fitting of QR models # the ...
Bastony004's user avatar
1 vote
1 answer
45 views

This question is based on a previous answer Stata: Number of overlapping days within multiple date ranges that has (mostly) helped me. I want to calculate the number of overlapping days within ...
EETal's user avatar
  • 11
1 vote
2 answers
90 views

I have data from the WIND terminal with the data structured in rows (even time series information) For example: Ticker Company Name NetProfitGrowth2009 NetProfitGrowth2010 I believe in order to ...
Kirill Vengerov's user avatar
0 votes
1 answer
656 views

I want to estimate a fixed effects model (with both country- and year fixed effects) and ADDITIONALLY apply HAC standard errors. Although I didn't get any error message after running the following ...
TFT's user avatar
  • 251
3 votes
0 answers
431 views

I'm trying to get the indirect effects of the mediation variables m1, m2, and m3 in my dependent variable "y". But also considering the effect of the independent variable "iv" on ...
Adriana Castillo Castillo's user avatar
1 vote
1 answer
132 views

ID Time Condition Seq Want_temp Want_final_v1 A 1 yes 0 0 0 A 2 yes 0 . 1 A 3 no 1 . . A ...
Todd's user avatar
  • 439
1 vote
2 answers
67 views

I am trying to run the following model of GDP on population: GDP_(i,t) = alpha + beta*Population_(i,t) + epsilon Here, each variable is indexed by time (t) and country (i). I have a panel dataset df1 ...
James Rider's user avatar
1 vote
1 answer
81 views

I am trying to run a two-way fixed-effects panel regression using plm in R. First, I randomly generate some data. Then I create time and firm indices (two-way indexing as usual in a panel dataset) and ...
Richard Hardy's user avatar
0 votes
1 answer
121 views

I am trying to use Entity fixed panel regression for my data set. I have cross sectional data for each county in the US and for 1971 to 2020 (yearly). I have two indices: STCTID which is county ID and ...
lsr729's user avatar
  • 854
0 votes
0 answers
125 views

I want to make predictions of how many mail postards are sent daily in every post office in my city. The problem seems easy, but I want to predict how many postcards are sent in each office and what ...
Imanol's user avatar
  • 58
1 vote
1 answer
147 views

What is the difference of pmg and pcce function in package plm? Details of both is almost same in the description. I wanted to perform mg, pmg and CCE mg test on panel data using plm function. I ...
Sunil Gaur's user avatar
0 votes
2 answers
193 views

I would like to create a new variable sales.T.minus.1 which will present the value of sales from year - 1. I created a replicable example below: library(plm) library(dplyr) data <- pdata....
Viktor's user avatar
  • 15
0 votes
0 answers
157 views

I am trying to model the following interrupted time series model: y = b0 + b1*time + b2*event + b3*time_since_event The data, however, is nested inside users (id). Currently, I have the following ...
SanMelkote's user avatar
0 votes
1 answer
65 views

I am trying to calculate the idiosyncratic skewness for different funds in a panel data. Basically, I hope to regress the daily returns of a fund on the market return and the squared market return to ...
Billsyd's user avatar
  • 25
-1 votes
1 answer
242 views

Imagine we have multiple time-series observations for multiple entities, and we want to perform hyper-parameter tuning on a single model, splitting the data in a time-series cross-validation fashion. ...
Slash's user avatar
  • 581
0 votes
0 answers
64 views

I have two panel data sets that are mergeable. However, I have to create bins of time as both data sets are highly imbalanced and have highly variable measurement occasions. One approach is the ...
Saul Alamilla's user avatar
0 votes
1 answer
51 views

New R user here. I have a relatively large panel of countries, and I want to identify recession episodes. labor_pivoted_crisis=labor_pivoted%>% group_by(country)%>% mutate(crisis=ifelse(...
CF96's user avatar
  • 87
-1 votes
1 answer
48 views

I have 3 variables in Stata that I want to make into a panel variable, f4hi. Currently, they are called f4hi97, f4hi98, and f4hi99. I want to pull the last two digits from these to create a separate ...
Ivey's user avatar
  • 1
0 votes
1 answer
720 views

I'm trying to run a Spatial Durbin Model for a spatial panel data. My idea is to run the dependent variable y over my independent variables x1 and x2. I've tried so many options but all of them give ...
Adriana Castillo Castillo's user avatar
1 vote
2 answers
79 views

I want to create a pair-wise average of price of commodities produced by countries. My data looks like this df <- data.frame(country = c("US; UK; FI", "CN; IT; US; GR", "...
SK5123's user avatar
  • 15
0 votes
0 answers
50 views

We use a data generating process to create a panel data set and now we want to include a lagged variable and see the effect of the bias for different time periods. The data for the first year of the ...
George's user avatar
  • 31
0 votes
1 answer
159 views

When I run the code: from linearmodels.panel import PanelOLS, PooledOLS from linearmodels.panel import EntityEffects, TimeEffects I get the error: ImportError: cannot import name 'EntityEffects' from ...
pyRbegginer's user avatar
0 votes
0 answers
94 views

I am currently trying to export a panel dataset in R to a CSV file. When exporting I receive the following error message in R: Error in `is.data.frame()`: ! Can't recycle `value` (size 6) to size 4. ...
FaFe's user avatar
  • 1
0 votes
0 answers
42 views

I am struggling to write a code that first identifies coworker flows between two firms, and secondly creates a variable for mergers if the overlap is greater than 50%. Unfortunately, I only have firm, ...
alihfl's user avatar
  • 1
2 votes
0 answers
132 views

I am dealing with fixed-effects regressions in R using the fixest package. Let's suppose I want to estimate something super simple as $$ Y_{i, t} = \alpha + \beta X_{i, t-1} + u_{i, t} $$ So I want to ...
Raul Guarini Riva's user avatar
1 vote
1 answer
696 views

I encounter a problem with the reporting of heteroscedasticity-robust standard errors for a panel data regression (plm) in the output with modelsummary. For a simple linear regression the reporting ...
ArN's user avatar
  • 53
0 votes
1 answer
95 views

I try to use linear programming in Mata. I would like to assign an education category (z,s,v = low, middle, high) to each individual according to probabilities obtained previously by odered probit. I ...
Katarina V's user avatar
0 votes
0 answers
144 views

I have a panel dataset with countries, date and two columns with other data (inflation rate and payments from a specific program). What I want is to aggregate the data from monthly into quarterly data ...
john's user avatar
  • 17
0 votes
0 answers
68 views

I'm trying to run a regression in R and I want to control the fipsmerg variable by factors but R gives me a memory error. input: myprobit <- glm(a_imt~a_imt_1+totpop+reltrad_1+reltrad_2+reltrad_3+...
Tiago Santos's user avatar
0 votes
1 answer
29 views

I have a fix effects model like this: Indeksy <- updata.frame(PiS, index = c("Rok","Powiat"))) fixed_effects_model_05_07 <- plm(Logarytm_Wynik_Wyborczy_05_07 ~ ...
Viktor's user avatar
  • 15
0 votes
1 answer
95 views

I have a panel data: Date ID Value Mon A 10 Tue A 11 Wed A 15 Thu A 12 Mon B 11 Tue B 13 Wed B 12 Thu B 13 Mon C 14 Tue C 10 Wed C 13 Thu C 12 I would like to create a new column that whihc is the ...
Mining's user avatar
  • 115
0 votes
0 answers
124 views

I´m spending a lot of time trying to set my panel data. Everytime that I run the following command df.set_index(['id', 'datas'] I have the message that "None of ['id', 'datas'] are in the ...
Marcel's user avatar
  • 3
0 votes
0 answers
70 views

I have a dataset that contains four different countries and measures child labor and other characteristics. I have one dataset that already contains rounds 2, 3, and 4 (OC234) merged together (thanks ...
pure24's user avatar
  • 19
0 votes
0 answers
39 views

I am trying to create panel data set by joining Table 1 and Table 2 Table 1 Table 2 The output I would like to receive is that I will have 4 columns: Powiat | Rok | Liczba bezrobotnych | Srednie ...
Viktor's user avatar
  • 15
0 votes
0 answers
252 views

I'm asking about the estimation of direct, indirect, and total effects of spatial durbin panel data modeling. As far as I know, there is no direct package of doing the estimations. So I generate the ...
Chen Luo's user avatar
0 votes
1 answer
71 views

I have a panel dataset in R, which includes observations per group over time (month). The following dataframe is a snapshot of the complete dataframe: df <- data.frame(group = c(1, 1, 1, 1, 1, 1, 1,...
tobibow's user avatar
  • 11
0 votes
0 answers
499 views

I have a panel dataset and I want to test cointegration between 2 variables. I cleaned the missing values and set my data frame as required but I don't know how to interpret the results/ outcome from ...
user22314791's user avatar
0 votes
1 answer
110 views

I have to conduct a panel analysis for Euro area countries. I have an excel dataset for all the 20 countries in the Euro Area for the years starting from 1995 to 2022 for the HCPI, the final aggregate ...
Jfel's user avatar
  • 21
0 votes
3 answers
700 views

I have a panel data: Panel Data set - gravity model international trade My R code: #importing dataset df <- read_excel("DataSet_Final.xlsx", col_types = c(&...
0klahoma's user avatar
0 votes
0 answers
93 views

I have a question about an analysis I want to perform with panel data with three levels. Am i correct if because it's panel data, plm() (from package plm) would be more appropriate, however it does ...
Sophie's user avatar
  • 1
0 votes
1 answer
245 views

In R I have a table "education": enter image description here (my full table is much larger, it has more countries, indicators and years I need to use panel regression in R to verify the ...
Agnieszka Kowalska's user avatar

1
2 3 4 5
18