What is the code for constructing a histogram of the residuals in a linear...
I have observations on hourly wage rates, education, and other variables from the 2008 Current Population Survey. I constructed a histogram of the wage variable and natural log of the wage variable...
View ArticleWrong number of observations
Hi folks, I have 1130 observations but when I run my regression model, STATA shows 493 as number of observations. I am really confused! I wonder if someone can help me.
View ArticleHow to reset clock in multiple-failure survival data?
Hi, I have data like the following. ID begin end fail X 1 0 1 0 10 1 1 2 0 12 1 2 3 1 13 1 3 4 0 5 1 4 5 0 6 1 5 6 1 7 I want to set the origin at begin=0 and right after each failure occurs (in this...
View Articledecimal places
Hello, I want to set maximum 3 decimal places for my output. How can I do that? for example how would I be able to apply these decimals places command in tabstat, regression and correlation analysis ?...
View ArticleReshaping into one line
Hello - I would like reshape my data from long into wide and end up having just one row. I have cluster x y 101 1 5 102 2 6 103 3 7 104 4 8 And I would like it to be x101 y101 x102 y102 x103 y103 x104...
View ArticleMann-Whitney U
Hello, This is my first post on this forum, and my first question: I cannot find a command that would return a value of Mann-Whitney U (for example, after . ranksum). Am I missing something? Thanks a...
View ArticleDroping observations under condition without dropping missing values
Hello all, I am trying to drop observations for specific conditions (< and >). However, with the drop command the missing values are also dropped. Is it possible to keep them in? I already tried...
View Articlehow to perform Sargon's test after a 3SLS estimation
Hi everyone: I wanted to test whether the IV is overidentified after a 3SLS estimation. Code: reg3... estat overid and it reports Code: invalid subcommand overid Is there anything wrong? thanks!
View ArticleTabstat (or Tab, Sum)
I am creating some simple tables using tab, sum and want to switch my statistic to median (instead of mean). Do I need to use tabstat, and how do I do that?
View ArticleInterpretation predicted probabilities after a discrete time event history...
Dear Statalisters, I have a question on how to interpret predicted probabilities after a discrete time event history analysis with interaction effects. I use a person-month datafile (dependent variable...
View ArticleAdo-Mode
Hi, I am actively using Ado-mode in Emacs. Btw, thank you for writing it, it's great. I have an issue though. Sometimes I am running different instances of Stata in Windows. When I send a job from...
View ArticleConditional Logit: Outcome Does Not Vary In Any Group (r2000)
Dear all, I want to investigate what factors contribute to the probability of a target to be taken over, so as to eventually make out-of sample predictions. For this, I have two datasets. One consists...
View ArticleError r(2000) when running pstest
Hi everyone, I have a question about an error message I received after running the pstest command. I ran the pstest command right after running a propensity score matching using the psmatch2 command:...
View ArticleArrange summary and correlation matrix by size
This seems like a very basic question, but I haven't been able to find any guidance on this. I am trying to arrange the reporting of a series of summaries by magnitude (either frequency or mean)....
View ArticleGen Date based on "day/month/year" excel type
Hi all !! I have work with my data base. I try to create a variable "date1" which is the same than my variable in red "date". When I do : gen date1=td(4jan1999)+_n-1 tsset date1, daily It works but the...
View ArticlePooled cross-sectional data analysis using MLMs in STATA
I want to run a multi-level model for pooled cross sectional data. What command can I use to specify the data structure? So far I have found information on cross-sectional and longitudinal data...
View Articleanti diagonal matrix in mata?
Is there a function that creates anti diagonal matrix from some vector, something like reverse diag() ?
View ArticleWooldridge Test and Serial Correlation Question
Hello, I have TSCS data set (11 groups, 6 years each) and I am using a random effects OLS model with a discrete dependent variable. I have a time variable measuring the number of years since each...
View ArticleGMM and Minium Distance
Hi all, I have a dataset consisting of n observations for two variables Y and X. I have a theoretical model that tells me the population relationship between Y and X in terms of two coefficients (let...
View ArticleThe joint significant of spatial fixed effect and time fixed effect.
Dear Statalist. I am very sorry if this question to be naive and silly. My data include 63 unit and 5 time period. I am doing a spatial analyze with the Spatial Durbin Model (SDM) and I need to do the...
View Article