Quantcast
Channel: Statalist
Browsing all 65094 articles
Browse latest View live

Passing arguments from Stata to Python (or Stata equivalent to...

Dear Readers I wonder if there is an equivalent in Stata to "itertools" in python? For a large number of cases I have a list of numbers of different length and I want to find all the combinations of...

View Article


Choosing a model for unbalanced panel data with some time invariant...

Dear all, I have a question that I have been struggling with for some time now even after reading many threads and am finally asking for the help of Statalisters. I have an unbalanced panel data set...

View Article


LRTEST poisson vs negative binomial loop

Hello everyone, im testing over dispersion in a count variable. I'm using Hilbe's book "Negative binomial regression" for the analysis. He used the formula LR = −2(LP − LNB), but calculate it by hand...

View Article

Decomposing String Variable While Retaining Adjacent Column Value

I am trying to convert some data retaining the information from a string variable and replacing the name into new columns. These data contain all LEED variables for all regions in New Zealand from...

View Article

Graphing in a nested loop

Hi. I am trying to graph across two variables using a nested loop. My first variable refers to disease cases, the second to a medical stage. I am trying to graph the number of medical stages over time...

View Article


VCE options

Hello everyone, I have data with multiple observations for each patient and also influential outliers. How can I use 2 VCE options (cluster and robust) to deal with these problems? Stata does not let...

View Article

How can I do matching in case control study?

Hello. I am doing my master´s degree Project, and it is about cost bacteria resistance disease (more specifically carbapenemic resistant enterobacteriaceae) and I would like to do a matching cases –...

View Article

Variation within a group

Hello To detect if the value of a numeric variable var_num changed within a group var_cat, I do this: bysort var_cat: egen sd = sd(var_num) replace sd = 1 if sd > 0 & sd != . tab sd, m Are there...

View Article


By Patient ID subtract dates if observation (admission ID) condition is met

Hi all, I'm working on a fairly large hospital readmission dataset with 350 vars and 1.5M observations. I'm not being able to code, bysort pat_id fict_data, the date difference (fict_data var) between...

View Article


xtabond2 command help, PLEASE

Hi all! I am just getting into GMM (dynamic panel) for the first time, and I'm having much difficulty. I'm somewhat familiar with first differencing and fixed effect modeling, but this is definitely a...

View Article

Problem with using margins code and creating a dummy variable on command box

Dear statalist I have a problem using margins on stata command. I'm doing some research related to the effect of election on corporate investment. I generated control variables called victory (which is...

View Article

Aggregate individual-level data into household-level data

Hi. I am working with a survey that gathers information on an individual level. The survey asks all the members in the household questions related to the location of the household (rural/urban),...

View Article

Panel Data: Comparison of Observations

Hello, I would like to specify a variable that indicates the ratio of new names to the total number of names per ID per year. In other words, I am interested in whether the particular name appears for...

View Article


Generate a new date variable from a panel data

Dear all, I tried coding (see below) to generate a new date variable in month from a large panel data with ticker and a date variable that gives the star and end date for each firm. Below I show a few...

View Article

predicting effect

Dear colleagues I'm thinking of a method to isolate the effect of a particular variable (X) on say Y and then use that it in an entirely different regression and another dependent variable. For...

View Article


Equivalent command to Ctsem in STATA ?

Dear honourable members, Please I would like to know if in STATA there is an equivalent command to Ctsem R package for "Continuous Time Structural Equation Modelling" Thank you

View Article

Examples of programs with suboptions

Hi all, I'm looking to review a few programs' ado files that have suboptions. By suboptions I mean options within options. E.g. ylabel() is an option of twoway, and labsize() is a suboption of ylabel,...

View Article


question about perfectly predicted variables in logit

Hello, I was reading the pdf file of logit and it states: "..perfect predictor variables and their associated perfectly predicted observations and may produce instabilities in maximization." I do not...

View Article

different levels of significance logit vs margins

Hello, I am running a logistic regression with the log odds and the marginal effects as coefficients. However, stata returns different levels of significance. Could anyone clarify how this comes? Code:...

View Article

log (pseudo)likelihood and wald chi²

Hello, I am wondering what log pseudolikelihood and wald chi² mean in het output of logit. After reading on the internet, I think Wald chi² denotes the joint significance of the model.However, the...

View Article
Browsing all 65094 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>