cleaning do file to run over multiple datasets
Hi - Another data management question: I have 7 country datasets. I want to be able to run one cleaning do file that cleans all 7 datasets with a loop. It needs to: 1. import the baseline survey data...
View ArticleString and Numeric Variables- recoding
I have the following dataset: Code: * Example generated by -dataex-. To install: ssc install dataex clear input float Buyer str1 Seller long Seller1 1 "D" 4 2 "B" 2 3 "C" 3 4 "A" 1 5 "B" 2 end label...
View ArticleResidual testing for Pooled mean group estimator
Hi all, I would like to investigate the relationship between gasoline and crude oil prices. For these purposes I am applying the user-written command xtpmg (available from SSC) that implements the...
View Articlep-value difference between regress and ttest
Hello, I am grappling with a question and would like some advice from the statalist community. My colleague and I are working on cleaning and analyzing survey data right now, and to get some...
View ArticleComposite Means (Dimension) Query
Hello - hoping that someone could advise on the best coding for determining a "dimension" scoring on patient safety that is comprised of 12 sets of grouped survey questions on a Likert Scale. In short,...
View ArticleTime variable: string to real time
I have a variable that records the time of an event. The problem is that some of entries include string reposes such N/A, which make the variable string when imported to Stata. How can I fix this?...
View Articlesubstr not working properly
Would someone know why the substr command below is not working properly? I would like to extract the substring from digit 5 to digit 12 Code: gen teste=real(substr(string(n_aih_ori,"%13.0f" ),5,12)) I...
View Articlextreg for unbalanced panel
Hi, I have a question about a panel data regression. I have a dataset of 18 groups (countries) with 4 variables (financial spread, inflation, exports/gdp, investment/gdp) for each country along 35...
View ArticleCreate a new sequencing variable conditional on a personal id and a time...
Dear All, I am looking for your kind help in the following STATA problem. I am working on student record data with school years in the range of 2003 to 2014. Students had different universtiy entering...
View ArticleNew package for D3js Visualizations Available on SSC
Thanks once again to KitBaum for posting another package to the SSC Archives. libd3 is a Mata library around the D3 javascript library. The library is an attempt to provide a Stata-esque way to create...
View ArticleOceania Stata User Group Meeting – Sydney 29-30 September 2016, University of...
Oceania Stata User Group Meeting – Sydney 29-30 September 2016, University of Sydney CALL FOR PAPERS The 2016 Oceania Stata User Group Meeting will be held at the University of Sydney, Abercrombie...
View Articlemswitch
Dear all, I am using the mswitch command in a panel context. Although the command accepts the if and in options, it does not work. Here my line of command: mswitch dr D.lgggd if Country==1, nolog which...
View ArticleCreating a variable to find employment status at the time of first birth.
Dear Statalist, I want to create a variable to show man's employment status at the time of first birth. The variable empstatus is connected with the variables earliest and latest that shows from which...
View Articleappend two datasets together no observations 2000 error
I am trying to append the MaR dataset and the WGI dataset from the World Bank. I also need to create some additional variables which i have done. However, when i try to do my regressions i keep getting...
View ArticleData Transformation
I am trying to find the significance of a number of different variables on the level of a countries inflows from services as a percent of GDP. My variables include other data that is as a % of GDP, raw...
View ArticleProblem with deleting observations
Hi all, I would like to ask you how I can deal with below situation. When two CEOs are observed in the same year of the same firm, I want to delete an observation which has the smaller size of...
View ArticleMultivalue string variable from tesaurus
I all. As a first question on this forum, I ask for a suggestion on multivalue string variable. I have read some tutorials and post, related to data coming from question allowing multi response value....
View Articleindustry FE reduces numbers of observations
I'm running probit regression with stata using 440 number of observations. And I need to use either industry fixed effect or firm fixed effect. However, when I use industry FE, the number of...
View Articlextlogit
I used the following code to estimate a sample with 10,000+ number of observations. xtset year company_id xtlogit dependent_var indenpent_var, fe When I ran the xtset, Stata shows that "repeated time...
View ArticleA question of interaction terms with indicator variables (dummy variables)
Hi everyone, I'm running a simple regression with earnings as my variable of interest. I want to emphasize that the coefficients are different when earnings are positive and negative. The model is like...
View Article