test of endogeneity
I am following a paper to test the endogeneity through Durbin-Wu-Hausman test. Whenever i perform my 2SLS regression with some instruments and perform endogeneity test through "estat endog" I get the...
View ArticlePanel data model with an ordinal DV and both time-varying and time-invariant...
I would essentially like to explore the following: (H1) the number of firms participating in program X in a region on firm performance in program X; (H2) the distance between a firm and the nearest Y...
View ArticleHow to export mrtab out put to excel file?
Dear Statalisters, I am running the command (mrtab q5a q5b, poly sort des) it there a way to export this output to excel file. Because I have to copy the result and then past it to excel file which is...
View ArticleExport excel
Dear Stata users, Can any one tell me how to export tables generated by mrtab command from Stata to Excel sheet.
View ArticleCreating IDs through egen, conditioned on each other
Hi, I'm creating IDs for exporters and importers as such, egen exporter_id = group(country1) egen importer_id = group(country2) But, since the list of importers and exporters is not the same, it is...
View ArticleThe error of quadrature point when adding country dummy to logistic regression
Hello Statalists, I am running a logistic model -xtlogit depvar indepvar i*, re vce(robust)-, where i refers to country dummy that is generated by -tab i, gen(i)-. There are totally 45 countries, and...
View ArticleExtracting information about the spouse from a family survey
Hello! I have a cross-section with person's ID, their spouse's ID and a wage rate. How can I create a variable for spouse's wage rate from this data set?
View ArticleAdding observations to dataset
Hi all, my original dataset looks like: Id Comorbid Status ... 1 AF 1 1 HTN 0 1 Lipids 0 2 HTN 1 2 Lipids 1 2 DM 1 2 HF 0 3 AF 1 3 HTN 0 Like to know if its possible to transform it to the table below...
View ArticleProblem with multiple observations from the same individual and time between...
Dear friends, I am working on a project concerning intensive care. I have a dataset with 4993 observations with unique patients ID. Our software for intensive care creates a new patients ID each time a...
View ArticleSensitivity and specificity using roctab
Hi everybody, I am using Stata to calculate the sensitivity and specificity of a diagnostic test (Amsel score) compared to the golden standard test Nugent score. Code: tab BVbyAmsel highnugent, chi2...
View ArticleProblem in adding individual dummy into logistic regression
Dear Statalists, I am running a random-effects logistic model by the command -xtlogit depvar indepvar i.i, re vce(robust)-, where i refers to individual country But Stata only shows the following...
View Articlemerge 3 data sets with different identifiers, one string identifier
Good day all, I have 3 datasets A,B and C. Dataset B and C I want to merge certain variables to dataset A. Dataset B I can merge with no issues by using id and year. Dataset C has a unique identifier...
View ArticleData validation problem. Listing variables depending on values.
Hi, I have imported a dataset from excel. It contains information if a patient (500+ patients) has acquired sepsis, severe sepsis or septic shock during 35 days in our ward at the hospital. Each day...
View ArticleDealing with unbalanced dataset
This is my first work in Stata. I have to deal with an unbalanced but well-shaped dataset the (GGDC 10 sector database). It contains each observation for every country but with different starting date....
View ArticleHow do I determine the estimated difference, in my DV, from saved random...
Using Stata 14.1 in Window 10. I am doing a CCREM in Stata. This is the code: Code: mixed tolind c.age##c.age Inspired Fables female Liberal Moderate white ceduc marry kids south urban rural suburban...
View Articlextabond2 error message
I am using a dynamic panel GMM methodology on a model. My model looks like this: xtabond2 Y L.Y X1 X2 X3, gmm (Y X1 X2, lag (2 3) collapse) iv (X3) twostep robust small on executing the command I get...
View ArticleEstimating ICC two-way mixed model absolute agreement
Is there any other way to get the ICC for two-way mixed model absolute agreement besides using xtreg or xtmixed? Thank you in advance for any reply.
View ArticleRecovering one fixed effect with several fixed effects
Dear Statalisters, I have an outcome Y_ijt for individual i who lives in city j for day t. I would like to recover a version of Y which removes individual unobserved heterogeneity in the level of...
View ArticleTemperature data and GARCH models
I want to use GARCH and MGARCH models to investigate relationships among electricity prices and four other variables. One of my variables is a daily temperature data of approximately 1500 observations...
View ArticleFixed effects with xtgls command
Hi every body, I have a precise question. When we run a fixed effects model (after Hausman test ect..) and I have both autocorrelation and heteroscedasticitu problems. It's known that we have to use...
View Article