Quantcast
Channel: Statalist
Browsing all 73331 articles
Browse latest View live
↧

Counterfactual after fixed effect estimation (pb with xbu option)

Hi, I can't find my way around the behaviour of the xbu option when trying to compute a counterfactual. I run an estimation with fixed effects like thisxi: xtreg lexports $regressors fe1 fe2, fe...

View Article


IV with Endogenous Interaction and Fixed Effects

Hi Statalist, I have a question regarding estimating an Instrumental Variables regression for a large cross-section data set in which I have approximately 260 districts on which I would like to run...

View Article


String Var: Extract sentence based on a single word

I need to know if in my string variable (COMMENTS) mention the drug suboxone. I create a variable in which 1 means suboxone was in the string variable. replace COMMENTS = lower( COMMENTS ) gen K2SUB=0...

View Article

teffects nnmatch

Hello, I am doing some work with teffects on a large dataset (10 million observations). Unfortunately, I cannot use the teffects nnmatch command, because the calculation crashed every time I started...

View Article

Deleting observations by common chracteristic

Hi Everyone, I know, this might sound obvious, but it is not quite. I am trying to drop all the observations that share a common household id, if, in a given household, there is a household head which...

View Article


Convert variable from string to date

Hi everyone, I have a simple question: how do I convert a string variable to a date variable? The variable "date" currently contains years/quarters. Here is sample data: 1998q1 1998q2 1998q3 1998q4...

View Article

Count and duplicate observations

I'm very new to Stata and am trying to find a short cut that will allow me to count the number of observations with a particular value for one variable and then duplicate another variable the same...

View Article

Prediction after -menbreg-

I am estimating teacher effects on student absences with longitudinal data. Since absences have overdispersion, I decided to use negative binomial model instead of a poisson, combined with random...

View Article


The same data, the same codes, different decomposition results

Hello, I'm using Blinder-Oaxaca decomposition method to study gender wage gap using four waves of the PSID. I used the command, Oaxaca, to implement in Stata and realized it produces different results...

View Article


Image may be NSFW.
Clik here to view.

Is it possible to edit STATA do-files within VBA? (Or the other way around?)

Hello, I have Stata 12 installed on my computer (I'll include a picture of the folder at the end of this post). I do not have administrator rights on my computer, but I can have them temporarily added...

View Article

Separating observations into subcategories

Hello, I have a data of chocolate consumption by 1000 person per year for 20 years. The data is currently in long form and I will need to reshape it to wide. I plan to use snackID as my j. A person's...

View Article

Replace Values

My dataset is currently set up as Var1, Var2....Var50, Var51, Var52...Var100 I would like to set the values of variables 1-50 as variables 51- 100 Essentially using : label values Var1 Var51 label...

View Article

Error-correction based Granger causality

Dear users, I am writing a code to test granger causality between two variable: lnrgdp and lndmcy. Would you give me some comment on the following code? Is it right? use vndata, clear local lag 1 reg...

View Article


How to get the between group HR for each sex within each age band from an...

removed - coudnt delete. Sorry.

View Article

Merging question

I have the following situation: One file contains behavioral data, 14 observations per person, with two columns indicating the start time and end time of an observation One file contains...

View Article


How to display multiple stars in correlation matrix

I have generated a Pearson correlation matrix using the pwcorr command. Could anyone help me out with a way to display one or several stars depending on the significance level? E.g.: * for p<0.05...

View Article

Mixlogit output problems

Hi all, I'm running a discrete choice experiment on e-invoicing. Each respondent is presented 8 choice experiments containing 3 alternatives with 8 atributes each. For each choise experiment, the...

View Article


no standard errors and confidence intervals with random effects in...

I am trying to estimate a mixed effects regression model using xtmixed on imputed data. The model runs fine when I have just a classroom-level random intercept. But if I include random effects for the...

View Article

Writing matrix to excel with star

Dear, I have a matrix as follows. HTML Code: t F Fs statistic 8.5545988 -.02655699 7.8201879 p-value .00809594 .97903267 .0028955 How can I write it to a spreadsheet with star on each statistics....

View Article

Image may be NSFW.
Clik here to view.

How do I use est store to store estimations?????

So I want to test the equivalent of two coefficients from two models, so I used the following code: probit y1 x1 i.year if a==1 est store eq1 probit y2 x2 i.year if a==0 est store eq2 suest eq1 eq2,...

View Article
Browsing all 73331 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>