Hi all,
The "meantest" command provides a simple way to conduct a paired t-test comparing the mean values between TWO series.
The help says:
"""
Paired test
In the primary case (only) the --paired option can be given, to test the null hypothesis that the mean difference between the paired values of the two series arguments is zero. Otherwise, pairing is not assumed.
"""
Take the following example which I would expect to fail as only a single series is provided:
<hansl>
open mrw --quiet
summary gdpgrow --simple
meantest gdpgrow --paired
</>
However, the output is:
"""
Summary statistics, using the observations 1 - 121
for the variable 'gdpgrow' (117 valid observations)
Mean 4.09402
Minimum -0.900000
Maximum 9.20000
Standard deviation 1.89146
Missing obs. 4
Paired difference test
Number of observations = 117
Sample mean paired difference = 3.09402
Null hypothesis: The population mean difference is zero.
Estimated standard error = 0.174866
Test statistic: t(116) = 17.6937
p-value (two-tailed) = 9.72895e-35
"""
It looks as in case no 2nd series is provided, the test compares to a constant series - compare with this:
<hansl>
# Compare
series y = 1
meantest gdpgrow y --paired
</>
I guess that should be mentioned in the help text or output. Alternatively, an error may be flagged as two series are expected.
Best
Artur