This is pretty basic:
Say I want to produce a paired sample t-test of 2 variables V1 and V2. What would be the Stata regression command that will give me the same value of the t-test statistic for the slope being zero?
MWE:
In this example the t-test is 17.9, so I am looking for the regression command of these 2 variables which produces t-statistic for the slope that is equal to 17.9.
(I thought it would be regress mpg price, noconstant but its not)
Say I want to produce a paired sample t-test of 2 variables V1 and V2. What would be the Stata regression command that will give me the same value of the t-test statistic for the slope being zero?
MWE:
Code:
sysuse auto, clear ttest price == mpg
(I thought it would be regress mpg price, noconstant but its not)
Comment