best reg command in case of missing data
I am estimating the gravity model for india's exports. however I have a lot of missing data which is reducing observations. how do i overcome this? is xtreg or ppml or xtpoisoon the best command to use?
View ArticleTransponing data
Hi there experts, My name is Frank and I'm a novice (!) in Stata. I would love for some help as I'm currently doing a time series regression (100 funds, with monthly return/size over 15 years.) My...
View ArticleOutreg2 in a loop - add tables not append
Hi all! I need to do regression with lots of different dependent variables and so I am using a loop. My baseline regression looks something like this: yit = β0 + β1 x1it + β2x2it + εit My code so far...
View ArticleCombine many .csv files
Hello all, I want to combine many .csv files. Each file has the name NYSEyyyymmdd.csv, where yyyymmdd is the date. For example yyyy= 1996, mm is month, e.g 01 for january, and dd is day, e.g. 01 for...
View ArticleDealing with missing stock price data
Dear All, I have a dataset containing stock prices for many companies during 10 years. I will conduct an event study on my dataset. However I have missing stock prices for a number of trading days. The...
View ArticleUsing stsplit for time-varying covariates in stcox
I am doing a large registry-based study, in which I am doing Cox-regression for mortality rates in hyperthyroid individuals compared to euthyroid individuals. Furthermore, I am splitting the...
View ArticleMultinomila logit with different sets of alternative specific variables
Hi. I have a question regarding multinomial logit models in STATA. I'm trying to estimate a trip mode choice model in stata. The alternatives have different specific variables. For Instant the transit...
View ArticleReplace Sample vs Population
Hello, i need help. I have 4 variables i.e. VRegS VRegP VregPmake and VRegSmake. Capital S stands for sample while P stands for population VRegS=vehicle registration for sample VRegP= vehicle...
View ArticleSubsetting data
Hello, I'd appreciate if you could help me with Stata syntax for the following analysis. I've got the HCV treatment dataset. I need to run analysis on the subset of patients who have received an...
View ArticlePrint variable mean in graph export?
Dear All, consider the following minimal example: Code: clear webuse grunfeld, clear g ret=invest/1500 bys company (year): g cumul=ret if _n==1 replace cumul=ret + l.cumul if missing(cumul) keep if...
View ArticleNested for loops
I would like some help with writing a nested for loop. So far this is what I have foreach x of varlist A- J{ gen Share_`x' = 0 foreach y of varlist 1- 10{ replace Share_`x' = ( `y'/ `x') } } What I...
View ArticleHow to take into account repeated measures in logistic regression?
I am currently doing a research study to predict a health outcome using some biomarkers. These biomarkers are obtained over 4 visits, so they are considered repeated measures. I also want to test if...
View ArticlePanel IV help & Arellano-Bond
I constructed a panel model on the impact of immigration on crime, with 12 regions over 8 years. While using Fixed effects, my results seemed reasonable. However, after conducting IV estimation and...
View ArticleLast step of time-series forecast
..... 6. If there is The Conditional Heteroskedasticity --> Applying Symmetric GARCH Model Continuously, test The Asymmetric effect of Stock return by Jarque-Bera test And Test Leverage effect....
View ArticleRegression on equally- and value-weighted returns for funds
Hi there experts, I received splendid help last time (thanks Nick Cox + Joseph Coveney) and was wondering regarding a regression I am trying to run on funds, before/after fees. I adjusted my data...
View ArticleHow to duplicate or repeat a set of values in a sequence in stata
Hello, Kindly can anyone help me how I can duplicate values in sequence I want in Stata. I have data I have data in this form I want to convert in this form 1 1 2 1 3 1 4 1 5 1 2 2 2 2 2 3 3 3 3 3 and...
View Articlertfutil - problem with cell definition
Using Stata 12.1 I am using rtfutil to output tables to an .rtf file. As I mean to do as little manual editing as possible on the output, I am trying to format the tables with rtfutil and listtab for...
View ArticleArellano-Bond Sargan statistic interpretation
How would you interpret a Sargan statistic of 1.000? I've attached the results I've got after using the estat abond and estat sargan commands following the Arellano-Bond estimator. Array
View ArticlePsmatch2, propensity score matching
Dear all, for our master thesis we our researching the business failure in transition economies. Now we have a dataset for each year in which we appended the data of failed and non-failed companies....
View Article30 day mortality with repeated measures data.
I have a dataset with time varying covariates and I need to analyse the 30 day mortality using the Cox proportional hazard regression. If I censor the observation at 30 days for a particular individual...
View Article