Description Usage Arguments Details Value Author(s) Examples
View source: R/print_iteration.R
print_iteration Gives the updated parameter values in correct form
1 | print_iteration(para, p, q, diff, finish, t, m)
|
para |
vector of updated parameter values |
p |
ar order |
q |
ma order |
diff |
difference from last iteration |
method |
"Delta_l_x" or "MA_1" or "MA_k" : Stopping Criteria used |
t |
index of iteration |
m |
number of Monte-Carlo samples used in eevaluating the E-step |
None
prints updated values of the iterations
Hannah Lennon <drhannahlennon@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | print_iteration(c(0.4, 0.4, 0.4), 2, 2, 4, TRUE, 10, 1)
## The function is currently defined as
print_iteration<-function(para, p, q, diff, finish, t, m){
if(p==1){
cat(t-1, 'phi1=', para[1], 'theta1=', para[(p+1)], 'theta2=', para[(p+2)], 'Delta_x=',
diff, 'Stop?=', finish, "m=", m,'\n')
}
if(p==2){
cat(t-1, 'phi1=', para[1], 'phi2=', para[2], 'theta1=', para[(p+1)], 'theta2=', para[(p+2)], 'Delta_x=',
diff, 'Stop?=', finish, "m=", m,'\n')
}
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.