Using mi xeq for making new variables
Hi, I am facing some problems in making a new variable in multiple imputed dataset. I need to make a new variable (h) that is equal to 1 if x1-x5 are all equal to 1. Else =0 (excluding any missing on...
View Articleusing prtesti (Difference in Proportions) with loop through dataset (no raw...
Hello - I have a dataset with N's and percents for two years for 50+ variables and I want to calculate a difference in proportions. Is there anyway to use a loop (or some other macro like function) to...
View ArticleNo unique identifier, but data in correct order
The data that I've imported from Excel into Stata is in the order I'd like, specifically: Account 1, month 1 Account 1, month 2 … Account 13565, month 71 Account 13565, month 72 but there is no...
View ArticleOutreg2 to replace marginal effects in Probit
Dear Stata users, I am trying to get marginal effects from 1st stage selection equation in Heckman and and wondering whether Outreg2 could possibly help me in replacing the marginal effects in the...
View ArticleRolling variance
Hello, I am using stata 12 and I woud like to make a rolling variance with a window of 3 for my variable Profitbeforetax. Could anyone help me with a commando? Thanks in advance Victor
View Articleremove strange symbol from split string variable
I tried to split a string variable, there is a response including ""�"". How do I get rid of this weird symbol? The ultimate goal is to generate new 0-1 variable for each response. . tab...
View ArticleEstimating constants that solve a system of non-linear equations
Hi all, I have a question about how to solve a system of non-linear equations with uncorrelated data. I've researched nl and nlsur for this purpose and I'm able to get nlsur to work for a particular...
View ArticleClustering standard errors
Hello Statalists, I am using Stata12 and would like to do a regression analysis. Is there a difference between reg .... , vce(cluster var) and reg .... , cluster(var)? Can I use "robust" in addition to...
View Articlenew variable with means of existing variable, but without repeated values
I've look to other related posts before posting to avoid repeating subjects. I have a data set of microbiological data from various test sites in the same subject (repeated measures in the same...
View ArticleCreating funnel plot from Odds Ratios and C.I.
Hi all, I am doing meta-analysis where data available from original studies are: odds ratios and their confidence intervals. I was able to create forest plot using the command: "metan logrr loglow_95...
View Articlenl with constrained equation
Hello Statlist, I need help. I want to perform a non linear regression with constrain. I want to estimate this equation: d* 5*int((Xb)/5) + (1-d)*Xb; d=1 if Za>.5 and d=0 if Za<=.5 I run this on...
View ArticleGenerating and storing multiple estimates sequentially
I have a dataset on buyers and sellers and their transactions for multiple years. It looks like the following: Code: * Example generated by -dataex-. To install: ssc install dataex clear input...
View ArticleInterpretation of regression results
Hello Statalists, I am using Stata12 and trying to find out whether men reach a higher return compared to women. I am using a logarithmical independant variable. Return is given in percent, such as...
View ArticleQuantile regression with clustered errors
Good evening, I would like to ask a question about quantile regression with clustered standard errors. I have read the paper from Parente and Silva and I am using the command qreg2 in Stata to perform...
View ArticleHow to include instrument variables in longitudinal, cross-classified...
Hello, I am using xtmixed to run a relatively simply cross-classified (firms within both industries and countries) multilevel (longitudinal) model. The model (simplified) looks something like: xtmixed...
View ArticleDistribute proportion of frequencies into another observation
Hello, I have 2 variables. One is pickup location and the other is drop-off location. They both have n=8 possible locations. 27% of my data has pickup location = drop-off location. Ex: Pickup Drop-off...
View ArticleOutreg2 both coefficients and marginal effects for clogit model
Hi all, I am wondering if there is a way to use outreg2 or estout to produce tables with a logit coefficient and then a marginal effect below it. Ideally, I would like to see: Coeff* (SE) [ME]...
View ArticleExtracting individual ID from household ID
I have a dataset that has household ID and individual ID. But the problem is individual ID is unique upto a household, which means if hhid is 1, under that ID, if there are four family members,...
View Articletwo-stage-ordered-probit-least-squares
Dear all, The title of my project is "The impact of alcohol consumption on wages of employees in South Korea". I am trying to deal with a problem of reverse causality of wages and alcohol consumption....
View ArticleTesting of difference between quantile-specific coefficients with weights and...
Dear Statalist, I am applying quantile regressions with imputed data and pweights and have problems testing whether differences between quantile coefficient estimates are significant. I managed to...
View Article