Converting text values to numeric values in Stata dataset
Good afternoon! I'm very new to Stata and am having difficulty converting a text value to a numeric one. I have a data set with hospital account types (22 account types under a variable called...
View Articlerevisiting options for the missing F statistic
Hello All We conducted a study in 7 clinics and are now doing analyses on our outcome. Of course, we are adjusting for clustering (see model below). The problem is we have a missing f statistic. We...
View ArticleLine plot with event markers
I have daily stock price data for many different companies. For each company, there is at least one "event" date that I am interested in. I would like to create a line plot for a given company...
View ArticleConfidence interval won't compute in cross-classified model
I'm running a cross-classified growth model. The goal is to measure reading growth from kindergarten to third grade, and determine which of three reading programs is linked to the highest growth. Time...
View ArticleCombining the data from two variables (in the same data set).
Hi everyone! How are you guys doing? I'm fairly new on Stata and today I come here with a very simple question. How can I combine the data from two variables (in the same data set) into one variable....
View Article'Balancing property' issue with PSCORE
I am trying to do propensity score matching between my sample and population based on some characteristics. Here is my Stata syntax and I get the following error: pscore smpl_or_pop rural_urban_codes...
View ArticleUsing a formatted date string in a macro
I have a dataset that is tsset, and I would like to use the formatted (string) value of the date variable, from one particular observation, in generating a totally new variable name. For example, if...
View ArticlePropensity Score Matching with xtreg regressions
Dear Statalist users, I am applying Propensity Score Matching in my research and I face problem when I apply firm fixed effects models after the matching command: First, I have run the following...
View ArticleStoring Issue
Hi all, I am currently working on a project and have difficulties with storing the data. When I am storing the data using the function "eststo" it changes the results of my regression. Specifically, it...
View Articlegraph for each group
hi, i am using below code for making plots per group: twoway scatter rev quality, by( MARQUE ) by using this i got my required graph but for all groups of brands in one frame(below pic), how can I have...
View ArticleMethods Difference in Difference
Dear all, I currently struggle with the following problem. For my research I need to analyse a dataset with the following characteristics, I am struggling with the right method to use. I have a dataset...
View ArticleStarting event study with government bonds yields
Hello everyone, I'm new to the forum and to Stata and I'm really grateful for your time and help. I've wander the forum in the quest for an hint but it seems no one has had the same kind of starting...
View ArticleSetting up a survival analysis data set
I am trying to re-do my discrete-time hazard analysis, accounting for repeated events and left-truncation (delayed entry). But I just cannot quiet get it right, both by hand as well as using things...
View ArticleData management: network setup
Dear all, I am Prepare data for network meta-analysis. my data is below but i have error message . I don't know how to solve this problem. Please help me. Thanks very much Code: study d n trt 1 4 87 1...
View ArticleMult Valued Inverse Probability Weighted Regression Adjustment
I had an overlap violation error message when I ran the regression. I then used osample (newvar) to identify it but I cannot find any information on where I go from there. Can anybody help please?
View Articleis there a command that returns maximum and minimum length of a string variable?
I'm looking for a Stata command that stores the maximum and minimum length of a string variable - as a shortcut to the long way, which would go by: gen vnew = strlen(v1) egen smax = max(vnew) etc. I...
View Articleconfidence intervals for hazard / survival functions obtained by logistic...
Hello there, it's a bit related to my older thread, so now I am using the approach for discrete time survival analysis described for instance here and here. This means I use an expanded dataset with...
View ArticleOdd diagonal line emerge when I draw a two-way line graph
Hi, I encountered a strange situation when I want to draw a two-way line graph using Stata. Besides the two lines which I desired, there is also a third diagonal line across the plot region, which I...
View ArticleStata implementation for Cragg / Blundell's (true!) double hurdle models or...
Hi everyone, this is my first post on statalist - if there are rules/customs/traditions I am not adherring to just let me know and I will try to edit my post in such way. I am currently dealing with a...
View ArticleEditable graph from stata to excel format
Hi everyone, I'm trying to export a graph (from stata) to excel, I want that this graph could be modified or edited in excel and has excel format (i.e, get an excel graph like the ones you create...
View Article