All Questions
71
questions
0
votes
1
answer
43
views
Gaps between investment types. Detecting patterns
I want to count gaps between investment types in my panel data. For example, I know when a firm invested positively, negatively or was inactive. What I would like to do is to sum up number of years ...
0
votes
0
answers
12
views
Fixed-effects interval-data regression model
xtintreg fits a random-effects regression model in which the dependent variable may be measured as point data, interval data, left-censored data, or right-censored data. Is there any command or way to ...
0
votes
0
answers
24
views
Interpreting Coefficients in 2SLS Model
I am currently working on a 2SLS model where I instrumented the logarithm of per capita transfers with the unemployment rate from each country that the transfers originate from (also taking logarithms—...
0
votes
0
answers
44
views
panel regression with country group year fixed effects
For my research, I need to do multiple FE with panel data.
the dependent variable is group-level, Independent variables is country level.
So I tried
reg y x i.group i.country i.year
The response was ...
-1
votes
1
answer
40
views
Create a year variable to establish a panel variable-
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 ...
0
votes
0
answers
84
views
xtsktest - overwriting the input model
I am working with panel random effect models and I need to perform Galvao test to check the normality of residuals (even if I am aware that normality shouldn't be an issue as explained by Professor ...
-1
votes
1
answer
156
views
Reshape data from wide to long (Creating Panel Data)
I downloaded data from data stream Refinitiv. The data is in wide format which resulted in too many variables (761). I only want to form 8 variables.
How can I do that in Stata?
enter image ...
0
votes
1
answer
23
views
Keeping first event between two ID groups in Stata
I am trying to keep the first event between two ID groups in Stata as well as the rest of the events.
ID1 ID2 Event Year
1 2 1 2021
1 2 1 2022
2 3 1 2021
2 3 1 2022
2 ...
0
votes
0
answers
39
views
Panel Dataset and Correlation - Stata
I have a panel dataset and I am having trouble using the correlation command to get the correlation between variables. Can anyone provide a code for Pearson goodness of fit correlation with a panel ...
-2
votes
1
answer
1k
views
How can I create a month year variable?
I have monthly trade data from Jan 2002 to Dec 2013. But these are string variables. I want to create a month year time variable in Stata from 2002m1 to 2013m12. How can I do this?
I have tried using ...
1
vote
1
answer
119
views
Origin Destination Variables Stata
I am working on a panel data with observations for all the US states for years 2000-2018. My goal is to analyze migration flows across all the states. I need to create Origin-Destination pairs for my ...
0
votes
1
answer
37
views
Stata: Transposing data rows duplicated to column
I am trying to rearrange the identification data (ID) that is duplicated. Each ID is duplicated, because the person uses more than one drug type.
Each code represents the name of the drug and in each ...
0
votes
0
answers
113
views
Stata Create panel dataset with two dataframes, no common variable
I am creating a city-by-day panel from scratch, but I'm having trouble balancing and filling in the data. Every city needs to have an observation every day between 01jan2000 and 31dec2019, my variable ...
0
votes
1
answer
82
views
Tracking changes per observation in a continuous variable
I am trying to evaluate a property tax policy that was introduced in a U.S county, where properties over a threshold (i.e. 500 square meters) faced a higher property tax rate than those below the ...
0
votes
0
answers
44
views
Panel data mean exposure
I have panel data with date of birth (dt_birth), date of conception (dt_conception), gestational length (weeks_gestation and days_gestation), and daily exposure to smoke. The exposure is aligned with ...