UK Household Panel Survey (UKHLS a.k.a Understanding Society) - Which...
Hi, I'm using the UKHLS data to analyse the gender wage gap in the UK currently. I'm looking at the data and was wondering how best to extract years of employment experience out of the data? Moreover,...
View Articlereshape problem
This should be easy. I want to reshape the data by "classregion" into long format. I have tried several reshapes, but none work. Any help would be appreciated. Here is the reshape i felt would be most...
View ArticlePlotting U-shaped curves using predict and twoway
I am trying to test for an inversed U-shaped patterns between R&D attainment discrepancy (which is the difference between the level of R&D exhibited by a focal organization i at time t-1 and...
View Article-mlogit- bug with labels?
Here's my dependent variable: Code: . tab catvar Would you recommend | Freq. Percent Cum. ----------------------------------------+----------------------------------- 1 Yes I strongly recommend it |...
View ArticleIV-type estimator for multinomial endogenous treatment and multinomial outcome?
I am modeling the effect, among other things, of health insurance on choice of "health" provider consulted in developing country X. I want to fit the following: Provtypei=b0 + b1Insur1i + b2Insur2i +...
View ArticleUsing XT commands with Svy commands
Hi Everyone, I am trying to perform a longitudinal analysis of Medical Expenditure Panel Survey data, and I'm just now finding out that Stata does not support XT models (xtreg, xtpoisson, xtprobit,...
View Articleuse of svyset with data from two countries and post-stratification within...
Hi, Sorry, fpc should not be in the topic heading. I'm relatively new to Stata and new to using the svyset functions. I have Stata/SE 13.1 for Windows. Very soon I will be receiving a dataset of survey...
View Articlemerge
Hi, English is not my mother tongue, so I hope you will able to understand. I have 3 variables called "Indonesian" "Portuguese" and "English" 1 line = 1 individual Example, Individual 1 answered below...
View ArticleDrop if
I want to drop variables if they contain missing values beyond a specific threshold (in my case it is 67), so I tried the following, but it throws an error message. My variables are sequentially...
View ArticleProportion variable
Hello, how do I create a proportion variable that is based on an indicator variable. For example, I have the total number of teachers within each school and I want the proportion of teachers who have a...
View ArticleUnusual apearance of line graph for cumulative incidence
I would appreciate some adive I have a dataset of 1800 patients who are followed up over 1-15 years (mean 5) at roughly 1 year intervals. I have calculated the cumulative incidence of a new event named...
View ArticleGrouping names based on frequent occurrences of particular strings
Dear All I am trying to automatize the following task Here is a snapshot of my data [CODE] * Example generated by -dataex-. To install: ssc install dataex clear input str40 lender_name "3I GROUP PLC"...
View ArticleExport excel factor analysis
hi everyone, I want to export the loadings of the factor analysis. The following code is working but I would like to have the name of the variables corresponding to each loading and to filter only the...
View ArticleBalancing in propensity score matching
Hi All, I have two groups that I have propensity score matched, but before I analyse the outcomes I want to ensure my groups are adequately balanced on the covariates I used to generate the propensity...
View ArticleSearching for numbers in a string of numbers
I have a string variable (numberlist) that contains a list of numbers with spaces in between them (e.g. "41 54 1 46 54 23"). I want to see if a different variable in my dataset (id) is in this list of...
View ArticleUsing display to reproduce code without Stata interpretation of code
Hey Statalist Community, Apologies for all the code snippets, but I figured the best way for me to explain the issue and my desired outcome is to provide a reproducible example. I appreciate your help....
View Articlenonconsecutive year and executive move
Hi All, I have very limited knowledge of stata, but the thing is that I have to finish my term paper very soon. I would greatly appreciate your reply to my post. I would like to ask you very simple...
View ArticleLooping (forvalues) to calculate pack-years of cigarette smoked
Dear members of Statalist, I am trying to derive pack years of cigarette from information on peoples smoking history using forvalue looping command. My main challenge is to take into account the...
View Articleconsecutive model numbers in multiple "esttab" outputs
Dear all, I run many regression models that I try to convert to latex tables directly using the esttab function. My problem now is that, say, I am running 8 regression models, saving them (in my case,...
View ArticleHow to substring medical record data
I have data from medical records, where a variable (reason for consult) is text (stored as strL). In about 80% of the responses, the entry starts with the following text: *************** [last name],...
View Article