How to generate a region-year unbalanced panel where I only want to drop...
Dear Statalist, I would like to produce an unbalanced region-year panel for which I drop only those region-year cells below a certain total observation threshold (50 observations). I tried the...
View ArticleAnalysing Longitudinal Data - Aggregating waves
I am a novice at Stata and currently doing a project for my Econ undergrad econometrics module. I am using data from UKDS Understanding Society: Longitudinal Data. Each observation is assigned with a...
View ArticleApplying ologit and fixed error rates to sem.
In short, I am trying to take this functioning SEM model Code: qui: sem /// (post_att_tot <- pre_att_tot ASykKmTransp_sqrt_cat4) /// (CSykKmTransp_sqrt_cat4 <- ASykKmTransp_sqrt_cat4 pre_att_tot)...
View ArticleHow to get design-based standard errors of Abadie, Athey, Imbens, and...
I am running a simple difference-in-differences model on all 50 US states (2000-2018) where a treatment is assigned to 23 states in 2010, and not to the other 27 states. As I observe the entire...
View Articlegrc1leg2 -- legend
Hello, I have two different variables. I plotted the mx and min values for each variable and wanted to show the two graphs together Code: twoway rcap max_X1 min_X1 n, name(g1, replace) twoway rcap...
View ArticleTwo stage negative binomial regression: control function or...
I have a question about applying a two-stage negative binomial regression. My dependent variable is a count (the number of voluntary turnovers), and my main independent variables are two types of...
View ArticleMultiple test corrections
Hi all. I'm curious what Stata commands exist today for correcting p values for multiple tests. The ones I know about are mhtexp, mhtreg, wyoung, and rwolf2 -- all user-written and all reviewed in this...
View ArticleDunntest results are half those in python
So I did a dunntest in Stata with Bonferroni correction and did a similar test in Python to plot a heatmap. I realise that the results in python are double that in Stata. I am thinking two-tail and...
View ArticleCounting How Many Unique Responses are in a Set of Variables in Stata
I have a data set with variables topicname1-topicname10. I would like to create a variable that gives me a count of the number of unique topics each respondent has within those sets of variables...
View Articleivreghdfe to run 2SLS
Hi I'm using ivreghdfe to run 2SLS and i want to present the constant for the first and second stage . In addition to that i need to present R2 for the first stage , please can you advice me on how to...
View Articlecalculating Cronbach Alpha
I am establishing the psychometric properties of a measurement tool that i created. One of the components is to estimate Cronbach alpha of the tool. I use the following code for it (the given variables...
View Article2SLS IV Approach with XTSCC (DK standard error) for two endogenous variables...
Dear statalist, I hope this finds you well. I am working on a small-n large-T (n=7, weekly dataset from 2015-2020) data, and I have been using fe to estimate two endogenous variables's inverted...
View Articleinverse error function
Are there any implementations of the inverse error function for Stata?
View ArticleNow Stata 16 has a separated dofile editor and helpfile viewer
I have been eager for a separated dofile editor and helpfile viewer for a long time. From last week, I don't know whether I click and set something by haphazard or what's happened, the dofile editor...
View Article2sri in panel data
My data is a panel data, and I want to 2SRI anlysis in Logit regress . But I don't know how to write the code. My variables are: Y is stunting (dummy), X1 is internet (dummy), X3 .. X4 .. Z...
View ArticleStruggling with Hbar: Conditional Display of Grade Levels by School Type in...
Hi Statalist, I am working with a German panel dataset in Stata 18 containing grade levels (1-9) ("grade_self") and school types ("sample_school"), along with a binary treatment variable (1 = treated,...
View ArticleA new command for adding asterisk brackets into your graph
Hi all, I created an ado for adding asterisk brackets into a graph using the magic of `_gm_edit`. You can find the command, gradd_ab.ado (version 1.2.0), in the attachment or my Github repo here:...
View Articleasdoc or estpost to combine summary statistics and statistical tests
Dear all I am trying to create a table that contains summary statistics with chi2 and t-test. I tried both asdoc and eststo/ estpost commands, but I still do not succeed to produce the tab I would...
View ArticleHow to create a non mutually exclusive categorial variable
Hello, I know that this topic has been brought up already but I have been reading several posts, and I could not find one that quite worked for me. I have this non mutually exclusive variable where...
View ArticleSample size calculation for hierarchical 2x2 full factorial trial
Dear Community, I need to calculate the sample size (number of clusters and average number of observations per cluster) needed for a hierarchical 2x2 full factorial trial. Trial centers will be...
View Article