collapsing on one variable without losing columns
hi all! i am working off of a data set of wind turbines, and i want to turn it into a dataset of wind farms. basically, anything with the same p_name and same number of turbines (p_tnum) should become...
View ArticleRobust errors with industry + time clusters
Dear Stata community, i have a sample of 146 units that are nested within 108 firms and 131 dates, hence the OLS cross-sectional residuals may be non-independent. In the OLS, the parameter estimates...
View ArticleEvent Study Interpretation
I am using an panel event study method for my dissertation and wish to confirm the interpretation. My panel spans from 2000-2023 and the treatment year is 2014, with 2013 being dropped as the base...
View ArticleROC curves line too thick to distinguish clearly
Dear all, I am doing ROC curves with the following code in STATA 18. However, the lines are too thick to clearly distinguish the curves. I wanted to use something like vthin but I get a mismatch...
View ArticleLabes for coefplot with multiple _at:
Hi all, I'm trying to produce a coefplot with multiple _at:s while keeping the variable labels in the coefplot. Is there a way to do this without needing to specify each coeflabel by hand? Since I get...
View ArticleOverlaying graph produced by roccomp and twoway commands
Hello, can we overlay a graph produced by roccomp and twoway? I have the following graphs, and I would like the points on the two-way scatter plot to appear on the ROC curve graph. Here are the codes...
View Articlepostestimation with marginal effects
Hello Everyone, I am having some trouble making clean graphs to visualize my marginal effects estimation. Here's my code and output so far: Code: mlogit pref_occupation i.ownoccupation i.src i.online...
View Articlegraph dot axis not stretching properly
I've seen this now with a bunch of different schemes--it seems to be better in some schemes than others, but it's bad in all of them I have tried (plotplain, 538w, and s2color, I don't like s2color but...
View ArticleTime fixed effects in Cox proportional hazards model
Hi, I was wondering if it's possible to include year fixed effects in a Cox proportional hazards model with time-dependent covariates using an individual-year panel dataset?
View Articlehelp in user-defined dimension+level in collect command
Hi, anyone knows if it is possible to add user-defined dimension+level to play to incorporate in the collect command? suppose the following toy example: Code: . webuse auto, clear (1978 automobile...
View ArticleBox plot when you've already got percentiles, not the raw data
I'd like to make some box and whisker plots, but the issue is that I only have the percentiles, not the underlying data. The percentiles are the locations where the box/whisker lines would be, so I...
View ArticlestrL variables not recognized and encode crashes program
I am having trouble creating a new variable from my data. See screenshot for the variable that currently exists in the data, it is a strL according to the "describe" function, there are about 8,000,000...
View ArticleModel selection for two-part models
Hello, I implemented two separate two-part models to analyze the variable oopdental_costs, which represents total dental expenditures. For the first model, I used a probit model to account for the...
View ArticlePlot coefficients with bootstrapped confidence intervals for multiple dummies...
Dear Statalist, I am trying to make a graph of all 20 coefficients with the bootstrapped CIs of 20 (leader) dummies from the following regression: Code: forvalues i = 1/20 { gen leader`i' =...
View ArticleDiD placebo test
I am a running a two-period DiD, with several periods of pre-treatment data and one period of post-treatment. I'd like to understand the correct way to run a placebo test where I set my treatment...
View Article