I tried almost all combinations of paste(), bquote(), as.expression(), c(),…
plot(d[,"y"], type="l",xlim=c(1,n), ylim=c(min(d[,"y"]),max(d[,"y"])),
ylab="Y", xlab="T", main="ARMA(1,1)",
sub=c(as.expression(bquote(phi == .(coef_ar)),
as.expression(bquote(theta == .(coef_ma))))))
This just plots “phi = 0.5” (the greek symbol in this case) but not the second part (the theta).
Can anyone help me please!
Thanks!
You can use
substitute.~will concatenate together the expressions with a spaceor you can use
bquotein a similar mannerThe reason your initial approach did not work is because it creates a vector of expressions, and then used only the first element for the subtitle.
If you want
commaseparated values, then uselist(),eg