How to calculate the p-value of parameters for ARIMA model in R? When doing time series  research in R, I found that arima  provides only the coefficient values and their standard errors of fitted model. However, I also want to get the p-value of the coefficients.
I did not find any function that provides the significance of coef.
So I wish to calculate it by myself, but I don't know the degree of freedom in the t or chisq distribution of the coefficients. So my question is how to get the p-values for the coefficients of fitted arima model in R?
 A: The "t value" is the ratio of the coefficient to the standard error. The degrees of freedom (ndf) would be the number of observations minus the max order of difference in the model minus the number of estimated coefficients. The "F value " would be the square of the "t value" In order to exactly compute probability you would have to call a non-central chi-square function and pass in the F value and the degrees of freedom (1,ndf) or perhaps simply call an F function lookup.
A: Since arima uses maximum likelihood for estimation, the coefficients are assymptoticaly normal. Hence divide coefficients by their standard errors to get the z-statistics and then calculate p-values. Here is the example with in R with the first example from arima  help page:
> aa <- arima(lh, order = c(1,0,0))
> aa

Call:
arima(x = lh, order = c(1, 0, 0))

Coefficients:
         ar1  intercept
      0.5739     2.4133
s.e.  0.1161     0.1466

sigma^2 estimated as 0.1975:  log likelihood = -29.38,  aic = 64.76
> (1-pnorm(abs(aa$coef)/sqrt(diag(aa$var.coef))))*2
         ar1    intercept 
1.935776e-07 0.000000e+00 

The last line gives the p-values.
A: You could also use coeftest from lmtestpackage:
> aa <- arima(lh, order = c(1,0,0))

> coeftest(aa)

z test of coefficients:

          Estimate Std. Error z value  Pr(>|z|)    
ar1        0.57393    0.11614  4.9417 7.743e-07 ***
intercept  2.41329    0.14661 16.4602 < 2.2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

