add new observation in empty dataset
Dear Stata users, I have a quick question. I have a dataset with 10 variables but no observations. I would like to generate a new variable that indicates that the dataset has no observations. I thought...
View ArticleUsing xi to create design matrix of dummies / alternatives to xi3 and desmat?
Dear community, I'm looking for a way to create a designmatrix for a model with categorical variables using Stata's factor notation as input. Basically I want to do what the no longer available xi3...
View ArticleStata Journal cumulative index
All articles in the Stata Journal are indexed in RePEc services such as IDEAS (http://ideas.repec.org) and EconPapers (http://econpapers.repec.org). If authors are registered with RePEc (which is free)...
View ArticlePanel data with differing variables
Hi there, I have 4 time periods of panel data. I want to conduct a panel logistic regression in stata. Most variables in the model are included in all 4 time periods, but a handful of variables were...
View ArticleHausman Test.
Dear Statalist Why is it that hausman test cannot be used with vce(robust), vce(cluster cvar). What is the solution for that? Thank you
View ArticleTwo stage regression with complex survey data
For the forum: How would I set up a 2-stage regression for complex survey data in STATA? The outcome variable is either zero or a continuous normally distributed variable, and the covariates are a...
View ArticleSumming a variable for each group
I am having some trouble doing a simple sum in my data. I tried to reshape the data as wide, but it did not work. My data looks something like this: Dsitrict Education Education_code N 1 Primary degree...
View ArticleNeed help: xtabond with Difference GMM and System GMM in Panel Data
Hello everyone, I'm trying to use the Stata 13 to estimate a Dynamic Panel Data with the Difference GMM and System GMM. The first difference equations are: Array Where: Li,t is the dependent variable...
View Articlenon normal residuals in vecm??
Hi, I tried to estimate a vector error correction model, but unfortunately, when I ran some postestimation diagnostic tests such as Jacque-Bera test, it turned out that my errors are not normally...
View ArticleAdjusted R² in Random Effects Model
Hello, I'm making Regressions with the Random Effects Model, but I don't find the command for the adjusted R-Squared. Is there any command for the adjusted R² or is there any command for a similar...
View ArticleMoran test with the command spautoc
Dear statalists I try to perform the Moran test of spatial autocorrelation but it does not work. I get the error message "varlist not allowed" when I do the command: spautoc region nei, weight(x) With...
View ArticleTreatment effects with survey data
Hello, I am working with a stratified sample that has sampling ((inverse probability) weights, which I've set up using svyset. I am interested in testing a categorical outcome based on a categorical...
View Articlestset multiple failure data
Dear List I have asked this question in different ways before, but it turns out I'm sure what i am doing right or wrong. I think my problem is how i stset my multiple failure data. i have the following...
View ArticleNeed help: Calculating marginal effect of interaction terms after -ivprobit-
Hi everyone, I need to determine the marginal effects of interaction terms after the -ivprobit command. Here is my code: * ivprobit fminorsucc (csr1 csr1_capint2 csr1_bBindex1 csr1_volt = csr1iv2...
View ArticleConvert 'accessibility' driving time to logarithmic variable, but it contains...
Hello everyone, Currently I am running a convergence regression. I want to include a variable on the accessibility of a region. The data I have contain several variables on accessibility, all which are...
View ArticleState-year fixed effects vs state specific year trends
Hello, I wanted to clarify if my understanding of including interaction terms in a panel estimation model is correct. Say, we observe outcomes for individual i in group j in state s at time t along...
View Articlextivreg2 and the endogeneity tests
Hi, I am using the xtivreg2 command to estimate a FE-IV model. I would like to ask two questions which regard the endogeneity test, and the versions of it, produced by xtivreg2. 1. If I understand it...
View ArticleHow to generate a dummy variable with a max value
Hi, I currently have a list with birth order, and I would like to generate a new variable that will describe the last born child. Therefore, it will have a value of 1 for the last born child. How is...
View ArticleInserting image in Stata graph
Is there a way to insert/paste an image into a Stata graph from within the Stata environment? Let me explain what I need. I have written a program to read in some data, calculate some index numbers,...
View Articlextfmb command: How to store first-stage regression coefficients
Hi, I am using the Fama-MacBeth (1973) cross-sectional regressions (xtfmb command) and am content with my results; however, I want to be able to store the cross-sectional regression coefficients for...
View Article