[R] How to get the t-stat for arima()?

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Mar 20 08:49:09 CET 2013


On 19/03/2013 22:26, Rui Barradas wrote:
> Hello,
>
> Sorry for the error, the sqrt(n - 1) is wrong. Delete it:
>
> t.stat <- coef(fit)/se

Note though that this is a z ratio, not a 't-stat', whatever that is. 
Its utility is moot: coefficients of ARMA models are constrained, and if 
there is more than one, quite a long way from independent.   You cannot 
use this for a test statistic nor for a confidence interval.

If things are not readily available in R it is always good to pause and 
reflect if there might be a good reason.

>
>
> Rui Barradas
>
> Em 19-03-2013 21:11, Rui Barradas escreveu:
>> Hello,
>>
>> Using a dataset in package datasets,
>>
>>
>> n <- length(lh)
>> fit <- arima(lh, order = c(1,0,0))
>>
>> se <- sqrt(diag(vcov(fit)))
>> sqrt(n - 1)*coef(fit)/se   # T stats
>>
>>
>> Hope this helps,
>>
>> Rui Barradas
>>
>> Em 19-03-2013 20:22, Yuan, Rebecca escreveu:
>>> Hello all,
>>>
>>> fit = arima()
>>> and
>>> Summary(fit) will give some summary of the fit. However, the t-stats
>>> are not shown in the summary. How can I get the t-stats of it?
>>>
>>> Thanks,
>>>
>>> Rebecca


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list