All Questions
387
questions
0
votes
0
answers
33
views
Pseudo-panel in R based on multiple variables
I have cross-sectional data (for four different time periods) and I am trying to create a pseudo-panel based on four different variables. However, after trying the code (see below) I get more ...
-1
votes
0
answers
43
views
making panel out of waves in R
I have 13 waves of dataset. I standardised the col names so that all matches. Currently, I try to make a panel dataset having the col of pidp as the identifier col and also I added wave col to ...
0
votes
1
answer
76
views
Clustered/Robust standard errors in R
I am estimating an OLS regression without fixed effects and an OLS regression with fixed effects in R Studio. I have read, that it is common to use robust standard errors, when estimating a simple OLS ...
0
votes
1
answer
77
views
Echarts4r in programmatically created tabsets in quarto not rendering?
Taking the example in this How to programmatically generate tabset-panel in quarto?, I have established rendering charts in dynamically rendered tabsets.
I am hoping to replace the ggplots with ...
1
vote
1
answer
39
views
Remove group of specific rows in panel data when multiple columns contain NA
I have a balanced panel data set df with columns:
id, time, var1, var2, var3, var4....
Some values in var1 and var4 contain Na elements.
If they contain the NA element, I want to remove all the ...
0
votes
0
answers
23
views
How to estimate alpha and beta for beta-distribution in to run pglm regression
I am trying to run a fixed-effects regression model on panel data in R. My dependent variable (the share of workers on long-term contracts) is bounded from 0 to 1, and I use the pglm package. The ...
1
vote
1
answer
25
views
Creating a new row in a longitudinal dataset
I have a longitudinal dataset in R comprising several countries observed over multiple time points. Let's simplify things and consider the following example
set.seed(123)
df=data.frame(Country=c(rep(&...
0
votes
0
answers
34
views
How to do nested and non-nested panel model comparisons?
I am trying multiple panel models based on the identical dataset, which is large with 265,904 observations.
Let's say I am comparing Table 4's models (1), (2), and (3).
Table_4_1 <- plm(DV ~ X1 + ...
2
votes
1
answer
71
views
Extrapolating in R using growth rates from another column (using dplyr)
I am trying to extrapolate forwards for missing values after the last non-missing value in a series using the growth rate given in another column.
This is a toy example below. My data is grouped ...
0
votes
2
answers
90
views
ratio with a reference value by ID and year using R
I have a panel data with fields - ID, Value, Year, Qtr. I need to compute a ratio field for each ID by dividing the current period value with the starting period value. So, for ID = 1, the ratio would ...
0
votes
0
answers
33
views
panel.abline on "lattice plot in Shiny" got error
I don't know very well about lattice but I know here the openair::timePlot function call lattice.xyplot to plot time series of pollutant concentrations .
('timePlot','selectByDate' functions and ...
0
votes
1
answer
73
views
How can I create panel dataset with transaction data using plm package in R?
I want to do panel regression R and use multiple fixed effects.
I am trying to construct panel dataset first by using pdata.frame function, but I am not sure whether I am doing it right.
I have trade ...
0
votes
1
answer
61
views
Add a column with lagged (or differenced) value in panel dataset for Panel Local Projection in R
I want to use the Panel Local Projections method in R, using the "lpirfs" package and particularly the "lp_lin_panel()" command. However, I suspect my shock to be endogeneous so I ...
0
votes
0
answers
68
views
How use fixed effect in a probit panel regression with r
I'd like to estimate the factors that determine the development of heating networks in French municipalities. To do this, I use various variables (population density, age of dwelling, ideology of the ...
0
votes
1
answer
33
views
Count the number of people with condition using panel data in R version 3.6
I have panel data similar to the below where there are multiple rows per patid. I would like to create a fourth column that equals 1 if the patid has a least one event_date before as well as at least ...