Factor variables and time-series operators not allowed
Hello, I am studying survival analysis for my thesis. When I type the following commands, it is showing the same error messages. Could you please guide me how to deal with this problem. Code: . stset...
View ArticleExcluding countries that have been marked in a previous observation
Country Year Missing A 2005 0 B 2005 0 C 2005 0 A 2004 0 B 2004 0 C 2004 1 A 2003 1 B 2003 0 C 2003 0 Dear Stata users, above you can see a stylised version of my dataset. I generated a variable called...
View ArticleHow do you implement ralloc in practice?
Hello guys, I was wondering how one goes about using a ralloc randomisation .dta file to assign allocations for a list of patients in another Stata file? I have been looking in the literature the whole...
View ArticleCreating menus in Stata
Hello. I am trying to create a menu in Stata. After consulting the official documentation i used the following code to create an item in the User menu: Code: window menu append separator "stUser"...
View Articletagging "earliest" value
Hi there I have panel data. For each person ("id)", I have multiple observations. Each observation is dated ("date"). Some observations contain a valid value for social class in quintiles ("soc"), some...
View ArticlePlease help with grouping of multiple variables
I'm pretty new to STATA and am struggling with the writing of syntax. I have tried to figure this out with all the resources at hand, but I am just not understanding what I need to be doing. This is...
View ArticleCalculating standardized deviance residuals after 'meglm' (multilevel...
Hello all, I am applying a negative binomial regression model using 'meglm' command in Stata. I am aware that Stata manual has 'predict d, dev' command for calculating deviance residuals but I want to...
View ArticlePick the first nonmissing (and non-zero) value and create new variable
Hello all, I am using Stata/IC 12.1. I have a panel data set and I need to pick the first nonmissing (and non-zero) value of the leverage variable of firms. This value is to used as a new variable...
View ArticleIndicate fixed effects in esttab when fixed effects were absorbed
Dear all, kind of similar to a question posed some years ago but no one ever answered it. I want to indicate whether fixed effects are in the model, but I absorbed the fixed effects instead of...
View Articlemixed logit model : Interaction with socio-demographic variables
Hi I am using stata user written command mixlogit in stata. I have three alternative specific variables namely parking search time, park cost, walk time, (SP data set) Socio-demographic attributes:...
View ArticleLooping over .CSVs in a folder
Hello all, I'm trying to create a loop that performs some commands over a very large number of .csv files in a single folder. Then I want to save the results in a series of .dta files in a different...
View ArticleEvent Study---Again (sorry)
Hello all, at first I want to thank you for your great help here. I could solve many problems just by reading this forum. I found several threads about Event studies but it could not help me...
View ArticleEvent Study---Again (sorry)
Hello all, at first I want to thank you for your great help here. I could solve many problems just by reading this forum. I found several threads about Event studies but it could not help me...
View ArticleCalculating readmission rates
Hi fellow statalisters, Hoping you can offer some assistance with this, as it's turned out to be more complicated than I initially thought. I'm working with the HCUP State Inpatient Database for 2013....
View ArticleInterpretation of coef for a continuous variable in xtlogit, re
I have two groups of countries (0 and 1), and am trying to explain the difference as due to a variable MTP. This is a continuous variable, that ranges between approx 0-12. I would like to be able to...
View ArticleProblem on using foreach
Dear all, I would like to use foreach for generating new variables for each disease, however, I do not figure it out how to do that. Could you help me, please. Code: . . gen viemdaday=(benh=="viem da...
View Articlebars of bar chart misaligned when grouped by external variable
I am trying to make a bar graph with different colors defined by an external variable (in this case region). An example of the code I am using: Code: sysuse census, clear drop in 31/50 set scheme...
View ArticleCalculation of Standard Deviation
Good evening, I am working on my thesis regarding the capital structure of firms and I am having troubles to create the standard deviation of a variable that i need. I have to calculate the standard...
View ArticleIs the interaction term in my probit-model significant?
Hey guys I have a model with two independent dummy variables (white/black and male/female). My dependent variable is a dummy on getting a job (yes/no). By using simple math I can calculate the...
View ArticleHow to plot odds ratios (rather than parameter estimates) using eclplot to...
I have been using eclplot to displaying the beta coefficients and CIs of linear regression analyses. I now want to use eclplot to display the results of logistic regression but when I use the following...
View Article