# assign estimated values Classic List Threaded 4 messages Open this post in threaded view
|

## assign estimated values

 This post has NOT been accepted by the mailing list yet. CONTENTS DELETED The author has deleted this message.
Open this post in threaded view
|

## Re: assign estimated values

 malaka wrote Hi, I want to assign the ar1 , ma 1 and the intercept estimated by the following code to three variables a, b and c respectively. Can anyone help me with this please? code: a0 = 0.05; a1 = 0.1; b1 = 0.85 nu = rnorm(2500) epsi = rep(0, 2500) h = rep(0, 2500) for (i in 2: 2500) { h[i] = a0 + a1 * epsi[i-1]^2 + b1 * h[i-1]  ; epsi[i] = nu[i] * sqrt(h[i])} epsi = epsi[1501:2500] epsi=epsi*epsi arma(epsi,order=c(1,1)) You haven't specified a library for the arma function. Your code doesn't work for me in the form you posted it. However, changing ... arma(epsi, order=c(1,1)) to mod = arima(epsi, order=c(1,0,1)) You can extract the parameters of interest using a= mod\$coef["ar1"] b= mod\$coef["ma1"] c= mod\$coef["intercept"] HTH Pete