Calculate market beta automatically
Hi all, I just started using STATA, so I do not have much knowledge about it. I need to calculate market betas for about 1000 event dates. I have the daily stock as well as market returns for each...
View Articletime in and time out across multiple observations per person
Hi there I am doing a simple cohort study based on person-time at risk, with exposed cohort and unexposed cohort. I have multiple observations per person, so that for example "person A" might have the...
View ArticleHelp with merging dataset
We have tried to merge the datasets we've obtained from CDS, Compustat and CRSP and we've run into some trouble. First, I would like to ask if we did the right thing by 1: obtaining the 6-digit CUSIP...
View ArticlePanel data- count number of entries in clinic by patient ID
Array I have a panel type data-set where the unit of analysis are incidents in a mental health center. So a mental health patient can have many incidents in the year. Some patients also have many...
View ArticleSpecfifying Model for Meqrlogit
Hello Everyone, I really keep confusing myself in regards to how I'm supposed to specify this model. I have very novice knowledge of multilevel models. For a project I am evaluating how high school...
View ArticleSampling of alternatives (in discrete choice modeling) ?
In a city, there are 50 neighborhoods. I try fitting a nested logit model for workplace choice and residence choice. The upper level is of workplace. So, there are 50x50=2500 distinct...
View Articleno paths from latent variable X to observed variables in group 1
Hello I am attempting to test for measurement invariance across two groups. I used the code here to learn the Stata commands for this: http://www.ats.ucla.edu/stat/stata/faq/invariance.htm And I ran...
View ArticleWhy is xtnbreg yielding different results than nbreg with id / year dummies?
I am using a data set of industry-year observations to calculate the effect of an IV [lobbying dollars spent by a particular industry in a particular year (continuous variable)] on a count DV [how many...
View Articlebinary endogenous variable in ivreg2h
Dear All, I am using the Stata routine ivreg2h. It seems to me that in the first stage regression, a linear estimation is used. Could you please confirm to me that this is the case and please tell me...
View Articlexcollapse problem
I am doing something that should be simple but I keep getting the same error. Any help would be appreciated: xcollapse v2x_corr, by(country year) saving{vdemcorr2) You must specify at least one of the...
View ArticleHow tabstat handles missing zero-observation combinations
I'm tabulating some descriptive statistics by country with tabstat, using something like Code: tabstat money_var if condition_var == X, by(country) stat(sum) It seems that when the if condition is not...
View ArticleConflicting results with margins command
Hello, I am doing a logistic regression with a binary indicator. The regression results show a statistically significant result (p
View Article2 conc curve plot on one graph
I am trying to plot 2 different concentration curves on one graph but can figure out how to. Can anyone please advice
View Articlehow to intepret results of mswitch
Dear users, I use the mswitch command to estimate the expansionary and contractionary economy.The regressor is real GDP growth rate. The results are as follows, how should I interpret the results. Many...
View ArticleRescaling weights using stata
Hello there! I am trying to rescale weights using STATA to combine a multi year panel survey. I was given SPSS syntax to use as a guide. Unfortunately, what I am trying to do has not worked out. Below...
View ArticleCombining Survey Weights for Separate Multi Year Surveys
Hello, I am trying to combine two separate multi year surveys (survey A & B). Both of which come from different countries. Each set surveys comes with a different sent of pweights for every year. I...
View Articleissue with nlogit
I have 39037 observations - having case id, choices made, individual variables and altrenative variables. I have created a nest that I want to estimate - nlogit_group N MODE_N N k...
View ArticleMultiple User Stata File in Dropbox
Dear All, I have a question regarding Stata working directory. I am working with multiple people on a project stored in dropbox. The problem is that of course everyone has a different path, so we...
View ArticleAccesing variables in loops
Dear All, I have a question regarding the acces of variables in loops. Consider the following minimal example: Code: webuse grunfeld, clear keep if company <5 g ret=invest/15000 bys company (year):...
View ArticleMultivariate Probit model
Nerihun Nig sent me a private message as follows I am trying to estimate multivariate probit model using STATA 14. For this purpose I am using 'mvprobit' command. When I run the command 'mvprobit...
View Article