Simple regression with two types of fixed effects?
Hey guys, I would like to run a simple regression with two types of fixed effects for borrowers and banks (e.g. borrower_id and bank_id). I cannot use dummy variables because there are two many...
View ArticlePower analysis, calculating means/sds inline.
I want to run a power analysis, but instead of manually entering the Means and SDs Code: power twomeans 764905.4 471891.6, sd1(98983.71) sd2(68548.43) I would like to have it calculated on the fly,...
View ArticleWald Tests on Multiply Imputed Complex Survey Data
Hello, I am running a multinomial regression on data from a complex survey, with several variables that were imputed with MICE. I want to use Wald test to compare coefficients, but have been unable to...
View ArticleCreating Monthly Averages Across Years
Dear all, I have an unbalanced panel of large T small N data filled with online prices. As they are seasonal, I'm trying to de-seasonalize such data by smoothing the data via an linear MA smooth. Next,...
View ArticleReshape from wide to long, error
Good morning, I am using reshape on Stata 14. I am trying to convert my data from wide to long. I have data from a choice experiment, and each one of the 60 choice variables is called base_choice_n_ ,...
View ArticleFixed effects Poisson regression, partialling out, and ppml.
Dear Statalist,I am working with a zip code level annual crime count data for the period 2000-2008. There was a regulatory change in one state in the middle of the panel data, say 2004, that I suspect...
View ArticleUsing temporary string variables in eststo names
Hi all, I have been perplexed with saving sets of regression results using string variables I have stored in a temporary variable while using eststo. I am hoping someone has some advice for me. Assume...
View ArticleTurning observations into values
Hello, I have a dataset with paired observations that I would like to turn into single observations across more variables. For example, my data looks like this... ID v1 v2 v3 701 1 12 0 702 2 13 1 703...
View ArticleHelp with panel data
Hi, I have a panel with a small N (15 countries) and a small T (20 years). The Hausman Test and the Breusch and Pagan Lagrangian multiplier test indicate that I should choose the random-effects over...
View Articledifferent outcomes from margins after logit model
Hi, I found there's a discrepency when using magrins after a logit model when I replace ## with a manually created interaction term. (1) Code: logit y c.school##i.imm ,or vce(robust) nolog...
View ArticleUsing grqreg to obtain graph by quantile of non-linear effect
Fellow Statlist subscribers, I have the following model: Y_{it}= alpha_i + B1*weight_{it} + B2*Dummy_Foreign_i + B3*(weight*Dummy_Foreign)_{it} + e_{it} and I am interested on the effect on Y of weight...
View ArticleIdentifying and Numbering Unique Observations -- Going from Long to Wide
Hi STATALIST, I am having a bit of an issue with trying to turn Cancer Registry data from long to wide. I have the following variables: ID (id) Sex (sex) Age at Enrollment (age_E) Age at Diagnosis...
View ArticleVariance decomposition
Hi everyone, I would like to ask your help about the decomposition of variance. In fact, I tried to follow this paper ( https://www.newyorkfed.org/medialibr...orts/sr154.pdf ) to decompose the variance...
View ArticleEstimating treatment effect by gender with endogenous and clustered treatment...
Dear Stata-List, I want to estimate the effect of an educational intervention (=treatment) on earnings by gender. I am seeking for advise for two questions. First, I am not entirely sure whether the...
View ArticleIdentifying recurrent cases of a prior condition
I am using Stata/IC v14.1 to compile cancer statistics. In the following simulated table, each row represents one diagnosis of cancer (dx), diagnosed (datedx) in one person (id). Within each...
View ArticleConverting a numeric (double) variable type to Stata Internal Date
I am attempting to convert a variable <date> obtained from a registry database, which displays using list as: 17oct1940 00:00:00. Codebook identifies this as a numeric (double) variable type,...
View ArticleIntegration of continous and binary endogenous variables
Hello there, at the moment I´m trying to dig deeper into the (structural) estimation of a model with the outlined structure (see below). Right now, because of several endogeneity issues I´m trying out...
View ArticleUsing esttab in a loop
I have a list of 20 variables. I would like to create a loop over these variables and run a regression. Each variable will serve as my y variable. I also want stata to produce an excel table of the...
View ArticleClustering, SE goes down
Good Morning, I am currently working with a Panel dataset defined as follows: Code: * Example generated by -dataex-. To install: ssc install dataex clear input int year byte(ID n_events) float(time...
View ArticleCombining two or three discontinious series in one Dataset
Hello Guys, I am currently preparing a Dataset from the old ILO Database and have issues with discontinuous series within one dataset. The dataset is attached and in wide format. Here an example: The...
View Article