Survival analysis to estimate mortality at a specific day and handling deaths...
I am having trouble wrapping my head around survival analysis. I have a trial with two arms where the endpoint is mortality at day 14. The endpoint will be calculated using survival methods to account...
View Articlecode for 'if not'
I need some help on how to generate a new variable with various conditions. The new variable is anyone who has been diagnosed with hcc at any visit other than 1 so the syntax below is what i wrote:...
View ArticleHow to form a block diagonal matrix in Mata/ How to put blockdiag() in a loop?
Good afternoon, I would like to form a block diagonal matrix which has square blocks of 1s on the diagonal, and the dimensions of these blocks are given in a Stata-vector. E.g., Code: . sysuse auto,...
View ArticleRegression with Panel data: R-squared = 0.0000
Hello everyone, I have conducted a panel data using an OLS model to get residuals and use them as the main proxy for firm investment inefficiency which is used as the dependent variable in the next...
View ArticleRegex help
Dear all, I have patient side effect descriptions which look like below. Most patients had their location of symptom ended in the last parentheses of the description (that's how the form generated the...
View ArticleTruncated Hurdle model estimation for count data now possible with -nehurdle-
Hi everyone, I've been away a bit. Thanks to Kit Baum, version 2.0.0 of nehurdle is now available in the Boston College repository. Type ssc install nehurdle [, replace] or search nehurdle, all at the...
View ArticleImport .csv files from zipped (or other form of compressed) folder without...
If I have a .dta file compressed in a .zip folder, I know that I can access it without having to manually unzip by using the -zipuse- command from -zipsave-, and even specify a varlist and restrict...
View ArticleValid t-ratio Inference for IV (Lee et al., 2022)
Hi folks, I'm trying to use the t-ratio method for just-identified IV as suggested by Lee et al. (2022) (https://irs.princeton.edu/davidlee-supplementarytF). I attempted to install the tf package on...
View ArticlePPMLHDFE - omitted variables
Hello community, I am using the ppmlhdfe regression to study the impact of common language (comlang_off) on trade (tradeflow_baci) between many African countries. For that I am using exporter fixed...
View Articlefoo
There is a lot to unpack in this thread. I will break this up into two posts. In this post I will look at what a difference in \(R^2\) could actually mean. lets start with a bivariate regression: \(y =...
View ArticleGMM instrumental regression xtivreg2
Hello, I´m trying to test the endogeneity in my model with two interpretation of the xtivreg2. I´m not sure about the interpretation of the results. First model: according to the Sanderson -Windmeijer...
View ArticleGenerating multiple estat phtest plots for categorical predictors
Good morning all, I am running estat phtest following stcox (Stata 15.1, updated) I want to generate the plot of scaled Schoenfeld residuals for each categorical predictor as part of assumption testing...
View Articlemixed models and Bonferroni correction
Hi to everybody, I wrote the code below (mixed model as an alternative to anova repeated measures) HTML Code: mixed MaximumFidgety i.Diagnosi_3numbis##i.eta_num, vce(cluster id)|| id:,...
View ArticleChange order of bars using catplot
I have a dataset where the unit of observations is individuals (ISSP Environment IV). I would like to make a graph of the distribution of answers to a likert-scale question (variable 'v17', which has...
View ArticleSynthetic control - synth2: invalid syntax error
Hi everyone, I am struggling with a SSC command called -synth2-. Basically, when I run this, I got an error: Code: xtset idprovdis moyr_matricula foreach a in HEV{ preserve ge `a'=(d_dum_`a'/tot)...
View ArticleSearching relevant packages for analysis
I am working with a paper which uses methodology of two-stage multinomial selection model using dubin-mcfadden method. There was a package titled 'selmlog' which I could find using previous forum...
View ArticleExporting reg tables with interaction term
Hello, I hope someone can assist me with an issue. I'm using World Values Survey data to explore the correlation between religious affiliation and economic attitudes, I am using interaction terms to...
View ArticleDiff in Diff when the treatment time is known but out of the sample range
Hi all, I am estimating the effects of a shock on industries. I know the time of the shock, it starts in 2000, but my data on industries cover starts in 2010. If I just estimate a pool dynamic...
View ArticleConfidence intervals
Hello! I am using a Cox proportional hazard model to examine the association between LDL-c and a disease using robust SE (cluster(practice). I noticed that the 95% CI are not symmetric. Why does this...
View ArticleHow to calculate the death rate(the fatality rate)
Hi all, I'm interested in the Serious Accidents Punishment Act's impact on industrial accidents in South Korea. However, I had a problem calculating the death rate for the given data. My data does not...
View Article