Sensitivity analysis:Sensitivity of my regression model to varying...
Hi Statalisters, I want to find out how sensitive the results of my logistic model (or the outputs) are to varying subsamples/ sample sizes) within my data set. Sample data set by "dataex". My outcome...
View ArticleCompare the median time between two groups
Hi All, How to compare the median time between the HIV+ve (-ve) in group A with HIV+ve (-ve) in group B HIV +ve HIV-ve A 10.17 12.5 B 14.16 21.85 Thanks in advance.
View ArticleHow to partially differentiate a normalised quadratic profit function?
I am using nl in Stata 14.0 to estimate a normalised quadratic profit function: nl (norm_profit ={b0}+{b1}*norm_penergy+{b2}*norm_w+{b3}*norm_r+0. 5*{b11}*norm_penergy^2+{b12}*norm_penergy*norm_w+{...
View ArticleCorrect Implementation of "If" "|" and...
Hello, So this my scenario: Respondents of a survey were asked to state their level of acceptance for a certain scenario on a 1 to 8 scale (in which 1=low acceptance and 8=high acceptance). If...
View ArticleCut-points for continuous variables using information from regression models
Hi Statlisters, I am finding different methods cited in the literature to categorize a continuous variable (cumulative life time measure of alcohol consumed, tobacco smoked etc) , e.g, using smoothing...
View ArticleFactor Analysis - kick out 1 of the 2 remaining factors?
Hey guys, I have a question concerning factor analysis in Stata. It's not really about the implementation but about how to interpret results/ work with them. if after a FA (and rotation of factors) I...
View ArticleCommand for calculating the mean for 5 year periods in panel data
Dear Stata specialists I am quite a rookie at Stata. I want to summarize my data into 5 year periods. I have a data set with over 120 countries and my time period is from 1980 to 2010. Now I want to...
View Articlelgraph appearing with misplaced 'y'-labels / 'x'-labels
Dear all, I often use 'lgraph' for having a quick look of the trends in my long-format datasets. 'lgraph' is a user written program by Timothy Mark, and the program is avaialble through 'ssc install'....
View ArticleConverting variable "Date" from string to numeric
Hello Forum: I have a variable named Date and in string format, displayed in the Data Editor as: Date Q1 2001 Q2 2001 Q3 2001 Q4 2001 .... Q1 2017 Q2 2017 Q3 2017 Q4 2017 Its type and format are str263...
View ArticleIssues with missing data, N, Cox models
I'm trying to get an article published which attempts to assess if there was a higher risk of a condition lasting longer in a year when compared to a previous year. I sincerely appreciate any help you...
View Articleforvalues: Merging panel datasets
I have two panel datasets (1StartFile.dta and 2StartFile.dta). In each of them id identifies at most one observation per quarter (between 1q06 and 2q12). To merge these datasets, I am trying to (i)...
View ArticleGraph histogram center bars on labels
Hello everyone I am having trouble with the command "twoway histogram varname as I want to align bars of histogram centered on labels but can't find how to do it. Thank you
View Articlegraph Catplot percentage bars
Dear everyone, I am trying to use SSC catplot in order to plot a categorical variable (Speed, divided binary into Fast-Low) over five years but can't manage to make it sum up 100% on each year. See...
View ArticlePropensity score methods for dichotomous (binary) outcome (OR adjustment)
Dear all! I am a novice STATA user and I understood propensity score method for ATE and ATT estimating for continuous outcome (great thanks for Melissa Garrido for article «Methods for Constructing and...
View ArticleCubic Splines
I am running an analysis looking at the relationship between measles mortality (outcome) and vaccine coverage (independent variable). I have fitted a cubic spline with knots at 0, 33.5 and 88 and the...
View ArticlePropensity score match under conditions
Hi, I am using Stata 13 and use teffects psmatch to undergoe propensity score matching. My question is the following: Can I restrict a matching on certain conditions? Here is an example: Code: clear...
View Articletwo part model for health expenditure
Hello everybody, I have health expenditure as DV and demographics as IV. I want to run two part model with logit plus OLS log-trasnformed y and Duan's non-parametric smearing factor. I have tried the...
View ArticleHow to extract hazard functions
I need to predict hazard functions with confidence intervals and I have tried many different ways without success. I have created a graph but I need the functions for each spline in numbers to be able...
View ArticleCalculating the ICC for between class variance after imputation
Hi to everyone, I have a problem with my imputated dataset. I successfully imputated the values for 32 items (around 10% of the data was missing before) (m=5). Since the data structure contains...
View ArticleT-test table using a macro - variable not found?
Hi all, I'm trying to make a t-test table showing: Group 1 Group 2 Difference T-test p-value I'm using the following program: capt prog drop myttests *! version 1.0.0 14aug2007 Ben Jann program...
View Article