Age standardized incidence rates for time series data
Hello all, I have time series data for years 1970-2013.Variables I have in my data sets are female population all ages, male population all ages, male cases, female cases,crude incidence rates for...
View ArticleCross classified APC model
I want to replicate this model in Stata, but using ML and omitting the SAS options like maxopt, covtest and nloptions: Code: proc glimmix data=NHANES_Obesity maxopt=25000; class PERIOD COHORT; model...
View Article-list- qualifier does not recognise some characters in a dataset imported...
Hi, I have had some problems matching two datasets. One of them is that Stata seems to not recognise the dataset imported from an Excel file (this second data source is only available in Excel file,...
View ArticleCalculating medians on groups (excess cash)
Hello all, I'm new to Stata and to the forum. I am trying to replicate the method of DeAngelo, DeAngelo and Stulz (2010) with regard to their definition of 'excess cash'. Khieu and Pyles (2012)...
View ArticleMarginal effects significance vs original model effects significance
I often get questions like "This variable has significant effects in the original (logit/probit/heckprobit/whatever) model. But its marginal effect is not significant. Why?" Or vice-versa. I tend to...
View Articleperson-time at risk
Hi all I have the following dataset. ID Date 1 1/2/2013 1 4/2/2013 1 9/2/2013 1 10/2/2013 2 4/2/2013 2 9/2/2013 2 15/2/2013 2 19/2/2013 3 2/3/2013 3 9/3/2013 I want to calculate the person-time at risk...
View ArticleTreating Estimates like summary statistics
When we have variables, using the summarize,(detail) command returns moments of the data (and features of the distribution). I am currently estimating a model that includes a high number of fixed...
View ArticleExtracting Date from DateTime Format
I have dates in the format: 12FEB1993:00:00:00.000 and would like to have a variable with just 12FEB1993 and, ultimately, 1993Q1. The step I am struggling with is just getting the date extracted from...
View ArticleProblem on explain AutoCorrelation Function (ACF) and Partial AutoCorrelation...
Dear all, I have a problem on using Arima model, and really hope that you can help me to solve this. This is the first time I use this kind of model, and sorry if I am asking something puerile. Array...
View ArticleSilverman test
Dear all, I'm trying to carry out a Silverman test using silvtest command. I'm puzzled on how to set the critical bandwidth whose significance level is assessed by the bootstrap procedure. Basically,...
View ArticleWhy doesn't saving a file with "save as" in the do-file...
Situation: I have a previously saved do-file open. I click save-as. In other software, I would see the current file name of the file (likely highlighted and ready for me to edit). In Stata, I just see...
View ArticleStudy design for a hypothetical agricultural experiment
I'm sorry that this topic is a little outside the domain of the Stata forum, but I really don't know where else to turn for advice. It is about how certain types of agricultural experiments are...
View ArticleHow to code for employee rehire?: Subgroups, Loops, By command...
Hi Everyone, I have a list of employees (see table below for a short example), and I'd like to generate a dummy variable to indicate when an employee has been rehired by a particular firm. In the...
View ArticleMissing output in ologit?
Hi everyone, I’m running a rather long ordinal logistic regression and am running into a problem: for some reason, not all of the potential options in my interaction term are showing up in the output....
View ArticleGenerating a unique case id
I need some help to create a unique case id per patient. My dataset have duplicate records per patient. I am trying to identify unique patients by patient health card number (HC) and if HC number is...
View ArticleKeep the repeated time values within panel
Dear All Stata User, As you see in attach I have repeated variable in my dataset. My data is unbalanced. I have 45 countries and 230 parties in the data. Each country has different amount of parties....
View ArticleRandomizatio inference (beyond "permute")
Hi, I was wondering if there are any tools for randomization inference / Fisher permutation tests, that go beyond what can be achieved by the permute command. I wrote something myself a while back and...
View ArticleUsing ctrl+arrow to edit text (variable names) in do-file editor.
This is either a feature request, or just request for recommendations of a better text editor. I've tried, but haven't made it a habit, to edit in Notepad ++ and run my code in batch. That may be what...
View ArticleUsing CMP to fit Craggit
Hi everyone, I am learning about cmp command, and trying to use it instead of craggit command. However, when I compare the output with craggit (no matter how I do it), I get different results. It looks...
View ArticleInfluential Observations for Zero Inflated Poisson
I'm using the zip command to fit a zero-inflated Poisson model to a dataset with excess zeros and a count-based response variable. I have 12 independent variables (binary and numeric). How can I detect...
View Article