[R] test hypothesis in R
David Winsemius
dwinsemius at comcast.net
Thu Mar 24 01:41:21 CET 2016
> On Mar 23, 2016, at 1:44 PM, ruipbarradas at sapo.pt wrote:
>
> Hello,
>
> Try
>
> ?t.test
> t.test(mA, mB, alternative = "greater")
>
> Hope this helps,
>
> Rui Barradas
>
>
> Citando Eliza Botto <eliza_botto at outlook.com>:
>
>> Dear All,
>> I want to test a hypothesis in R by using student' t-test (P-values).
>> The hypothesis is that model A produces lesser error than model B at
>> ten stations. Obviously, Null Hypothesis (H0) is that the error
>> produces by model A is not lower than model B.
NOT "obviously". You only get to do one-sided tests when the scientific question would not allow the possibility of a departure to "the other side".
Two-sided tests are the norm in scientific literature, often to the experimenter's distress when they haven't done a thoughtful (non-optimistic) power analysis and their results are inconclusive as a result. Your hypothesis _should_ have been constructed _before_ you saw the data. That is if you want to be an ethical scientist.
>> The error magnitudes are
>>
>> #model A
>>> dput(mA)
>>
>> c(36.1956086452583, 34.9996207622861, 36.435733025221,
>> 37.2003157636202, 36.1318687775115, 37.164132533536,
>> 35.2028759357069, 36.7719835944373, 38.3861425339751,
>> 37.4174132119744)
>> #model B
>>> dput(mB)
>>
>> c(39.7655211768704, 40.1730916643841, 39.3699055738618,
>> 39.401619831763, 41.1218634441457, 39.1968630742826,
>> 40.5265825061639, 40.4674956975404, 40.5954427072364,
>> 41.4875529130543)
Those are not models. They are just vectors of numbers. And they seem unlikely to be residual errors of a linear model since they are not centered on zero. I doubt there is enough in your presentation for a sensible comment on the proper analysis.
--
David.
>>
>> Now can I test my hypothesis in R?
>> Thankyou very much in Advance,
>> Eliza
>> [[alternative HTML version deleted]]
>>
>> ______________________________________________
David Winsemius
Alameda, CA, USA
More information about the R-help
mailing list