[R-SIG-Finance] standard error and p-value for the estimated parameter in AR model
Matthieu Stigler
matthieu.stigler at gmail.com
Tue Jun 23 14:14:04 CEST 2009
without code or output it is difficult to answer your question. Please
show the specifical series where the problem occurs, show what print(a)
and str(a) gives.
Matthieu
PS: Please send your question on the mailing list and eventually cc to
people
FMH a écrit :
> Hi Matthieu,
>
> Thank you for you advice.
>
> Actually, I have 3000 series' of the residuals and have used an AR(1)
> model for each series. As mentioned before, i 'd like to compute the
> p-value for the parameter in each series.
>
> When i started using 'for' loop function, the program suddenly stopped
> at the second series. I then used the command suggested
> sqrt(diag(ar(residual)$asy.var.coef)) for this second series series to
> find out the problem and the results show 'NULL ' output. To check
> whether my coding is correct, i then apply the same code to the first
> and third series, and there is no problem, where it successfully gives
> me the standard error for the parameter. This indicates that there is
> something wrong with the second series in computing the standard error
> for the parameter. I tried to plot the second residuals series, but
> there is no sign of problem graphically.
>
> Maybe you or someone could give some advice on this matter?
>
> Thank you
>
> Fir
>
> ------------------------------------------------------------------------
> *From:* Matthieu Stigler <matthieu.stigler at gmail.com>
> *To:* r-sig-finance at stat.math.ethz.ch
> *Cc:* FMH <kagba2006 at yahoo.com>
> *Sent:* Monday, June 22, 2009 8:23:59 PM
> *Subject:* Re: [R-SIG-Finance] standard error and p-value for the
> estimated parameter in AR model
>
> Hi
>
> as you can see:
>
> methods(class="ar")
>
> there is no summary() nor confint() function for class ar :-(
>
> But if you check values returnd by ar:
>
> str(ar(lh))
>
>
> you see there is: asy.var.coef
> so with:
>
> sqrt(diag(ar(lh)$asy.var.coef))
>
>
> You get standard errors and can compute the corresponding p-values.
>
> Mat
>
> FMH a écrit :
> > Dear All,
> >
> > I used an AR(1) model to explain the process of the stationary
> residual and have used an 'ar' command in R. From the results, i tried
> to extract the standard error and p-value for the estimated parameter,
> but unfortunately, i never find any way to extract it from the output.
> > What i did was, i assigned the residuals into the 'residual' object
> in R and used an 'ar' function as below.
> >
> >> residual <- residuals
> >> ar(residual, aic = TRUE, method = "mle", order.max = 1)
> >
> > Could someone help me to extract the stadard error and the p-value
> for the estimated parameter, please?
> >
> > Thank you
> >
> > Fir
> >
> >
> > [[alternative HTML version deleted]]
> >
> >
> ------------------------------------------------------------------------
> >
> > _______________________________________________
> > R-SIG-Finance at stat.math.ethz.ch
> <mailto:R-SIG-Finance at stat.math.ethz.ch> mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > -- Subscriber-posting only.
> > -- If you want to post, subscribe first.
>
>
More information about the R-SIG-Finance
mailing list