label loops
Dear all, I am using Stata 12 and I am trying to write a loop within a loop to edit labels in 96 variables and I am stuck. I have time use data and a set of 96 variables which mark 96 consecutive...
View ArticleDrop observations / keep observations
Hi all, I have intraday news sentiment scores for over 5000 equities for 1 year. This results in 2,300,000 observations. As I'm only researching Dow Jones firms I figured to use the keep if command to...
View ArticleIntra-class correlations (ICC) of a variable
Dear all, I would like to ask whether Stata allows to obtain intraclass correlations (ICC1 and ICC2) for a certain variable. If yes, what is the syntax for doing this? In one of the papers (relevant to...
View ArticleLoosing precision in Y axis (large number)
Good morning, I am generating a very simple histogram on number of days patients stay in clinic however since my data set is pretty big the Y axis numbers are not fully display. example 2.0e+04 instead...
View ArticleSurvival analysis - single record multiple failure modes
Dear all, I am planning a survival analysis on a single-record multiple failure dataset. Each subject has one entry with multiple independent variables as well as three different potential failure...
View Articletable of several univariate results in one column
Dear All, I am trying to put all the univariate analysis result in one table i was using program "mergemodels" from previous stata mailing list although the program is for version 8 but it's working...
View Articletest of post
Code: sysuse auto regress price weight test _b[weight]=0 mat b = e(b) local constant : display %4.3f = b[1,2] display `constant' local x : display %4.3f = b[1,1] local r2 : display %5.4f = e(r2) local...
View ArticleHow to deal with duplicates
I have an unbalanced panel data of 150 households. when i run the xtdes command i get results indicating that my n=152. how do i deal with this problem?
View ArticleCountry exclusion from coefficient expected, but number of groups decreases!
Hi, I have a sample of 24 countries, that I want to use in my fixed-effects regression. In my results table, that should be the 'Number of groups' shown. My panel is unbalanced and looks at a 8 year...
View ArticleAdvice for choosing models
Hi - Could I get some advice of which type of statistics I should use to represent my data on the best possible way? I have 76 participants with several factors. The following factors are: Age in years...
View ArticleImporting many excel files with xls2dta
Hi everyone, I'm using xls2dta to import multiple excel files and to append them into one dta file . The code I am using is: Code: xls2dta , save(C:\Users\user\Desktop\test) recursive : import excel...
View ArticleSpatial Economterics - How best to model spillovers
Dear Statalist, I wonder if I could get advice on the following question. I'm currently examining whether Ministers who have discretionary power over capital investment in sports facilities, target...
View Article#N/A Problem
Hi All =) I am about to do some econometrical work with this data base. Problem is that some data are "#N/A". Which will be a problem cause Stata will put this variable in red. I would like to know if...
View ArticleFrom date in string format to readable datatype
Hello all! In my dataset I got different dates as string types. The dates are linked to specific observations and do not necessarily follow the calender (so sometimes a few months can be skipped and...
View ArticleStata code for linking names by creating new variables in large data sets
Dear all, I am currently working on my master thesis, but I am struggling to find the right command for the following problem since I just started using Stata. The database I use is based on the NBER...
View ArticleWhat does Stata do when you set iterate(1) in the k-means clustering procedure?
What does Stata do when you set iterate(1) in the k-means clustering procedure? There are three possibilities: (1) The data points are assigned to the initial centroids, then the centroids are...
View ArticleFirst-differences panel model and interaction term
Dear all, I'm currently having a problem with interaction terms in a first-differences model in a panel context. In my research, I'd like to analyze the effect of announcements on firms' returns on...
View ArticleVariable error invalid name
Dear all, I have a problem with a variable in a dataset that begins with È_ . It's not possible to change, to rename or to drop it neither export the dataset. There is some way to use it or to change...
View ArticleExporting output into Excel after running do file
Hey! I have a do file that contains the analysis commands (tabs, summary statistics) for a dataset that I analyzed, and I would like to export the tables generated by that do file into Excel. I tried...
View Article