ast
stringlengths 16
28.2M
|
---|
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){DuoScattorPlot}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){data1}<LSEP>[](symbol){data2}<LSEP>[](symbol){cutoff}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){main}<LSEP>[](symbol){ylim}<LSEP>[](symbol){xlim}<LSEP>[](symbol){col1}<LSEP>[](symbol){col2}<LSEP>[](symbol){col3}<LSEP>[](symbol){lwd}<LSEP>[](symbol){pch1}<LSEP>[](symbol){pch2}<LSEP>[](symbol){legendloc}<LSEP>[](symbol){legendtxt}<LSEP>[](symbol){ncol}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data1}<LSEP>[](symbol){marker}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data1}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data1}<LSEP>[](symbol){event}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data1}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){main}<LSEP>[](symbol){ylim}<LSEP>[](symbol){xlim}<LSEP>[](symbol){col1}<LSEP>[](symbol){pch1}<LEND>[statement 1; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data1}<LSEP>[](symbol){marker}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data1}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data1}<LSEP>[](symbol){event}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data1}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){col1}<LSEP>[](symbol){pch2}<LSEP>[](symbol){lwd}<LEND>[statement 2; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data2}<LSEP>[](symbol){marker}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data2}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data2}<LSEP>[](symbol){event}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data2}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){main}<LSEP>[](symbol){ylim}<LSEP>[](symbol){xlim}<LSEP>[](symbol){col2}<LSEP>[](symbol){pch1}<LEND>[statement 3; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data2}<LSEP>[](symbol){marker}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data2}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data2}<LSEP>[](symbol){event}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data2}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){col2}<LSEP>[](symbol){pch2}<LSEP>[](symbol){lwd}<LEND>[statement 4; call](){}<LSEP>[](symbol){legend}<LSEP>[](symbol){legendloc}<LSEP>[](symbol){legendtxt}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){col1}<LSEP>[](symbol){col1}<LSEP>[](symbol){col2}<LSEP>[](symbol){col2}<LEND>[](symbol){ncol}<LSEP>[argument 4; litteral](str){n}<LSEP>[argument 5; litteral](real){0.800000}<LEND>[argument 6; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){pch1}<LSEP>[](symbol){pch2}<LSEP>[](symbol){pch1}<LSEP>[](symbol){pch2}<LEND>[statement 5; call](){}<LSEP>[](symbol){abline}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){cutoff}<LEND>[argument 1; litteral](real){3.000000}<LSEP>[](symbol){col3}<LSEP>[](symbol){lwd} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){surv.rate}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){data}<LSEP>[](symbol){cutoff}<LSEP>[](symbol){wts}<LSEP>[](symbol){xwin}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){event}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){event}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){censor}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){censor}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){tmp.fit}<LEND>[call](){}<LSEP>[](symbol){survfit}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){Surv}<LSEP>[](symbol){event}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){data}<LSEP>[](symbol){wts}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){tmp.time}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){tmp.fit}<LEND>[](symbol){time}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){tmp.surv}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){tmp.fit}<LSEP>[](symbol){cutoff}<LEND>[](symbol){surv}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){tmp.surv}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){event}<LEND>[](symbol){cutoff}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){event}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){censor}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){tmp.time}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){tmp.fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){tmp.time}<LEND>[](symbol){surv}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){x}<LSEP>[](symbol){xwin}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){y}<LSEP>[litteral](logical){NA}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){x}<LSEP>[litteral](logical){NA}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){tmp.surv}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){tmp.surv}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>=}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){event}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){censor}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){cutoff}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){y}<LSEP>[litteral](real){1.000000}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){x}<LSEP>[](symbol){xwin}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){y}<LSEP>[](symbol){tmp.surv}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){x}<LSEP>[](symbol){xwin}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){tmp.surv}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){y}<LSEP>[](symbol){tmp.surv}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){x}<LSEP>[](symbol){xwin}<LEND>[statement 7; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){x}<LSEP>[](symbol){y} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){TrioWPCCurve}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){wpc1}<LSEP>[](symbol){wpc2}<LSEP>[](symbol){wpc3}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){main}<LSEP>[](symbol){ylim}<LSEP>[](symbol){xlim}<LSEP>[](symbol){type}<LSEP>[](symbol){col1}<LSEP>[](symbol){col2}<LSEP>[](symbol){col3}<LSEP>[](symbol){lwd}<LSEP>[](symbol){legendloc}<LSEP>[](symbol){legendtxt}<LSEP>[](symbol){confi}<LSEP>[](symbol){ptsest}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc1}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc1}<LSEP>[](symbol){s}<LEND>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){main}<LSEP>[](symbol){ylim}<LSEP>[](symbol){xlim}<LSEP>[](symbol){type}<LSEP>[](symbol){col1}<LSEP>[](symbol){lwd}<LEND>[statement 1; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc2}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc2}<LSEP>[](symbol){s}<LEND>[](symbol){type}<LSEP>[](symbol){col2}<LSEP>[](symbol){lwd}<LEND>[statement 2; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc3}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc3}<LSEP>[](symbol){s}<LEND>[](symbol){type}<LSEP>[](symbol){col3}<LSEP>[](symbol){lwd}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){confi}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){legend}<LSEP>[](symbol){legendloc}<LSEP>[](symbol){legendtxt}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){col1}<LSEP>[](symbol){col2}<LSEP>[](symbol){col3}<LEND>[argument 3; litteral](str){n}<LEND>[argument 4; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 5; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){lwd}<LSEP>[](symbol){lwd}<LSEP>[](symbol){lwd}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){confi}<LSEP>[argument 1; litteral](str){Y}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc1}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc1}<LSEP>[](symbol){lb}<LEND>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){2.000000}<LSEP>[](symbol){col1}<LSEP>[argument 5; litteral](str){l}<LEND>[statement 1; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc1}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc1}<LSEP>[](symbol){ub}<LEND>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){2.000000}<LSEP>[](symbol){col1}<LSEP>[argument 5; litteral](str){l}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){color_transparent}<LEND>[call](){}<LSEP>[](symbol){adjustcolor}<LSEP>[](symbol){col1}<LSEP>[argument 1; litteral](real){0.100000}<LEND>[statement 3; call](){}<LSEP>[](symbol){polygon}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc1}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc1}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc1}<LSEP>[](symbol){lb}<LEND>[argument 1; call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc1}<LSEP>[](symbol){ub}<LEND>[](symbol){color_transparent}<LSEP>[argument 3; litteral](logical){NA}<LEND>[statement 4; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc2}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc2}<LSEP>[](symbol){lb}<LEND>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){2.000000}<LSEP>[](symbol){col2}<LSEP>[argument 5; litteral](str){l}<LEND>[statement 5; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc2}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc2}<LSEP>[](symbol){ub}<LEND>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){2.000000}<LSEP>[](symbol){col2}<LSEP>[argument 5; litteral](str){l}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){color_transparent}<LEND>[call](){}<LSEP>[](symbol){adjustcolor}<LSEP>[](symbol){col2}<LSEP>[argument 1; litteral](real){0.100000}<LEND>[statement 7; call](){}<LSEP>[](symbol){polygon}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc2}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc2}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc2}<LSEP>[](symbol){lb}<LEND>[argument 1; call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc2}<LSEP>[](symbol){ub}<LEND>[](symbol){color_transparent}<LSEP>[argument 3; litteral](logical){NA}<LEND>[statement 8; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc3}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc3}<LSEP>[](symbol){lb}<LEND>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){2.000000}<LSEP>[](symbol){col3}<LSEP>[argument 5; litteral](str){l}<LEND>[statement 9; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc3}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc3}<LSEP>[](symbol){ub}<LEND>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){2.000000}<LSEP>[](symbol){col3}<LSEP>[argument 5; litteral](str){l}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){color_transparent}<LEND>[call](){}<LSEP>[](symbol){adjustcolor}<LSEP>[](symbol){col3}<LSEP>[argument 1; litteral](real){0.100000}<LEND>[statement 11; call](){}<LSEP>[](symbol){polygon}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc3}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc3}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc3}<LSEP>[](symbol){lb}<LEND>[argument 1; call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc3}<LSEP>[](symbol){ub}<LEND>[](symbol){color_transparent}<LSEP>[argument 3; litteral](logical){NA}<LEND>[statement 12; call](){}<LSEP>[](symbol){legend}<LSEP>[](symbol){legendloc}<LSEP>[](symbol){legendtxt}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){col1}<LSEP>[](symbol){col1}<LSEP>[](symbol){col2}<LSEP>[](symbol){col2}<LSEP>[](symbol){col3}<LSEP>[](symbol){col3}<LEND>[argument 3; litteral](str){n}<LEND>[argument 4; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){2.000000}<LSEP>[argument 4; litteral](real){1.000000}<LSEP>[argument 5; litteral](real){2.000000}<LEND>[argument 5; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){lwd}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){lwd}<LSEP>[argument 3; litteral](real){2.000000}<LSEP>[](symbol){lwd}<LSEP>[argument 5; litteral](real){2.000000}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){ptsest}<LSEP>[argument 1; litteral](str){Y}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc1}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc1}<LSEP>[](symbol){y}<LEND>[argument 2; litteral](real){3.000000}<LSEP>[](symbol){col1}<LEND>[statement 1; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc2}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc2}<LSEP>[](symbol){y}<LEND>[argument 2; litteral](real){3.000000}<LSEP>[](symbol){col2}<LEND>[statement 2; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc3}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){wpc3}<LSEP>[](symbol){y}<LEND>[argument 2; litteral](real){3.000000}<LSEP>[](symbol){col3} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){SoloScattorPlot}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){data}<LSEP>[](symbol){cutoff}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){main}<LSEP>[](symbol){ylim}<LSEP>[](symbol){xlim}<LSEP>[](symbol){col1}<LSEP>[](symbol){col2}<LSEP>[](symbol){lwd}<LSEP>[](symbol){pch1}<LSEP>[](symbol){pch2}<LSEP>[](symbol){legendloc}<LSEP>[](symbol){legendtxt}<LSEP>[](symbol){ncol}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){marker}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){event}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){main}<LSEP>[](symbol){ylim}<LSEP>[](symbol){xlim}<LSEP>[](symbol){col1}<LSEP>[](symbol){pch1}<LEND>[statement 1; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){marker}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){event}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){col1}<LSEP>[](symbol){pch2}<LSEP>[](symbol){lwd}<LEND>[statement 2; call](){}<LSEP>[](symbol){legend}<LSEP>[](symbol){legendloc}<LSEP>[](symbol){legendtxt}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){col1}<LSEP>[](symbol){col1}<LEND>[](symbol){ncol}<LSEP>[argument 4; litteral](str){n}<LSEP>[argument 5; litteral](real){0.800000}<LEND>[argument 6; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){pch1}<LSEP>[](symbol){pch2}<LEND>[statement 3; call](){}<LSEP>[](symbol){abline}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){cutoff}<LEND>[argument 1; litteral](real){3.000000}<LSEP>[](symbol){col2}<LSEP>[](symbol){lwd} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){npr.wpc.est}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){event}<LSEP>[](symbol){censor}<LSEP>[](symbol){marker}<LSEP>[](symbol){cutoff}<LSEP>[](symbol){method}<LSEP>[](symbol){weights}<LSEP>[](symbol){wdth}<LSEP>[](symbol){nsub}<LSEP>[](symbol){sspeed}<LSEP>[](symbol){df}<LSEP>[](symbol){confi}<LSEP>[](symbol){nbtsp}<LSEP>[](symbol){quantile}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){method}<LSEP>[argument 1; litteral](str){window.width}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){summary}<LEND>[call](){}<LSEP>[](symbol){ww.windows}<LSEP>[](symbol){event}<LSEP>[](symbol){censor}<LSEP>[](symbol){marker}<LSEP>[](symbol){wdth}<LSEP>[](symbol){sspeed}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){method}<LSEP>[argument 1; litteral](str){number.subjt}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){summary}<LEND>[call](){}<LSEP>[](symbol){ns.windows}<LSEP>[](symbol){event}<LSEP>[](symbol){censor}<LSEP>[](symbol){marker}<LSEP>[](symbol){nsub}<LSEP>[](symbol){sspeed}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){vector}<LSEP>[argument 0; litteral](str){list}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){ntotal}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){x}<LEND>[assign](){=}<LSEP>[](symbol){y}<LEND>[assign](){=}<LSEP>[](symbol){X}<LEND>[assign](){=}<LSEP>[](symbol){Y}<LEND>[assign](){=}<LSEP>[](symbol){s}<LSEP>[litteral](logical){NA}<LEND>[statement 4; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){ntotal}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){nsam}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){weights}<LSEP>[argument 1; litteral](str){uniform}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){winsize}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){wts}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){nsam}<LEND>[](symbol){i}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){weights}<LSEP>[argument 1; litteral](str){normal}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){winsize}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){wts}<LEND>[call](){}<LSEP>[](symbol){dnorm}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){wdata}<LEND>[](symbol){i}<LEND>[](symbol){marker}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){xwin}<LEND>[](symbol){i}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){winsize}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){8.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){weights}<LSEP>[argument 1; litteral](str){trunnormal}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){winsize}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){wts}<LEND>[call](){}<LSEP>[](symbol){dtnorm}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){wdata}<LEND>[](symbol){i}<LEND>[](symbol){marker}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){xwin}<LEND>[](symbol){i}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){winsize}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){8.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){xwin}<LEND>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){winsize}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){8.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){xwin}<LEND>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){winsize}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){8.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){weights}<LSEP>[argument 1; litteral](str){huber}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){winsize}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){wts}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){wdata}<LEND>[](symbol){i}<LEND>[](symbol){marker}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){xwin}<LEND>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){winsize}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){8.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){winsize}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){8.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){wdata}<LEND>[](symbol){i}<LEND>[](symbol){marker}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){xwin}<LEND>[](symbol){i}<LEND>[statement 4; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){fit}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){surv.rate}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){wdata}<LEND>[](symbol){i}<LEND>[](symbol){cutoff}<LSEP>[](symbol){wts}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summary}<LSEP>[](symbol){xwin}<LEND>[](symbol){i}<LEND>[statement 5; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){fit}<LSEP>[](symbol){i}<LEND>[](symbol){x}<LEND>[statement 6; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){fit}<LSEP>[](symbol){i}<LEND>[](symbol){y}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){i}<LEND>[litteral](logical){NA}<LEND>[statement 1; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y}<LSEP>[](symbol){i}<LEND>[litteral](logical){NA}<LEND>[statement 5; assign](){=}<LSEP>[](symbol){Y}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LSEP>[](symbol){y}<LEND>[statement 6; assign](){=}<LSEP>[](symbol){X}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LSEP>[](symbol){x}<LEND>[statement 7; assign](){=}<LSEP>[](symbol){s}<LEND>[call](){}<LSEP>[](symbol){predict}<LEND>[argument 0; call](){}<LSEP>[](symbol){loess}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Y}<LSEP>[](symbol){X}<LEND>[](symbol){df}<LEND>[statement 8; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){s}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[litteral](real){0.000000}<LEND>[statement 9; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){s}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){>=}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[litteral](real){1.000000}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){confi}<LSEP>[argument 1; litteral](str){NO}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){X}<LSEP>[](symbol){Y}<LSEP>[](symbol){s}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){confi}<LSEP>[argument 1; litteral](str){YES}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){marker}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){nxwin}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){event}<LSEP>[](symbol){censor}<LSEP>[](symbol){marker}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){REboot}<LEND>[assign](){=}<LSEP>[](symbol){REcurve}<LEND>[call](){}<LSEP>[](symbol){vector}<LSEP>[argument 0; litteral](str){list}<LSEP>[](symbol){nbtsp}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){REmatrix}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){nxwin}<LSEP>[](symbol){nbtsp}<LEND>[statement 5; assign](){=}<LSEP>[](symbol){sw.lower}<LEND>[assign](){=}<LSEP>[](symbol){sw.upper}<LEND>[assign](){=}<LSEP>[](symbol){slb}<LEND>[assign](){=}<LSEP>[](symbol){sub}<LEND>[assign](){=}<LSEP>[](symbol){lb}<LEND>[assign](){=}<LSEP>[](symbol){ub}<LSEP>[litteral](logical){NA}<LEND>[statement 6; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nbtsp}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){j}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){cur.ix}<LEND>[call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[](symbol){n}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){D}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){cur.ix}<LSEP>[](symbol){}<LEND>[statement 3; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){REboot}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){npr.wpc.est}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){event}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){censor}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){marker}<LEND>[](symbol){cutoff}<LSEP>[](symbol){method}<LSEP>[](symbol){weights}<LSEP>[](symbol){wdth}<LSEP>[](symbol){nsub}<LSEP>[](symbol){sspeed}<LSEP>[](symbol){df}<LEND>[statement 4; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){REcurve}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){REboot}<LSEP>[](symbol){j}<LEND>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){REboot}<LSEP>[](symbol){j}<LEND>[](symbol){s}<LEND>[statement 5; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nxwin}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){REcurve}<LSEP>[](symbol){j}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){REmatrix}<LSEP>[](symbol){i}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){REcurve}<LSEP>[](symbol){j}<LEND>[argument 1; call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){REcurve}<LSEP>[](symbol){j}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){i}<LEND>[argument 2; litteral](real){2.000000}<LEND>[statement 7; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nxwin}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){quant}<LEND>[call](){}<LSEP>[](symbol){quantile}<LEND>[argument 0; call](){}<LSEP>[](symbol){na.omit}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){REmatrix}<LSEP>[](symbol){i}<LSEP>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){quantile}<LEND>[](symbol){quantile}<LEND>[statement 1; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sw.lower}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){max}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){quant}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sw.upper}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){quant}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 8; assign](){=}<LSEP>[](symbol){slb}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LSEP>[](symbol){sw.lower}<LEND>[statement 9; assign](){=}<LSEP>[](symbol){sub}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LSEP>[](symbol){sw.upper}<LEND>[statement 10; assign](){=}<LSEP>[](symbol){lb}<LEND>[call](){}<LSEP>[](symbol){predict}<LEND>[argument 0; call](){}<LSEP>[](symbol){loess}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){slb}<LSEP>[](symbol){X}<LEND>[](symbol){df}<LEND>[statement 11; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lb}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){lb}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[litteral](real){0.000000}<LEND>[statement 12; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lb}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){>=}<LSEP>[](symbol){lb}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[litteral](real){1.000000}<LEND>[statement 13; assign](){=}<LSEP>[](symbol){ub}<LEND>[call](){}<LSEP>[](symbol){predict}<LEND>[argument 0; call](){}<LSEP>[](symbol){loess}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){sub}<LSEP>[](symbol){X}<LEND>[](symbol){df}<LEND>[statement 14; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ub}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){ub}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[litteral](real){0.000000}<LEND>[statement 15; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ub}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){>=}<LSEP>[](symbol){ub}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[litteral](real){1.000000}<LEND>[statement 16; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){X}<LSEP>[](symbol){Y}<LSEP>[](symbol){s}<LSEP>[](symbol){lb}<LSEP>[](symbol){ub} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){TrioScattorPlot}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){data1}<LSEP>[](symbol){data2}<LSEP>[](symbol){data3}<LSEP>[](symbol){cutoff}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){main}<LSEP>[](symbol){ylim}<LSEP>[](symbol){xlim}<LSEP>[](symbol){col1}<LSEP>[](symbol){col2}<LSEP>[](symbol){col3}<LSEP>[](symbol){col4}<LSEP>[](symbol){lwd}<LSEP>[](symbol){pch1}<LSEP>[](symbol){pch2}<LSEP>[](symbol){legendloc}<LSEP>[](symbol){legendtxt}<LSEP>[](symbol){ncol}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data1}<LSEP>[](symbol){marker}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data1}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data1}<LSEP>[](symbol){event}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data1}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){main}<LSEP>[](symbol){ylim}<LSEP>[](symbol){xlim}<LSEP>[](symbol){col1}<LSEP>[](symbol){pch1}<LEND>[statement 1; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data1}<LSEP>[](symbol){marker}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data1}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data1}<LSEP>[](symbol){event}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data1}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){col1}<LSEP>[](symbol){pch2}<LSEP>[](symbol){lwd}<LEND>[statement 2; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data2}<LSEP>[](symbol){marker}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data2}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data2}<LSEP>[](symbol){event}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data2}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){main}<LSEP>[](symbol){ylim}<LSEP>[](symbol){xlim}<LSEP>[](symbol){col2}<LSEP>[](symbol){pch1}<LEND>[statement 3; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data2}<LSEP>[](symbol){marker}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data2}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data2}<LSEP>[](symbol){event}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data2}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){col2}<LSEP>[](symbol){pch2}<LSEP>[](symbol){lwd}<LEND>[statement 4; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data3}<LSEP>[](symbol){marker}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data3}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data3}<LSEP>[](symbol){event}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data3}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){main}<LSEP>[](symbol){ylim}<LSEP>[](symbol){xlim}<LSEP>[](symbol){col3}<LSEP>[](symbol){pch1}<LEND>[statement 5; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data3}<LSEP>[](symbol){marker}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data3}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data3}<LSEP>[](symbol){event}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data3}<LSEP>[](symbol){censor}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){col3}<LSEP>[](symbol){pch2}<LSEP>[](symbol){lwd}<LEND>[statement 6; call](){}<LSEP>[](symbol){legend}<LSEP>[](symbol){legendloc}<LSEP>[](symbol){legendtxt}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){col1}<LSEP>[](symbol){col1}<LSEP>[](symbol){col2}<LSEP>[](symbol){col2}<LSEP>[](symbol){col3}<LSEP>[](symbol){col3}<LEND>[](symbol){ncol}<LSEP>[argument 4; litteral](str){n}<LSEP>[argument 5; litteral](real){0.800000}<LEND>[argument 6; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){pch1}<LSEP>[](symbol){pch2}<LSEP>[](symbol){pch1}<LSEP>[](symbol){pch2}<LSEP>[](symbol){pch1}<LSEP>[](symbol){pch2}<LEND>[statement 7; call](){}<LSEP>[](symbol){abline}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){cutoff}<LEND>[argument 1; litteral](real){3.000000}<LSEP>[](symbol){col3}<LSEP>[](symbol){lwd} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){ww.windows}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){event}<LSEP>[](symbol){censor}<LSEP>[](symbol){marker}<LSEP>[](symbol){wdth}<LSEP>[](symbol){sspeed}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){nwin}<LEND>[call](){}<LSEP>[](symbol){ceiling}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){marker}<LEND>[argument 1; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){marker}<LEND>[](symbol){sspeed}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){xwin}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){marker}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){nwin}<LEND>[](symbol){sspeed}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){ntotal}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){xwin}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){wdata}<LEND>[call](){}<LSEP>[](symbol){vector}<LSEP>[argument 0; litteral](str){list}<LSEP>[](symbol){ntotal}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){wband}<LEND>[assign](){=}<LSEP>[](symbol){nsam}<LEND>[assign](){=}<LSEP>[](symbol){winsize}<LSEP>[litteral](logical){NA}<LEND>[statement 5; assign](){=}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){event}<LSEP>[](symbol){censor}<LSEP>[](symbol){marker}<LEND>[statement 6; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){ntotal}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){wband}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xwin}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){marker}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){marker}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xwin}<LSEP>[](symbol){i}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){wdth}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 1; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){wdata}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){marker}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xwin}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){wband}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){>=}<LSEP>[](symbol){marker}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xwin}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){wband}<LSEP>[](symbol){i}<LEND>[](symbol){}<LEND>[statement 2; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){nsam}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){wdata}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){winsize}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){wband}<LSEP>[](symbol){i}<LEND>[statement 7; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){xwin}<LSEP>[](symbol){ntotal}<LSEP>[](symbol){wdata}<LSEP>[](symbol){nsam}<LSEP>[](symbol){winsize} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){cox.wpc.est}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){event}<LSEP>[](symbol){censor}<LSEP>[](symbol){marker}<LSEP>[](symbol){cutoff}<LSEP>[](symbol){quantile}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){coxmd}<LEND>[call](){}<LSEP>[](symbol){coxph}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){Surv}<LSEP>[](symbol){event}<LSEP>[](symbol){censor}<LEND>[](symbol){marker}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){coxsurvf}<LEND>[call](){}<LSEP>[](symbol){summary}<LEND>[argument 0; call](){}<LSEP>[](symbol){survfit}<LSEP>[](symbol){coxmd}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){marker}<LEND>[](symbol){T}<LSEP>[](symbol){quantile}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){coxfit}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){coxsurvf}<LSEP>[](symbol){surv}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){coxsurvf}<LSEP>[](symbol){time}<LEND>[](symbol){cutoff}<LEND>[](symbol){}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){coxlower}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){coxsurvf}<LSEP>[](symbol){lower}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){coxsurvf}<LSEP>[](symbol){time}<LEND>[](symbol){cutoff}<LEND>[](symbol){}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){coxupper}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){coxsurvf}<LSEP>[](symbol){upper}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){coxsurvf}<LSEP>[](symbol){time}<LEND>[](symbol){cutoff}<LEND>[](symbol){}<LEND>[statement 5; assign](){=}<LSEP>[](symbol){coxre}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){marker}<LSEP>[](symbol){coxfit}<LSEP>[](symbol){coxlower}<LSEP>[](symbol){coxupper}<LEND>[statement 6; assign](){=}<LSEP>[](symbol){coxre}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){coxre}<LEND>[argument 1; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){coxre}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[](symbol){}<LEND>[statement 7; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){coxre}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){coxre}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){coxre}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){coxre}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){coxre}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){4.000000} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){Sys.setenv}<LSEP>[argument 0; litteral](str){}<LEND>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){test_check}<LSEP>[argument 0; litteral](str){forecast} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){Tests for h-step fits with hfi...}<LEND>[statement 1; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){variance test on h-step fits}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){mod1}<LEND>[call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){WWWusage}<LSEP>[argument 1; litteral](str){AAN}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){h1}<LEND>[call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){mod1}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){h2}<LEND>[call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){mod1}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){h1}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){h2}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_lt}<LEND>[argument 0; call](){}<LSEP>[](symbol){var}<LEND>[argument 0; call](){}<LSEP>[](symbol){diff}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){h1}<LSEP>[](symbol){j}<LEND>[argument 1; call](){}<LSEP>[](symbol){var}<LEND>[argument 0; call](){}<LSEP>[](symbol){diff}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){h2}<LSEP>[](symbol){j}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){h2_1}<LEND>[call](){}<LSEP>[](symbol){hfitted}<LSEP>[](symbol){mod1}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LSEP>[](symbol){h2}<LSEP>[](symbol){h2_1}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){mod2}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){WWWusage}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){h1}<LEND>[call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){mod2}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){h2}<LEND>[call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){mod2}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){h1}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){h2}<LEND>[statement 11; call](){}<LSEP>[](symbol){expect_lt}<LEND>[argument 0; call](){}<LSEP>[](symbol){var}<LEND>[argument 0; call](){}<LSEP>[](symbol){diff}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){h1}<LSEP>[](symbol){j}<LEND>[argument 1; call](){}<LSEP>[](symbol){var}<LEND>[argument 0; call](){}<LSEP>[](symbol){diff}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){h2}<LSEP>[](symbol){j}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){mod3}<LEND>[call](){}<LSEP>[](symbol){arfima}<LSEP>[](symbol){WWWusage}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){h1}<LEND>[call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){mod3}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){h2}<LEND>[call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){mod3}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){h1}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){h2}<LEND>[statement 16; call](){}<LSEP>[](symbol){expect_lt}<LEND>[argument 0; call](){}<LSEP>[](symbol){var}<LEND>[argument 0; call](){}<LSEP>[](symbol){diff}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){h1}<LSEP>[](symbol){j}<LEND>[argument 1; call](){}<LSEP>[](symbol){var}<LEND>[argument 0; call](){}<LSEP>[](symbol){diff}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){h2}<LSEP>[](symbol){j}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){mod5}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){WWWusage}<LEND>[statement 18; assign](){<-}<LSEP>[](symbol){h1}<LEND>[call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){mod5}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){h2}<LEND>[call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){mod5}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){h1}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){h2}<LEND>[statement 21; call](){}<LSEP>[](symbol){expect_lt}<LEND>[argument 0; call](){}<LSEP>[](symbol){var}<LEND>[argument 0; call](){}<LSEP>[](symbol){diff}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){h1}<LSEP>[](symbol){j}<LEND>[argument 1; call](){}<LSEP>[](symbol){var}<LEND>[argument 0; call](){}<LSEP>[](symbol){diff}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){h2}<LSEP>[](symbol){j} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){forecast ggplot tests}<LEND>[statement 1; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for autoplot/gg functions}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lungDeaths}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){mdeaths}<LSEP>[](symbol){fdeaths}<LEND>[statement 2; call](){}<LSEP>[](symbol){ggAcf}<LSEP>[](symbol){wineind}<LEND>[statement 3; call](){}<LSEP>[](symbol){autoplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){Acf}<LSEP>[](symbol){wineind}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggAcf}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[](symbol){acf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){acf}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](logical){FALSE}<LSEP>[argument 2; litteral](real){24.000000}<LEND>[](symbol){acf}<LEND>[statement 5; call](){}<LSEP>[](symbol){ggPacf}<LSEP>[](symbol){wineind}<LEND>[statement 6; call](){}<LSEP>[](symbol){autoplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){Pacf}<LSEP>[](symbol){wineind}<LEND>[statement 7; call](){}<LSEP>[](symbol){expect_identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggPacf}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[](symbol){acf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){acf}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](logical){FALSE}<LSEP>[argument 2; litteral](str){partial}<LSEP>[argument 3; litteral](real){24.000000}<LEND>[](symbol){acf}<LEND>[statement 8; call](){}<LSEP>[](symbol){ggCcf}<LSEP>[](symbol){mdeaths}<LSEP>[](symbol){fdeaths}<LEND>[statement 9; call](){}<LSEP>[](symbol){autoplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){Ccf}<LSEP>[](symbol){mdeaths}<LSEP>[](symbol){fdeaths}<LEND>[statement 10; call](){}<LSEP>[](symbol){expect_identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggCcf}<LSEP>[](symbol){mdeaths}<LSEP>[](symbol){fdeaths}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[](symbol){acf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){ccf}<LSEP>[](symbol){mdeaths}<LSEP>[](symbol){fdeaths}<LSEP>[argument 2; litteral](logical){FALSE}<LSEP>[argument 3; litteral](str){correlation}<LSEP>[argument 4; litteral](real){24.000000}<LEND>[](symbol){acf}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){arimafit}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){USAccDeaths}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 12; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){arimafit}<LEND>[statement 13; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){arimafit}<LSEP>[argument 1; litteral](str){ma}<LEND>[statement 14; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){arimafit}<LSEP>[argument 1; litteral](str){ar}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){arfit}<LEND>[call](){}<LSEP>[](symbol){ar}<LSEP>[](symbol){USAccDeaths}<LEND>[statement 16; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){arfit}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){decomposefit}<LEND>[call](){}<LSEP>[](symbol){decompose}<LSEP>[](symbol){USAccDeaths}<LEND>[statement 18; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){decomposefit}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){etsfit}<LEND>[call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){USAccDeaths}<LSEP>[argument 1; litteral](str){ANA}<LEND>[statement 20; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){etsfit}<LEND>[statement 21; assign](){<-}<LSEP>[](symbol){structfit}<LEND>[call](){}<LSEP>[](symbol){StructTS}<LSEP>[](symbol){USAccDeaths}<LEND>[statement 22; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){structfit}<LEND>[statement 23; assign](){<-}<LSEP>[](symbol){stlfit}<LEND>[call](){}<LSEP>[](symbol){stl}<LSEP>[](symbol){USAccDeaths}<LSEP>[argument 1; litteral](str){periodic}<LEND>[statement 24; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){stlfit}<LEND>[statement 25; assign](){<-}<LSEP>[](symbol){etsfcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){etsfit}<LEND>[statement 26; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){etsfcast}<LEND>[statement 27; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){etsfcast}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[statement 28; assign](){<-}<LSEP>[](symbol){lmfit}<LEND>[call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){mpg}<LSEP>[](symbol){disp}<LEND>[](symbol){mtcars}<LEND>[statement 29; assign](){<-}<LSEP>[](symbol){lmfcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){lmfit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LSEP>[argument 0; litteral](real){214.000000}<LEND>[statement 30; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){lmfcast}<LEND>[statement 31; assign](){<-}<LSEP>[](symbol){mfcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){lungDeaths}<LEND>[statement 32; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){mfcast}<LEND>[statement 33; call](){}<LSEP>[](symbol){ggtsdisplay}<LSEP>[](symbol){USAccDeaths}<LSEP>[argument 1; litteral](str){spectrum}<LEND>[statement 34; call](){}<LSEP>[](symbol){ggtsdisplay}<LSEP>[](symbol){USAccDeaths}<LSEP>[argument 1; litteral](str){partial}<LEND>[statement 35; call](){}<LSEP>[](symbol){ggtsdisplay}<LSEP>[](symbol){USAccDeaths}<LSEP>[argument 1; litteral](str){histogram}<LEND>[statement 36; call](){}<LSEP>[](symbol){ggtsdisplay}<LSEP>[](symbol){USAccDeaths}<LSEP>[argument 1; litteral](str){scatter}<LEND>[argument 2; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){theme_bw}<LEND>[statement 37; call](){}<LSEP>[](symbol){gglagplot}<LSEP>[](symbol){woolyrnq}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 38; call](){}<LSEP>[](symbol){gglagplot}<LSEP>[](symbol){lungDeaths}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 39; call](){}<LSEP>[](symbol){gglagplot}<LSEP>[](symbol){WWWusage}<LSEP>[argument 1; litteral](logical){FALSE}<LSEP>[argument 2; litteral](logical){FALSE}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[statement 40; call](){}<LSEP>[](symbol){gglagchull}<LSEP>[](symbol){woolyrnq}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[statement 41; call](){}<LSEP>[](symbol){ggmonthplot}<LSEP>[](symbol){woolyrnq}<LEND>[statement 42; call](){}<LSEP>[](symbol){ggseasonplot}<LSEP>[](symbol){woolyrnq}<LSEP>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 43; call](){}<LSEP>[](symbol){ggseasonplot}<LSEP>[](symbol){USAccDeaths}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[statement 44; assign](){<-}<LSEP>[](symbol){splinefit}<LEND>[call](){}<LSEP>[](symbol){splinef}<LSEP>[](symbol){airmiles}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[statement 45; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){splinefit}<LEND>[statement 46; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){USAccDeaths}<LEND>[statement 47; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){lungDeaths}<LEND>[statement 48; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){lungDeaths}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 49; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){USAccDeaths}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_forecast}<LEND>[statement 50; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){USAccDeaths}<LEND>[argument 1; call](){}<LSEP>[](symbol){autolayer}<LSEP>[](symbol){etsfcast}<LSEP>[argument 1; litteral](str){ETS}<LEND>[statement 51; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){lungDeaths}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_forecast}<LEND>[statement 52; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){lungDeaths}<LEND>[argument 1; call](){}<LSEP>[](symbol){autolayer}<LSEP>[](symbol){mfcast}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){mdeaths}<LSEP>[argument 1; litteral](str){fdeaths}<LEND>[statement 53; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){lungDeaths}<LEND>[argument 1; call](){}<LSEP>[](symbol){autolayer}<LSEP>[](symbol){mfcast}<LEND>[statement 54; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){lungDeaths}<LEND>[argument 1; call](){}<LSEP>[](symbol){autolayer}<LSEP>[](symbol){mfcast}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 55; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){lungDeaths}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_forecast}<LEND>[statement 56; call](){}<LSEP>[](symbol){gghistogram}<LSEP>[](symbol){USAccDeaths}<LSEP>[argument 1; litteral](logical){TRUE} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){Test mforecast.R}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){mv_y}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){120.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){20.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){120.000000}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){7.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){16.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){6.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){mv_x}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){120.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){8.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){42.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){120.000000}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){7.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){20.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){6.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){v_y}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){120.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){8.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){12.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){v_x}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){120.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){28.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[statement 5; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for is.mforecast()}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){mv_y}<LSEP>[](symbol){v_x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LSEP>[argument 0; litteral](real){30.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.mforecast}<LSEP>[](symbol){fcast}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){v_y}<LSEP>[](symbol){v_x}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LSEP>[argument 0; litteral](real){30.000000}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.mforecast}<LSEP>[](symbol){fcast}<LEND>[statement 6; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for mlmsplit()}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){mv_y}<LSEP>[](symbol){v_x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fit1}<LEND>[call](){}<LSEP>[](symbol){mlmsplit}<LSEP>[](symbol){fit}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit2}<LEND>[call](){}<LSEP>[](symbol){mlmsplit}<LSEP>[](symbol){fit}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){fit3}<LEND>[call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mv_y}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[](symbol){v_x}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fit4}<LEND>[call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mv_y}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[](symbol){v_x}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){coefficients}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit3}<LSEP>[](symbol){coefficients}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){coefficients}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit4}<LSEP>[](symbol){coefficients}<LEND>[statement 7; call](){}<LSEP>[](symbol){expect_identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){rank}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit3}<LSEP>[](symbol){rank}<LEND>[statement 8; call](){}<LSEP>[](symbol){expect_identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){rank}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit4}<LSEP>[](symbol){rank}<LEND>[statement 9; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){fitted.values}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit3}<LSEP>[](symbol){fitted.values}<LEND>[statement 10; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){fitted.values}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit4}<LSEP>[](symbol){fitted.values}<LEND>[statement 11; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){mlmsplit}<LSEP>[](symbol){fit}<LEND>[argument 1; litteral](str){Must select lm}<LEND>[statement 7; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for forecast.mlm()}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){mv_y}<LSEP>[](symbol){v_x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LSEP>[argument 0; litteral](real){30.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit2}<LEND>[call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mv_y}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[](symbol){v_x}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){fcast2}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit2}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LSEP>[argument 0; litteral](real){30.000000}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){forecast}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){residuals}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast2}<LSEP>[](symbol){residuals}<LEND>[statement 8; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for forecast.mts()}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lungDeaths}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){mdeaths}<LSEP>[](symbol){fdeaths}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fcast_b}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){lungDeaths}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fcast_m}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){mdeaths}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){fcast_f}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fdeaths}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all.equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast_b}<LSEP>[](symbol){forecast}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast_m}<LSEP>[](symbol){mean}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all.equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast_b}<LSEP>[](symbol){forecast}<LEND>[argument 1; litteral](real){2.000000}<LEND>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast_f}<LSEP>[](symbol){mean}<LEND>[statement 9; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for print.mforecast()}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){mv_y}<LSEP>[](symbol){v_x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LSEP>[argument 0; litteral](real){30.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){fcast}<LEND>[argument 1; litteral](str){Series 1}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){fcast}<LEND>[argument 1; litteral](str){Series 2}<LEND>[statement 10; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for plot.mforecast()}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){mv_y}<LSEP>[](symbol){v_x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LSEP>[argument 0; litteral](real){30.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_silent}<LEND>[argument 0; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){fcast} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){Tests joining data.frames}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){mv_y}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){120.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){20.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){120.000000}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){7.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){16.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){6.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){mv_x}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){120.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){8.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){42.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){120.000000}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){7.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){20.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){6.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){v_y}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){120.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){8.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){12.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){v_x}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){120.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){28.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[statement 5; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests on retaining matrix attr...}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){datamat}<LSEP>[](symbol){mv_y}<LSEP>[](symbol){mv_x}<LSEP>[](symbol){v_y}<LSEP>[](symbol){v_x}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){data}<LEND>[argument 1; litteral](real){8.000000}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){matrix}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){data}<LEND>[argument 1; litteral](str){data.frame}<LEND>[statement 6; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){flatten data.frames}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){mvdata}<LEND>[call](){}<LSEP>[](symbol){datamat}<LSEP>[](symbol){mv_y}<LSEP>[](symbol){mv_x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){vdata}<LEND>[call](){}<LSEP>[](symbol){datamat}<LSEP>[](symbol){v_y}<LSEP>[](symbol){v_x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){datamat}<LSEP>[](symbol){mvdata}<LSEP>[](symbol){vdata}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){data}<LEND>[argument 1; litteral](str){data.frame}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){data.frame}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){Testing splinef()}<LEND>[statement 1; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){Tests for splinef()}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){plot.splineforecast}<LEND>[argument 0; call](){}<LSEP>[](symbol){splinef}<LSEP>[](symbol){airmiles}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fit1}<LEND>[call](){}<LSEP>[](symbol){splinef}<LSEP>[](symbol){woolyrnq}<LSEP>[argument 1; litteral](real){0.200000}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit2}<LEND>[call](){}<LSEP>[](symbol){splinef}<LSEP>[](symbol){woolyrnq}<LSEP>[argument 1; litteral](real){0.200000}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){mean}<LEND>[statement 4; call](){}<LSEP>[](symbol){splinef}<LSEP>[](symbol){woolyrnq}<LSEP>[argument 1; litteral](str){mle}<LEND>[statement 5; call](){}<LSEP>[](symbol){splinef}<LSEP>[](symbol){WWWusage}<LSEP>[argument 1; litteral](str){mle}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){splinef}<LSEP>[](symbol){WWWusage}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){splinef}<LSEP>[](symbol){WWWusage}<LEND>[](symbol){mean}<LEND>[statement 7; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){splinef}<LSEP>[](symbol){woolyrnq}<LSEP>[argument 1; litteral](real){110.000000}<LEND>[statement 8; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){splinef}<LSEP>[](symbol){woolyrnq}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){10.000000} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){Tests on input}<LEND>[statement 1; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for a non-ts object}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){123.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){abc}<LEND>[call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){50.000000}<LSEP>[argument 1; litteral](real){5.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){abc}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){0.000000}<LSEP>[argument 3; litteral](real){0.000000}<LSEP>[argument 4; litteral](real){1.000000}<LSEP>[argument 5; litteral](real){0.000000}<LSEP>[argument 6; litteral](real){0.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for a ts with the season...}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){0.000000}<LSEP>[argument 3; litteral](real){1.000000}<LSEP>[argument 4; litteral](real){12.000000}<LSEP>[argument 5; litteral](real){1.000000}<LSEP>[argument 6; litteral](real){1.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for ARIMA errors}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){fit}<LSEP>[argument 1; litteral](str){regression}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LSEP>[](symbol){wineind}<LEND>[statement 4; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for arimaorder}<LEND>[argument 1; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){ar}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){ma}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fitarima}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){lynx}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){ar}<LSEP>[](symbol){i}<LSEP>[](symbol){ma}<LEND>[argument 2; litteral](str){ML}<LSEP>[argument 3; litteral](logical){TRUE}<LSEP>[argument 4; litteral](real){0.500000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){arextracted}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fitarima}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){iextracted}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fitarima}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){6.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){maextracted}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fitarima}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){fitarima}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){arextracted}<LSEP>[](symbol){iextracted}<LSEP>[](symbol){maextracted}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){fitarima}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){p}<LSEP>[argument 1; litteral](str){d}<LSEP>[argument 2; litteral](str){q}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){fitarima}<LEND>[argument 1; litteral](str){p}<LEND>[](symbol){ar}<LEND>[statement 7; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){fitarima}<LEND>[argument 1; litteral](str){d}<LEND>[](symbol){i}<LEND>[statement 8; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){fitarima}<LEND>[argument 1; litteral](str){q}<LEND>[](symbol){ma}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){arMod}<LEND>[call](){}<LSEP>[](symbol){ar}<LSEP>[](symbol){lynx}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){arMod}<LEND>[argument 1; litteral](str){p}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){arMod}<LEND>[argument 1; litteral](str){d}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){arMod}<LEND>[argument 1; litteral](str){q}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){arMod}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){p}<LSEP>[argument 1; litteral](str){d}<LSEP>[argument 2; litteral](str){q}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){sarimaMod}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 7; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){sarimaMod}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){p}<LSEP>[argument 1; litteral](str){d}<LSEP>[argument 2; litteral](str){q}<LSEP>[argument 3; litteral](str){P}<LSEP>[argument 4; litteral](str){D}<LSEP>[argument 5; litteral](str){Q}<LSEP>[argument 6; litteral](str){Frequency}<LEND>[statement 8; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){sarimaMod}<LEND>[argument 1; litteral](str){p}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 9; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){sarimaMod}<LEND>[argument 1; litteral](str){d}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 10; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){sarimaMod}<LEND>[argument 1; litteral](str){q}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 11; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){sarimaMod}<LEND>[argument 1; litteral](str){P}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 12; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){sarimaMod}<LEND>[argument 1; litteral](str){D}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 13; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){sarimaMod}<LEND>[argument 1; litteral](str){Q}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 14; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){sarimaMod}<LEND>[argument 1; litteral](str){Frequency}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){wineind}<LEND>[statement 15; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){4.000000}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){fracdiffMod}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){fracdiff}<LSEP>[](symbol){fracdiff}<LEND>[](symbol){lynx}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 17; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){fracdiffMod}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){p}<LSEP>[argument 1; litteral](str){d}<LSEP>[argument 2; litteral](str){q}<LEND>[statement 18; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){fracdiffMod}<LEND>[argument 1; litteral](str){p}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 19; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){>=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){fracdiffMod}<LEND>[argument 1; litteral](str){d}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 20; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){fracdiffMod}<LEND>[argument 1; litteral](str){d}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 21; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){fracdiffMod}<LEND>[argument 1; litteral](str){p}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 5; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for forecast.Arima}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit1}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 3; litteral](str){CSS}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast.Arima}<LSEP>[](symbol){fit1}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[argument 1; litteral](str){xreg not required}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast.Arima}<LSEP>[](symbol){fit1}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all.equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast.Arima}<LSEP>[](symbol){fit1}<LSEP>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](real){100.000000}<LEND>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast.Arima}<LSEP>[](symbol){fit1}<LEND>[](symbol){mean}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fit2}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 2; litteral](logical){TRUE}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){drift}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){coef}<LSEP>[](symbol){fit2}<LEND>[statement 7; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast.Arima}<LSEP>[](symbol){fit2}<LEND>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){wineind}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){fit3}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 3; litteral](logical){FALSE}<LEND>[statement 9; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){intercept}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){coef}<LSEP>[](symbol){fit3}<LEND>[statement 10; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast.Arima}<LSEP>[](symbol){fit3}<LEND>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){wineind}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){fit4}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){rnorm}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){wineind}<LEND>[statement 12; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast.Arima}<LSEP>[](symbol){fit4}<LEND>[statement 13; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast.Arima}<LSEP>[](symbol){fit4}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){40.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 14; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast.Arima}<LSEP>[](symbol){fit4}<LEND>[argument 1; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){20.000000}<LEND>[](symbol){mean}<LEND>[](symbol){length}<LEND>[argument 1; call](){}<LSEP>[](symbol){expect_equal}<LSEP>[argument 0; litteral](real){20.000000}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){fit5}<LEND>[call](){}<LSEP>[](symbol){Arima}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){150.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 3; litteral](str){ML}<LEND>[statement 16; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){fit5}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](str){MAPE}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LEND>[argument 0; call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){wineind}<LSEP>[](symbol){fit5}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](str){MAPE}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){fit6}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 3; litteral](str){CSS}<LSEP>[argument 4; litteral](real){5.000000}<LEND>[statement 18; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){coef}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit6}<LSEP>[](symbol){coef}<LEND>[statement 6; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for search.arima}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){444.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){arimasim}<LEND>[call](){}<LSEP>[](symbol){arima.sim}<LSEP>[argument 0; litteral](real){300.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){runif}<LSEP>[argument 0; litteral](real){8.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.100000}<LEND>[argument 2; litteral](real){0.100000}<LEND>[argument 1; call](){}<LSEP>[](symbol){runif}<LSEP>[argument 0; litteral](real){8.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.100000}<LEND>[argument 2; litteral](real){0.100000}<LEND>[argument 2; litteral](real){0.100000}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){>=}<LEND>[argument 0; call](){}<LSEP>[](symbol){AIC}<LEND>[argument 0; call](){}<LSEP>[](symbol){auto.arima}<LSEP>[](symbol){arimasim}<LEND>[argument 1; call](){}<LSEP>[](symbol){AIC}<LEND>[argument 0; call](){}<LSEP>[](symbol){auto.arima}<LSEP>[](symbol){arimasim}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[statement 7; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for forecast.ar()}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fitar}<LEND>[call](){}<LSEP>[](symbol){ar}<LSEP>[](symbol){taylor}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){arfc}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast.ar}<LSEP>[](symbol){fitar}<LEND>[](symbol){mean}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){arfc}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast.ar}<LSEP>[](symbol){fitar}<LSEP>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](real){100.000000}<LEND>[](symbol){mean}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){arfc}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast.ar}<LSEP>[](symbol){fitar}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[](symbol){mean}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast.ar}<LSEP>[](symbol){fitar}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast.ar}<LSEP>[](symbol){fitar}<LSEP>[argument 1; litteral](real){110.000000}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){arfc}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast.ar}<LSEP>[](symbol){fitar}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){mean}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){arfcbc}<LEND>[call](){}<LSEP>[](symbol){forecast.ar}<LSEP>[](symbol){fitar}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){arfcabc}<LEND>[call](){}<LSEP>[](symbol){forecast.ar}<LSEP>[](symbol){fitar}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 9; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){arfcbc}<LSEP>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){arfcabc}<LSEP>[](symbol){mean}<LEND>[statement 8; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for as.character.Arima()}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_match}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){auto.arima}<LSEP>[](symbol){woolyrnq}<LEND>[argument 1; litteral](str){ARIMA} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){test auto.arima() and associat...}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; call](){}<LSEP>[](symbol){auto.arima}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){100.000000}<LEND>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 1; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){345.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){testseries1}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){100.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){100.000000}<LEND>[argument 1; litteral](real){0.100000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){xregmat}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){runif}<LSEP>[argument 0; litteral](real){300.000000}<LEND>[argument 1; litteral](real){3.000000}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[](symbol){auto.arima}<LSEP>[](symbol){testseries1}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){fit1}<LEND>[call](){}<LSEP>[](symbol){auto.arima}<LSEP>[](symbol){testseries1}<LSEP>[](symbol){xregmat}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){xregmat}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){xreg}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){testseries2}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){100.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){xregmat}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){runif}<LSEP>[argument 0; litteral](real){240.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 9; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){auto.arima}<LSEP>[](symbol){testseries2}<LSEP>[](symbol){xregmat}<LEND>[argument 1; litteral](str){Series: testseries2}<LEND>[statement 10; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LEND>[argument 0; call](){}<LSEP>[](symbol){auto.arima}<LSEP>[](symbol){testseries2}<LSEP>[](symbol){xregmat}<LSEP>[argument 2; litteral](logical){TRUE}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[argument 1; litteral](str){Series: testseries2}<LEND>[statement 11; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){auto.arima}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){testseries2}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[argument 1; litteral](str){ARIMA}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){fit1}<LEND>[call](){}<LSEP>[](symbol){auto.arima}<LSEP>[](symbol){testseries1}<LSEP>[argument 1; litteral](logical){FALSE}<LSEP>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){fit2}<LEND>[call](){}<LSEP>[](symbol){auto.arima}<LSEP>[](symbol){testseries1}<LSEP>[argument 1; litteral](logical){FALSE}<LSEP>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[statement 14; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){fitted}<LEND>[statement 1; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){test parallel = TRUE and stepw...}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){skip_if}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.getenv}<LSEP>[argument 0; litteral](str){GITHUB_ACTIONS}<LEND>[argument 1; litteral](str){true}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){auto.arima}<LSEP>[](symbol){WWWusage}<LSEP>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](integer){3}<LSEP>[argument 1; litteral](integer){0}<LSEP>[argument 2; litteral](integer){0}<LSEP>[argument 3; litteral](integer){0}<LSEP>[argument 4; litteral](integer){1}<LSEP>[argument 5; litteral](integer){1}<LSEP>[argument 6; litteral](integer){0}<LEND>[statement 2; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for ndiffs()}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){ndiffs}<LSEP>[](symbol){AirPassengers}<LSEP>[argument 1; litteral](str){kpss}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){ndiffs}<LSEP>[](symbol){AirPassengers}<LSEP>[argument 1; litteral](str){adf}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){ndiffs}<LSEP>[](symbol){AirPassengers}<LSEP>[argument 1; litteral](str){pp}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for nsdiffs()}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){nsdiffs}<LSEP>[](symbol){AirPassengers}<LSEP>[argument 1; litteral](str){seas}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){nsdiffs}<LSEP>[](symbol){AirPassengers}<LSEP>[argument 1; litteral](str){ocsb}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){nsdiffs}<LSEP>[](symbol){airmiles}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){nsdiffs}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){100.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; call](){}<LSEP>[](symbol){nsdiffs}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[argument 1; litteral](real){0.100000}<LEND>[statement 5; call](){}<LSEP>[](symbol){skip_if_not_installed}<LSEP>[argument 0; litteral](str){uroot}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){nsdiffs}<LSEP>[](symbol){AirPassengers}<LSEP>[argument 1; litteral](str){hegy}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 7; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){nsdiffs}<LSEP>[](symbol){AirPassengers}<LSEP>[argument 1; litteral](str){ch}<LEND>[argument 1; litteral](real){0.000000} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){Testing armaroots}<LEND>[statement 1; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){Tests for plot.Arima()}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){arimafit}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){lynx}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 2; litteral](logical){FALSE}<LEND>[statement 1; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){arimafit}<LEND>[statement 2; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){arimafit}<LSEP>[argument 1; litteral](str){ma}<LEND>[statement 3; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){arimafit}<LSEP>[argument 1; litteral](str){ar}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){lynx}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){0.000000} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){Test forecast2.R}<LEND>[statement 1; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){test meanf()}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){meanfc}<LEND>[call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){wineind}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){meanf}<LSEP>[](symbol){wineind}<LEND>[](symbol){mean}<LEND>[](symbol){meanfc}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){bcforecast}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){meanf}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[](symbol){mean}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){bcforecast}<LEND>[argument 1; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){bcforecast}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){meanf}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[](symbol){mean}<LEND>[](symbol){meanfc}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){meanf}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){meanf}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](real){110.000000}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){950.000000}<LSEP>[argument 1; litteral](real){20.000000}<LEND>[argument 1; litteral](real){4.000000}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){constantForecast}<LEND>[call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){rwf}<LSEP>[](symbol){series}<LEND>[argument 1; litteral](logical){NA}<LEND>[statement 9; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.constant}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){constantForecast}<LSEP>[](symbol){mean}<LEND>[statement 2; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){test rwf()}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){rwfc}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){rwf}<LSEP>[](symbol){airmiles}<LEND>[](symbol){mean}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){rwfc}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){naive}<LSEP>[](symbol){airmiles}<LEND>[](symbol){mean}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){rwfc}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){rwf}<LSEP>[](symbol){airmiles}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[](symbol){mean}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){rwf}<LSEP>[](symbol){airmiles}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[](symbol){mean}<LEND>[](symbol){rwfc}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){rwf}<LSEP>[](symbol){airmiles}<LSEP>[argument 1; litteral](real){0.150000}<LEND>[](symbol){mean}<LEND>[argument 1; litteral](real){10.000000}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){rwf}<LSEP>[](symbol){airmiles}<LSEP>[argument 1; litteral](real){0.150000}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){rwf}<LSEP>[](symbol){airmiles}<LSEP>[argument 1; litteral](real){0.150000}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[](symbol){mean}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){950.000000}<LSEP>[argument 1; litteral](real){20.000000}<LEND>[argument 1; litteral](real){4.000000}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){constantForecast}<LEND>[call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){rwf}<LSEP>[](symbol){series}<LEND>[argument 1; litteral](logical){NA}<LEND>[statement 8; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.constant}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){constantForecast}<LSEP>[](symbol){mean}<LEND>[statement 3; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){test forecast.HoltWinters()}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){hwmod}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){HoltWinters}<LEND>[](symbol){UKgas}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){hwmod}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){hwmod}<LEND>[](symbol){mean}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){hwmod}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){hwmod}<LSEP>[argument 1; litteral](real){110.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){hwmodbc}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){HoltWinters}<LEND>[argument 0; call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){UKgas}<LSEP>[argument 1; litteral](real){0.250000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){hwfc}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){hwmodbc}<LSEP>[argument 1; litteral](real){0.250000}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[](symbol){mean}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){hwfc2}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){hwmodbc}<LSEP>[argument 1; litteral](real){0.250000}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[](symbol){mean}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){hwbcfc}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){hwmodbc}<LEND>[](symbol){mean}<LEND>[argument 1; litteral](real){0.250000}<LEND>[statement 8; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){hwfc}<LSEP>[](symbol){hwbcfc}<LEND>[statement 9; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LSEP>[](symbol){hwfc}<LSEP>[](symbol){hwfc2}<LEND>[statement 4; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){test for forecast.StructTS()}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){structtsmod}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){StructTS}<LEND>[](symbol){wineind}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fc1}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){structtsmod}<LEND>[](symbol){mean}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){fc1}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){structtsmod}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[](symbol){mean}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){structtsmod}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){structtsmod}<LSEP>[argument 1; litteral](real){110.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){bcseries}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){woolyrnq}<LSEP>[argument 1; litteral](real){0.190000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){fc2}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){StructTS}<LEND>[](symbol){bcseries}<LEND>[](symbol){mean}<LEND>[argument 1; litteral](real){0.190000}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){fc3}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){StructTS}<LEND>[](symbol){bcseries}<LEND>[argument 1; litteral](real){0.190000}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[](symbol){mean}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){fc4}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){StructTS}<LEND>[](symbol){bcseries}<LEND>[argument 1; litteral](real){0.190000}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[](symbol){mean}<LEND>[statement 9; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){fc2}<LSEP>[](symbol){fc3}<LEND>[statement 10; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LSEP>[](symbol){fc3}<LSEP>[](symbol){fc4}<LEND>[statement 5; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){test croston()}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1234.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){croston}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){100.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){croston}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){100.000000}<LEND>[](symbol){mean}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 6; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){test hw()}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LEND>[argument 0; call](){}<LSEP>[](symbol){holt}<LSEP>[](symbol){wineind}<LEND>[argument 1; litteral](str){Forecast method: Holt's method}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LEND>[argument 0; call](){}<LSEP>[](symbol){holt}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 1; litteral](str){Forecast method: Damped Holt's...}<LEND>[statement 7; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){test holt()}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LEND>[argument 0; call](){}<LSEP>[](symbol){hw}<LSEP>[](symbol){wineind}<LEND>[argument 1; litteral](str){Forecast method: Holt-Winters'...}<LEND>[statement 8; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){test naive() and snaive()}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){snaive}<LSEP>[](symbol){WWWusage}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){naive}<LSEP>[](symbol){WWWusage}<LEND>[](symbol){mean}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){snaive}<LSEP>[](symbol){WWWusage}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[](symbol){upper}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){naive}<LSEP>[](symbol){WWWusage}<LEND>[](symbol){upper}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){snaive}<LSEP>[](symbol){WWWusage}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[](symbol){lower}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){naive}<LSEP>[](symbol){WWWusage}<LEND>[](symbol){lower}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){950.000000}<LSEP>[argument 1; litteral](real){20.000000}<LEND>[argument 1; litteral](real){4.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){constantForecast}<LEND>[call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){snaive}<LSEP>[](symbol){series}<LEND>[argument 1; litteral](logical){NA}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.constant}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){constantForecast}<LSEP>[](symbol){mean} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for monthdays}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){monthdays}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){monthdays}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){monthdays}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){100.000000}<LSEP>[argument 1; litteral](real){12.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){31.000000}<LSEP>[argument 1; litteral](real){28.000000}<LSEP>[argument 2; litteral](real){31.000000}<LSEP>[argument 3; litteral](real){30.000000}<LSEP>[argument 4; litteral](real){31.000000}<LSEP>[argument 5; litteral](real){30.000000}<LSEP>[argument 6; litteral](real){31.000000}<LSEP>[argument 7; litteral](real){31.000000}<LSEP>[argument 8; litteral](real){30.000000}<LSEP>[argument 9; litteral](real){31.000000}<LSEP>[argument 10; litteral](real){30.000000}<LSEP>[argument 11; litteral](real){31.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){monthdays}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){90.000000}<LSEP>[argument 1; litteral](real){91.000000}<LSEP>[argument 2; litteral](real){92.000000}<LSEP>[argument 3; litteral](real){92.000000}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){monthdays}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){48.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[argument 1; litteral](real){38.000000}<LEND>[argument 1; litteral](real){29.000000}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){monthdays}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){16.000000}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](real){13.000000}<LEND>[argument 1; litteral](real){91.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for seasonaldummy}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){seasonaldummy}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){testseries}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){7.000000}<LEND>[argument 1; litteral](real){5.000000}<LEND>[argument 1; litteral](real){7.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){dummymat}<LEND>[call](){}<LSEP>[](symbol){seasonaldummy}<LSEP>[](symbol){testseries}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){testseries}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){dummymat}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){dummymat}<LEND>[argument 1; litteral](real){6.000000}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){seasonaldummy}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){11.000000}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){diag}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for seasonaldummyf}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){seasonaldummy}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){dummymat}<LEND>[call](){}<LSEP>[](symbol){seasonaldummyf}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](str){deprecated}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){dummymat}<LEND>[argument 1; litteral](real){4.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){dummymat}<LEND>[argument 1; litteral](real){11.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for fourier}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){fourier}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){testseries}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){7.000000}<LEND>[argument 1; litteral](real){5.000000}<LEND>[argument 1; litteral](real){7.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fouriermat}<LEND>[call](){}<LSEP>[](symbol){fourier}<LSEP>[](symbol){testseries}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){testseries}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){fouriermat}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){fouriermat}<LEND>[argument 1; litteral](real){6.000000}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){-7}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){fouriermat}<LEND>[statement 4; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for fourierf}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){fouriermat}<LEND>[call](){}<LSEP>[](symbol){fourierf}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){10.000000}<LEND>[argument 1; litteral](str){deprecated}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){fouriermat}<LEND>[argument 1; litteral](real){10.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){fouriermat}<LEND>[argument 1; litteral](real){8.000000}<LEND>[statement 5; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for stlm}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; call](){}<LSEP>[](symbol){stlm}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){5.000000}<LSEP>[argument 1; litteral](real){24.000000}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](str){ZZZ}<LEND>[statement 6; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for forecast.stlm}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast.stlm}<LEND>[argument 0; call](){}<LSEP>[](symbol){stlm}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){24.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){stlmfit1}<LEND>[call](){}<LSEP>[](symbol){stlm}<LSEP>[](symbol){woolyrnq}<LSEP>[argument 1; litteral](str){ets}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){stlmfit2}<LEND>[call](){}<LSEP>[](symbol){stlm}<LSEP>[](symbol){woolyrnq}<LSEP>[argument 1; litteral](str){arima}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){fcfit1}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){stlmfit1}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fcfit2}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){stlmfit1}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcfit2}<LSEP>[](symbol){level}<LEND>[argument 1; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){51.000000}<LSEP>[argument 1; litteral](real){99.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){fcstlmfit3}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){stlmfit2}<LEND>[statement 7; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[](symbol){stlm}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){100.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[](symbol){mean}<LEND>[argument 1; litteral](real){10.000000}<LEND>[argument 1; litteral](real){100.000000}<LEND>[statement 8; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[](symbol){stlm}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){100.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){mean}<LEND>[argument 1; litteral](real){10.000000}<LEND>[argument 1; litteral](real){100.000000}<LEND>[statement 7; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for stlf}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[](symbol){stlm}<LSEP>[](symbol){wineind}<LEND>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){stlf}<LSEP>[](symbol){wineind}<LEND>[](symbol){mean}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[](symbol){stlm}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](real){0.500000}<LEND>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){stlf}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](real){0.500000}<LEND>[](symbol){mean}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit1}<LEND>[call](){}<LSEP>[](symbol){stlf}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](real){0.200000}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){fit2}<LEND>[call](){}<LSEP>[](symbol){stlf}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](real){0.200000}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){mean}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){950.000000}<LSEP>[argument 1; litteral](real){20.000000}<LEND>[argument 1; litteral](real){4.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){constantForecast}<LEND>[call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){stlf}<LSEP>[](symbol){series}<LEND>[argument 1; litteral](logical){NA}<LEND>[statement 7; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){constantForecast}<LSEP>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){series}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){8.000000}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){7.000000}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](real){7.000000}<LEND>[statement 9; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){stlf}<LSEP>[](symbol){y}<LEND>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){7.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 8; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for ma}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){testseries}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){20.000000}<LEND>[argument 1; litteral](real){4.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){ma}<LSEP>[](symbol){testseries}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){testseries}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){maseries}<LEND>[call](){}<LSEP>[](symbol){ma}<LSEP>[](symbol){testseries}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){maseries}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](integer){1}<LSEP>[argument 1; litteral](integer){20}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){maseries}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){19.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){19.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){maseries}<LEND>[call](){}<LSEP>[](symbol){ma}<LSEP>[](symbol){testseries}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){maseries}<LEND>[argument 1; litteral](integer){20}<LEND>[statement 7; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){maseries}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){19.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){19.000000}<LEND>[argument 1; litteral](real){0.500000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){maseries}<LEND>[call](){}<LSEP>[](symbol){ma}<LSEP>[](symbol){testseries}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 9; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){maseries}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](integer){1}<LSEP>[argument 1; litteral](integer){20}<LEND>[statement 10; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){maseries}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){19.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){19.000000}<LEND>[argument 1; litteral](real){0.000000} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){Re-fitting models}<LEND>[statement 1; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for re-fitting models}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){mdeaths}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[argument 3; litteral](logical){FALSE}<LSEP>[argument 4; litteral](logical){TRUE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){refit}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){fdeaths}<LSEP>[](symbol){fit}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){coef}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){coef}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){x}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){fitted}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){residuals}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){residuals}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){refit_same}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){mdeaths}<LSEP>[](symbol){fit}<LEND>[statement 7; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){coef}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){coef}<LEND>[statement 8; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){x}<LEND>[statement 9; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all.equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){fitted}<LEND>[statement 10; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all.equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){residuals}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){residuals}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){arfima}<LSEP>[](symbol){mdeaths}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){refit}<LEND>[call](){}<LSEP>[](symbol){arfima}<LSEP>[](symbol){fdeaths}<LSEP>[](symbol){fit}<LEND>[statement 13; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ar}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){ar}<LEND>[statement 14; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ma}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){ma}<LEND>[statement 15; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){x}<LEND>[statement 16; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){fitted}<LEND>[statement 17; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){residuals}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){residuals}<LEND>[statement 18; assign](){<-}<LSEP>[](symbol){refit_same}<LEND>[call](){}<LSEP>[](symbol){arfima}<LSEP>[](symbol){mdeaths}<LSEP>[](symbol){fit}<LEND>[statement 19; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ar}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){ar}<LEND>[statement 20; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ma}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){ma}<LEND>[statement 21; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){x}<LEND>[statement 22; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){fitted}<LEND>[statement 23; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){residuals}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){residuals}<LEND>[statement 24; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){dshw}<LSEP>[](symbol){mdeaths}<LSEP>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){12.000000}<LEND>[statement 25; assign](){<-}<LSEP>[](symbol){refit}<LEND>[call](){}<LSEP>[](symbol){dshw}<LSEP>[](symbol){fdeaths}<LSEP>[](symbol){fit}<LEND>[statement 26; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){x}<LEND>[statement 27; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){fitted}<LEND>[statement 28; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){residuals}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){residuals}<LEND>[statement 29; assign](){<-}<LSEP>[](symbol){refit_same}<LEND>[call](){}<LSEP>[](symbol){dshw}<LSEP>[](symbol){mdeaths}<LSEP>[](symbol){fit}<LEND>[statement 30; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){model}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){model}<LEND>[statement 31; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){x}<LEND>[statement 32; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){fitted}<LEND>[statement 33; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){residuals}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){residuals}<LEND>[statement 34; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){mdeaths}<LEND>[statement 35; assign](){<-}<LSEP>[](symbol){refit}<LEND>[call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){fdeaths}<LSEP>[](symbol){fit}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 36; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){fit}<LEND>[statement 37; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){x}<LEND>[statement 38; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){fitted}<LEND>[statement 39; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){residuals}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){residuals}<LEND>[statement 40; assign](){<-}<LSEP>[](symbol){refit_same}<LEND>[call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){mdeaths}<LSEP>[](symbol){fit}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 41; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){x}<LEND>[statement 42; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){fitted}<LEND>[statement 43; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){refit_same}<LEND>[statement 44; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){stlm}<LSEP>[](symbol){mdeaths}<LEND>[statement 45; assign](){<-}<LSEP>[](symbol){refit}<LEND>[call](){}<LSEP>[](symbol){stlm}<LSEP>[](symbol){fdeaths}<LSEP>[](symbol){fit}<LEND>[statement 46; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){model}<LEND>[](symbol){par}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){model}<LEND>[](symbol){par}<LEND>[statement 47; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){x}<LEND>[statement 48; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){fitted}<LEND>[statement 49; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){residuals}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){residuals}<LEND>[statement 50; assign](){<-}<LSEP>[](symbol){refit_same}<LEND>[call](){}<LSEP>[](symbol){stlm}<LSEP>[](symbol){mdeaths}<LSEP>[](symbol){fit}<LEND>[statement 51; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){model}<LEND>[](symbol){par}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){model}<LEND>[](symbol){par}<LEND>[statement 52; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){x}<LEND>[statement 53; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){fitted}<LEND>[statement 54; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){residuals}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){residuals}<LEND>[statement 55; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){bats}<LSEP>[](symbol){mdeaths}<LEND>[statement 56; assign](){<-}<LSEP>[](symbol){refit}<LEND>[call](){}<LSEP>[](symbol){bats}<LSEP>[](symbol){fdeaths}<LSEP>[](symbol){fit}<LEND>[statement 57; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){parameters}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){parameters}<LEND>[statement 58; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){x}<LEND>[statement 59; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted.values}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){fitted.values}<LEND>[statement 60; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){refit}<LEND>[statement 61; assign](){<-}<LSEP>[](symbol){refit_same}<LEND>[call](){}<LSEP>[](symbol){bats}<LSEP>[](symbol){mdeaths}<LSEP>[](symbol){fit}<LEND>[statement 62; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){model}<LEND>[](symbol){par}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){model}<LEND>[](symbol){par}<LEND>[statement 63; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){x}<LEND>[statement 64; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted.values}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){fitted.values}<LEND>[statement 65; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){refit_same}<LEND>[statement 66; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){tbats}<LSEP>[](symbol){mdeaths}<LEND>[statement 67; assign](){<-}<LSEP>[](symbol){refit}<LEND>[call](){}<LSEP>[](symbol){tbats}<LSEP>[](symbol){fdeaths}<LSEP>[](symbol){fit}<LEND>[statement 68; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){parameters}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){parameters}<LEND>[statement 69; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){x}<LEND>[statement 70; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted.values}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){fitted.values}<LEND>[statement 71; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){refit}<LEND>[statement 72; assign](){<-}<LSEP>[](symbol){refit_same}<LEND>[call](){}<LSEP>[](symbol){tbats}<LSEP>[](symbol){mdeaths}<LSEP>[](symbol){fit}<LEND>[statement 73; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){model}<LEND>[](symbol){par}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){model}<LEND>[](symbol){par}<LEND>[statement 74; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){x}<LEND>[statement 75; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted.values}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){fitted.values}<LEND>[statement 76; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){refit_same}<LEND>[statement 77; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){mdeaths}<LEND>[statement 78; assign](){<-}<LSEP>[](symbol){refit}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){fdeaths}<LSEP>[](symbol){fit}<LEND>[statement 79; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){x}<LEND>[statement 80; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){fitted}<LEND>[statement 81; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){residuals}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){residuals}<LEND>[statement 82; assign](){<-}<LSEP>[](symbol){refit_same}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){mdeaths}<LSEP>[](symbol){fit}<LEND>[statement 83; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){x}<LEND>[statement 84; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){fitted}<LEND>[statement 85; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){refit_same}<LEND>[statement 86; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){mdeaths}<LEND>[statement 87; assign](){<-}<LSEP>[](symbol){refit}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fdeaths}<LSEP>[](symbol){fit}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 88; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){x}<LEND>[statement 89; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){fitted}<LEND>[statement 90; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){residuals}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){residuals}<LEND>[statement 91; assign](){<-}<LSEP>[](symbol){refit_same}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){mdeaths}<LSEP>[](symbol){fit}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 92; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){x}<LEND>[statement 93; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit_same}<LSEP>[](symbol){fitted}<LEND>[statement 94; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){refit_same} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){Tests on input}<LEND>[statement 1; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for a non-forecast object}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){USAccDeaths}<LEND>[argument 1; call](){}<LSEP>[](symbol){throws_error}<LEND>[statement 2; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){Tests on output}<LEND>[statement 3; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for dimension}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){window}<LSEP>[](symbol){USAccDeaths}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1973.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1976.000000}<LSEP>[argument 1; litteral](real){12.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){window}<LSEP>[](symbol){USAccDeaths}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1977.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fcasts}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){train}<LSEP>[argument 1; litteral](real){6.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){fcasts}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){7.000000}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){fcasts}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){8.000000}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){fcasts}<LSEP>[](symbol){test}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){dim}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){fcasts}<LSEP>[](symbol){test}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){fcasts}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){fcasts}<LEND>[statement 4; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for accuracy}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fitarima}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){USAccDeaths}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){accuracyarima}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){fitarima}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](str){RMSE}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){accuracyarimasim}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LEND>[argument 0; call](){}<LSEP>[](symbol){Arima}<LEND>[argument 0; call](){}<LSEP>[](symbol){simulate}<LSEP>[](symbol){fitarima}<LSEP>[argument 1; litteral](real){123.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](str){RMSE}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_lt}<LSEP>[](symbol){accuracyarima}<LSEP>[](symbol){accuracyarimasim}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fitets}<LEND>[call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){AirPassengers}<LSEP>[argument 1; litteral](str){MAM}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){accuracyets}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){fitets}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](str){RMSE}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){accuracyetssim}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LEND>[argument 0; call](){}<LSEP>[](symbol){ets}<LEND>[argument 0; call](){}<LSEP>[](symbol){simulate}<LSEP>[](symbol){fitets}<LSEP>[argument 1; litteral](real){123.000000}<LEND>[argument 1; litteral](str){MAM}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](str){RMSE}<LEND>[statement 7; call](){}<LSEP>[](symbol){expect_lt}<LSEP>[](symbol){accuracyets}<LSEP>[](symbol){accuracyetssim}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){month}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){12.000000}<LEND>[argument 1; litteral](real){14.000000}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){fitlm}<LEND>[call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){168.000000}<LEND>[](symbol){month}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){accuracylm}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){fitlm}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](str){RMSE}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){accuracylmsim}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LEND>[argument 0; call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){simulate}<LSEP>[](symbol){fitlm}<LSEP>[argument 1; litteral](real){123.000000}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[](symbol){month}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](str){RMSE}<LEND>[statement 12; call](){}<LSEP>[](symbol){expect_gt}<LSEP>[](symbol){accuracylm}<LSEP>[](symbol){accuracylmsim} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for na.interp}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){na.interp}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){3.000000}<LSEP>[argument 3; litteral](logical){NA}<LSEP>[argument 4; litteral](real){5.000000}<LSEP>[argument 5; litteral](real){6.000000}<LSEP>[argument 6; litteral](real){7.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){7.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){na.interp}<LSEP>[](symbol){wineind}<LEND>[](symbol){wineind}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){testseries}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){7.000000}<LEND>[argument 1; litteral](real){5.000000}<LEND>[argument 1; litteral](real){7.000000}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testseries}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){11.000000}<LSEP>[argument 3; litteral](real){17.000000}<LEND>[litteral](logical){NA}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){na.interp}<LSEP>[](symbol){testseries}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){7.000000}<LEND>[argument 1; litteral](real){5.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){testseries}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){na.interp}<LSEP>[](symbol){testseries}<LEND>[statement 1; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for tsclean}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsclean}<LSEP>[](symbol){gold}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){testseries}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){7.000000}<LEND>[argument 1; litteral](real){5.000000}<LEND>[argument 1; litteral](real){7.000000}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testseries}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){14.000000}<LEND>[litteral](real){0.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsclean}<LSEP>[](symbol){testseries}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){7.000000}<LEND>[argument 1; litteral](real){5.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testseries}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){14.000000}<LEND>[litteral](logical){NA}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsclean}<LSEP>[](symbol){testseries}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){tsclean}<LSEP>[](symbol){wineind}<LEND>[argument 1; litteral](real){0.000001}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 7; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LSEP>[](symbol){USAccDeaths}<LEND>[argument 1; call](){}<LSEP>[](symbol){tsclean}<LSEP>[](symbol){USAccDeaths}<LEND>[statement 8; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsclean}<LSEP>[](symbol){testseries}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){testseries} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for acf}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){Acf}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](real){10.000000}<LSEP>[argument 2; litteral](str){partial}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){lag}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){acf}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){Pacf}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](real){10.000000}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[](symbol){acf}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){Acf}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](real){10.000000}<LSEP>[argument 2; litteral](str){correlation}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[](symbol){acf}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](integer){11}<LSEP>[argument 1; litteral](integer){1}<LSEP>[argument 2; litteral](integer){1}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){Acf}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](real){10.000000}<LSEP>[argument 2; litteral](str){correlation}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[](symbol){acf}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){Testing graph}<LEND>[statement 1; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){Tests for seasonplot()}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){seasonplot}<LSEP>[](symbol){airmiles}<LEND>[statement 1; call](){}<LSEP>[](symbol){seasonplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){gold}<LSEP>[argument 1; litteral](real){7.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){seasonplot}<LSEP>[](symbol){woolyrnq}<LEND>[statement 3; call](){}<LSEP>[](symbol){seasonplot}<LSEP>[](symbol){wineind}<LEND>[statement 4; call](){}<LSEP>[](symbol){seasonplot}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 5; call](){}<LSEP>[](symbol){seasonplot}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 2; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){Tests for tsdisplay()}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_silent}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsdisplay}<LSEP>[](symbol){airmiles}<LSEP>[argument 1; litteral](str){ma}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_silent}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsdisplay}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){20.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_silent}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsdisplay}<LSEP>[](symbol){airmiles}<LSEP>[argument 1; litteral](str){scatter}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_silent}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsdisplay}<LSEP>[](symbol){airmiles}<LSEP>[argument 1; litteral](str){spectrum} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){Testing nnetar}<LEND>[statement 1; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){Tests for nnetar}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){oilnnet}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){airmiles}<LSEP>[argument 1; litteral](real){0.150000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){woolyrnqnnet}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){woolyrnq}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){woolyrnqnnet}<LEND>[argument 1; litteral](str){Series: woolyrnq}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){oilnnet}<LEND>[](symbol){mean}<LEND>[argument 1; litteral](real){10.000000}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){woolyrnqnnet}<LEND>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){woolyrnq}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){uscnnet}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){woolyrnq}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){woolyrnq}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){uscnnet}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){119.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 7; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){uscnnet}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){120.000000}<LSEP>[argument 1; litteral](real){130.000000}<LEND>[](symbol){mean}<LEND>[argument 1; litteral](real){11.000000}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){uscnnet}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){woolyrnq}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[statement 9; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){uscnnet}<LEND>[argument 1; litteral](str){NNAR(2,2,2)}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 10; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){uscnnet}<LEND>[argument 1; litteral](str){4-2-1 network}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 11; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){uscnnet}<LSEP>[](symbol){size}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){uscnnet}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){woolyrnq}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){119.000000}<LEND>[argument 4; litteral](real){10.000000}<LEND>[statement 13; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){uscnnet}<LEND>[argument 1; litteral](str){NNAR(2,2,3)}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 14; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){uscnnet}<LEND>[argument 1; litteral](str){5-3-1 network}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 15; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){uscnnet}<LSEP>[](symbol){size}<LEND>[argument 1; litteral](real){3.000000}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){uscnnet}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){woolyrnq}<LSEP>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[statement 17; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){uscnnet}<LSEP>[](symbol){size}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 18; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){uscnnet}<LEND>[argument 1; litteral](str){NNAR(4,2)}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){uscnnet}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){woolyrnq}<LSEP>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[statement 20; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){uscnnet}<LSEP>[](symbol){size}<LEND>[argument 1; litteral](real){3.000000}<LEND>[statement 21; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){uscnnet}<LEND>[argument 1; litteral](str){NNAR(4,2,3)}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 22; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){uscnnet}<LEND>[argument 1; litteral](str){5-3-1 network}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 23; assign](){<-}<LSEP>[](symbol){creditnnet}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){bizdays}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){fourier}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 24; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){creditnnet}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[](symbol){mean}<LEND>[argument 1; litteral](str){different column names}<LEND>[argument 1; call](){}<LSEP>[](symbol){expect_length}<LSEP>[argument 0; litteral](integer){2}<LEND>[statement 25; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){creditnnet}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[](symbol){mean}<LEND>[argument 1; litteral](str){different column names}<LEND>[argument 1; call](){}<LSEP>[](symbol){expect_length}<LSEP>[argument 0; litteral](integer){2}<LEND>[statement 26; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){creditnnet}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){WWWusage}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){4.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){WWWusage}<LEND>[statement 27; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){creditnnet}<LEND>[argument 1; litteral](str){NNAR(2,2)}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 28; assign](){<-}<LSEP>[](symbol){creditnnet}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){WWWusage}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){WWWusage}<LEND>[argument 4; litteral](real){12.000000}<LEND>[statement 29; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){uscnnet}<LSEP>[](symbol){size}<LEND>[argument 1; litteral](real){3.000000}<LEND>[statement 30; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){creditnnet}<LEND>[argument 1; litteral](str){NNAR(1,12)}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 31; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){creditnnet}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){WWWusage}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){4.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){WWWusage}<LEND>[argument 4; litteral](real){0.100000}<LEND>[statement 32; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){creditnnet}<LEND>[argument 1; litteral](str){decay=0.1}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 33; assign](){<-}<LSEP>[](symbol){oilnnet}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){airmiles}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){0.000000}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[argument 4; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 5; litteral](real){0.000000}<LSEP>[argument 6; litteral](real){10.000000}<LEND>[statement 34; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all.equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){oilnnet}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){airmiles}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){airmiles}<LEND>[statement 35; assign](){<-}<LSEP>[](symbol){oilna}<LSEP>[](symbol){airmiles}<LEND>[statement 36; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){oilna}<LSEP>[argument 1; litteral](real){12.000000}<LEND>[litteral](logical){NA}<LEND>[statement 37; call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){oilnnet}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){oilna}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){0.000000}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[argument 4; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 5; litteral](real){0.000000}<LEND>[statement 38; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all.equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){oilnnet}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){12.000000}<LSEP>[argument 2; litteral](real){13.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){oilna}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){11.000000}<LSEP>[argument 1; litteral](real){12.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){oilna}<LEND>[statement 39; assign](){<-}<LSEP>[](symbol){fit1}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){WWWusage}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){WWWusage}<LEND>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){0.500000}<LSEP>[argument 4; litteral](real){25.000000}<LSEP>[argument 5; litteral](real){7.000000}<LEND>[statement 40; assign](){<-}<LSEP>[](symbol){fit2}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){WWWusage}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){WWWusage}<LEND>[](symbol){fit1}<LEND>[statement 41; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){p}<LEND>[statement 42; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){lambda}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){lambda}<LEND>[statement 43; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){nnetargs}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){nnetargs}<LEND>[statement 44; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){fit1}<LEND>[argument 1; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){fit2}<LEND>[statement 45; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){fit1}<LEND>[argument 1; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){fit2}<LEND>[statement 46; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){model}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){model}<LEND>[statement 47; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){model}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){wts}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){model}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){wts}<LEND>[statement 48; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){model}<LEND>[argument 1; litteral](real){7.000000}<LEND>[](symbol){wts}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){model}<LEND>[argument 1; litteral](real){7.000000}<LEND>[](symbol){wts}<LEND>[statement 49; assign](){<-}<LSEP>[](symbol){oilnnet}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){airmiles}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){11.000000}<LSEP>[argument 1; litteral](real){20.000000}<LEND>[statement 50; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){oilnnet}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){11.000000}<LSEP>[argument 1; litteral](real){20.000000}<LEND>[statement 51; assign](){<-}<LSEP>[](symbol){oilnnet}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){airmiles}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){F}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){T}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){F}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){airmiles}<LEND>[argument 1; litteral](real){20.000000}<LEND>[statement 52; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){oilnnet}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){11.000000}<LSEP>[argument 1; litteral](real){20.000000}<LEND>[statement 53; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){nnetfit}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){0.000000}<LSEP>[argument 3; litteral](real){1.000000}<LSEP>[argument 4; litteral](real){1.000000}<LSEP>[argument 5; litteral](real){0.100000}<LEND>[argument 1; litteral](str){Constant data}<LEND>[statement 54; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){nnetfit}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 55; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){nnetfit}<LSEP>[](symbol){lambda}<LEND>[statement 56; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){nnetfit}<LSEP>[](symbol){scalex}<LEND>[statement 57; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){nnetfit}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){0.000000}<LSEP>[argument 3; litteral](real){1.000000}<LSEP>[argument 4; litteral](real){1.000000}<LEND>[argument 1; litteral](str){Not enough data}<LEND>[statement 58; call](){}<LSEP>[](symbol){expect_silent}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){nnetfit}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){3.000000}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){0.000000}<LSEP>[argument 3; litteral](real){1.000000}<LSEP>[argument 4; litteral](real){1.000000}<LEND>[statement 59; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){nnetfit}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 60; call](){}<LSEP>[](symbol){expect_silent}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){nnetfit}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){3.000000}<LEND>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){0.000000}<LSEP>[argument 3; litteral](real){1.000000}<LSEP>[argument 4; litteral](real){1.000000}<LEND>[statement 61; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){nnetfit}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 62; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){nnetfit}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){3.000000}<LEND>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){0.000000}<LSEP>[argument 3; litteral](real){1.000000}<LSEP>[argument 4; litteral](real){1.000000}<LEND>[argument 1; litteral](str){short series}<LEND>[statement 63; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){nnetfit}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 64; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){nnetfit}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){3.000000}<LEND>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){0.000000}<LSEP>[argument 3; litteral](real){1.000000}<LSEP>[argument 4; litteral](real){1.000000}<LEND>[argument 1; litteral](str){short series}<LEND>[statement 65; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){nnetfit}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 66; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){nnetfit}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){0.000000}<LSEP>[argument 4; litteral](real){1.000000}<LSEP>[argument 5; litteral](real){1.000000}<LSEP>[argument 6; litteral](real){0.100000}<LEND>[argument 1; litteral](str){Constant xreg}<LEND>[statement 67; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){nnetfit}<LSEP>[](symbol){scalexreg}<LEND>[statement 68; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){nnetfit}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){3.000000}<LSEP>[argument 3; litteral](real){1.000000}<LSEP>[argument 4; litteral](real){1.000000}<LSEP>[argument 5; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){0.000000}<LSEP>[argument 4; litteral](real){1.000000}<LSEP>[argument 5; litteral](real){1.000000}<LSEP>[argument 6; litteral](real){0.100000}<LEND>[argument 1; litteral](str){Constant xreg}<LEND>[statement 69; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){nnetfit}<LSEP>[](symbol){scalexreg} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){Tests on input and output}<LEND>[statement 1; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for a non-ts object}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){123.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){abc}<LEND>[call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){50.000000}<LSEP>[argument 1; litteral](real){5.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){bats}<LSEP>[](symbol){abc}<LSEP>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){lambda}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){fit}<LEND>[argument 1; litteral](str){Seed States}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){fit}<LEND>[argument 1; litteral](integer){50}<LEND>[statement 6; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){fit}<LEND>[statement 7; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){bats}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[](symbol){AIC}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[statement 8; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){bats}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[](symbol){AIC}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[statement 2; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){Test parallel of bats}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){abc}<LEND>[call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){50.000000}<LSEP>[argument 1; litteral](real){5.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){skip_on_cran}<LEND>[statement 2; call](){}<LSEP>[](symbol){skip_if}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.getenv}<LSEP>[argument 0; litteral](str){GITHUB_ACTIONS}<LEND>[argument 1; litteral](str){true}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_gt}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){bats}<LSEP>[](symbol){abc}<LSEP>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[](symbol){lambda}<LEND>[argument 1; litteral](real){0.999000} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){Testing calendar functions}<LEND>[statement 1; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){Tests for bizdays()}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){bizdays}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){20.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){b1}<LEND>[call](){}<LSEP>[](symbol){bizdays}<LSEP>[](symbol){woolyrnq}<LSEP>[argument 1; litteral](str){New York}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){b2}<LEND>[call](){}<LSEP>[](symbol){bizdays}<LSEP>[](symbol){woolyrnq}<LSEP>[argument 1; litteral](str){London}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){b3}<LEND>[call](){}<LSEP>[](symbol){bizdays}<LSEP>[](symbol){woolyrnq}<LSEP>[argument 1; litteral](str){Zurich}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){b1}<LSEP>[](symbol){b2}<LEND>[argument 1; litteral](integer){109}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){b1}<LSEP>[](symbol){b3}<LEND>[argument 1; litteral](integer){144}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){b2}<LSEP>[](symbol){b3}<LEND>[argument 1; litteral](integer){117}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){b1}<LEND>[call](){}<LSEP>[](symbol){bizdays}<LSEP>[](symbol){gas}<LSEP>[argument 1; litteral](str){NERC}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){b2}<LEND>[call](){}<LSEP>[](symbol){bizdays}<LSEP>[](symbol){gas}<LSEP>[argument 1; litteral](str){Tokyo}<LEND>[statement 9; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){b1}<LSEP>[](symbol){b2}<LEND>[argument 1; litteral](integer){244}<LEND>[statement 2; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){Tests for easter()}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){easter}<LSEP>[](symbol){woolyrnq}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){woolyrnq}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){easter}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){wineind} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){Tests on input}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){mtsobj}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){200.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){4.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests specifying correct argument}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){sub}<LEND>[call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](str){September}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){sub}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){sub}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){sub}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){sub}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LSEP>[argument 0; litteral](real){338985.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){sub2}<LEND>[call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](str){SEPT}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_identical}<LSEP>[](symbol){sub}<LSEP>[](symbol){sub2}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){sub2}<LEND>[call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](real){9.000000}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_identical}<LSEP>[](symbol){sub}<LSEP>[](symbol){sub2}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){sub2}<LEND>[call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](real){9.000000}<LEND>[statement 8; call](){}<LSEP>[](symbol){expect_identical}<LSEP>[](symbol){sub}<LSEP>[](symbol){sub2}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){sub}<LEND>[call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){woolyrnq}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 10; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){sub}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){sub}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){sub}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 11; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){sub}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LSEP>[argument 0; litteral](real){153142.000000}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){sub2}<LEND>[call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){woolyrnq}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 13; call](){}<LSEP>[](symbol){expect_identical}<LSEP>[](symbol){sub}<LSEP>[](symbol){sub2}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){sub}<LEND>[call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](real){25000.000000}<LEND>[statement 15; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){sub}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LSEP>[argument 0; litteral](real){1948985.000000}<LEND>[statement 16; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){sub}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LSEP>[argument 0; litteral](real){91.000000}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){sub}<LEND>[call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){mtsobj}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){98.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 18; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){sub}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[statement 19; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){sub}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){sub}<LEND>[call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){mtsobj}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 21; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){sub}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[statement 22; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){sub}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LSEP>[argument 0; litteral](real){25.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests specifying wrong argument}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){Data is not quarterly}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){woolyrnq}<LSEP>[argument 1; litteral](str){January}<LEND>[argument 1; litteral](str){Data is not monthly}<LEND>[statement 4; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){test for bad input}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){subset.ts}<LSEP>[](symbol){mtcars}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){Data must be seasonal}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](str){subset must be the same length...}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){mtsobj}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){mtsobj}<LSEP>[argument 1; litteral](real){0.500000}<LEND>[argument 1; litteral](str){subset must be a vector of row...}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](str){Jaan}<LEND>[argument 1; litteral](str){No recognizable months}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){14.000000}<LEND>[argument 1; litteral](str){Seasons must be between 1 and 12}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){14.000000}<LEND>[argument 1; litteral](str){Months must be between 1 and 12}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){woolyrnq}<LSEP>[argument 1; litteral](str){qq1}<LEND>[argument 1; litteral](str){No recognizable quarters}<LEND>[statement 7; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){woolyrnq}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){6.000000}<LEND>[argument 1; litteral](str){Quarters must be between 1 and 4} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){Tests on input}<LEND>[statement 1; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for some arguments in ets}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](str){ZZM}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){comp}<LEND>[call](){}<LSEP>[](symbol){paste0}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){components}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](str){}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_that}<LSEP>[](symbol){comp}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LSEP>[argument 0; litteral](str){MAM}<LEND>[statement 2; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for some arguments in ets}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](str){MAM}<LSEP>[argument 2; litteral](real){0.161100}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){par}<LEND>[argument 1; litteral](str){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LSEP>[argument 0; litteral](real){0.161100}<LEND>[statement 3; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){refit ets model to new data}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](str){MAM}<LSEP>[argument 2; litteral](real){0.161100}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){parnames}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){alpha}<LSEP>[argument 1; litteral](str){beta}<LSEP>[argument 2; litteral](str){gamma}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){par}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){par}<LEND>[](symbol){parnames}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){wineind}<LSEP>[](symbol){fit}<LSEP>[argument 2; litteral](real){0.161100}<LEND>[](symbol){par}<LEND>[](symbol){parnames}<LEND>[](symbol){par}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){wineind}<LSEP>[](symbol){fit}<LSEP>[argument 2; litteral](real){0.161100}<LSEP>[argument 3; litteral](logical){NA}<LEND>[](symbol){par}<LEND>[](symbol){parnames}<LEND>[](symbol){par}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){wineind}<LSEP>[](symbol){fit}<LSEP>[argument 2; litteral](real){0.161100}<LSEP>[argument 3; litteral](logical){NA}<LEND>[](symbol){par}<LEND>[](symbol){parnames}<LEND>[](symbol){par}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){wineind}<LSEP>[](symbol){fit}<LSEP>[argument 2; litteral](real){0.161100}<LSEP>[argument 3; litteral](logical){NA}<LEND>[](symbol){par}<LEND>[](symbol){parnames}<LEND>[](symbol){par}<LEND>[statement 7; call](){}<LSEP>[](symbol){expect_identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){wineind}<LSEP>[](symbol){fit}<LSEP>[argument 2; litteral](real){0.161100}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[](symbol){par}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){par}<LEND>[statement 4; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){class methods for ets work}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](str){MAM}<LSEP>[argument 2; litteral](real){0.161100}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){fit}<LEND>[argument 1; litteral](str){Smoothing parameters}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){coef}<LSEP>[](symbol){fit}<LEND>[argument 1; litteral](integer){16}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_lt}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){logLik}<LSEP>[](symbol){fit}<LEND>[argument 1; litteral](real){1802.958602}<LEND>[argument 1; litteral](real){0.000010}<LEND>[statement 4; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){fit}<LEND>[statement 5; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){test ets() for errors}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){taylor}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fit1}<LEND>[call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){airmiles}<LSEP>[argument 1; litteral](real){0.150000}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_gt}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){par}<LEND>[argument 1; litteral](str){alpha}<LEND>[argument 1; litteral](real){0.950000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){fit2}<LEND>[call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){airmiles}<LSEP>[argument 1; litteral](real){0.150000}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_lt}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){par}<LEND>[argument 1; litteral](str){beta}<LEND>[argument 1; litteral](real){0.001000}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){fitted}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){taylor}<LSEP>[argument 1; litteral](str){ZZA}<LEND>[statement 6; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){forecast.ets()}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){airmiles}<LSEP>[argument 1; litteral](real){0.150000}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fcast1}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast1}<LSEP>[](symbol){upper}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast1}<LSEP>[](symbol){lower}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){fcast1}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fcast2}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast1}<LSEP>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast2}<LSEP>[](symbol){mean}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 7; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){upper}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lower}<LEND>[statement 8; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){upper}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lower} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){Testing modelAR}<LEND>[statement 1; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){Tests for modelAR}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){avnnet2}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){y}<LSEP>[](symbol){repeats}<LSEP>[](symbol){linout}<LSEP>[](symbol){trace}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){mods}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[statement 1; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){repeats}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){mods}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){nnet}<LSEP>[](symbol){nnet}<LEND>[](symbol){x}<LSEP>[](symbol){y}<LSEP>[](symbol){linout}<LSEP>[](symbol){trace}<LSEP>[](symbol){...}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){mods}<LSEP>[argument 1; litteral](str){nnetarmodels}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){predict.avnnet2}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){model}<LSEP>[](symbol){newdata}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){newdata}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){predict}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){model}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){rowMeans}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){model}<LSEP>[](symbol){predict}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){model}<LSEP>[](symbol){predict}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>=}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){newdata}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>=}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){newdata}<LEND>[argument 1; litteral](real){2.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){rowMeans}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){model}<LSEP>[](symbol){predict}<LSEP>[](symbol){newdata}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){model}<LSEP>[](symbol){predict}<LSEP>[](symbol){newdata}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_silent}<LEND>[argument 0; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){123.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){nnetar_model}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lynx}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){100.000000}<LEND>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){3.000000}<LSEP>[argument 4; litteral](real){20.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){123.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){modelAR_model}<LEND>[call](){}<LSEP>[](symbol){modelAR}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lynx}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){100.000000}<LEND>[](symbol){avnnet2}<LSEP>[](symbol){predict.avnnet2}<LSEP>[argument 3; litteral](real){2.000000}<LSEP>[argument 4; litteral](real){1.000000}<LSEP>[argument 5; litteral](logical){TRUE}<LSEP>[argument 6; litteral](real){3.000000}<LSEP>[argument 7; litteral](real){20.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){res1}<LEND>[call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){nnetar_model}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){res2}<LEND>[call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){modelAR_model}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LSEP>[](symbol){res1}<LSEP>[](symbol){res2}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_silent}<LEND>[argument 0; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nnetar_model2}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lynx}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){101.000000}<LSEP>[argument 1; litteral](real){114.000000}<LEND>[](symbol){nnetar_model}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){modelAR_model2}<LEND>[call](){}<LSEP>[](symbol){modelAR}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lynx}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){101.000000}<LSEP>[argument 1; litteral](real){114.000000}<LEND>[](symbol){avnnet2}<LSEP>[](symbol){predict.avnnet2}<LSEP>[](symbol){modelAR_model}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){res1}<LEND>[call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){nnetar_model2}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){res2}<LEND>[call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){modelAR_model2}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LSEP>[](symbol){res1}<LSEP>[](symbol){res2}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_silent}<LEND>[argument 0; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){f1}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){nnetar_model}<LEND>[](symbol){mean}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){f2}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){modelAR_model}<LEND>[](symbol){mean}<LEND>[statement 7; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LSEP>[](symbol){f1}<LSEP>[](symbol){f2}<LEND>[statement 8; call](){}<LSEP>[](symbol){expect_silent}<LEND>[argument 0; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){123.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){oilnnet_nnetar}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){airmiles}<LSEP>[argument 1; litteral](real){0.150000}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){20.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){123.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){oilnnet_modelAR}<LEND>[call](){}<LSEP>[](symbol){modelAR}<LSEP>[](symbol){airmiles}<LSEP>[](symbol){avnnet2}<LSEP>[](symbol){predict.avnnet2}<LSEP>[argument 3; litteral](logical){TRUE}<LSEP>[argument 4; litteral](real){0.150000}<LSEP>[argument 5; litteral](real){1.000000}<LSEP>[argument 6; litteral](real){20.000000}<LEND>[statement 9; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){oilnnet_nnetar}<LSEP>[argument 1; litteral](str){response}<LEND>[argument 1; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){oilnnet_modelAR}<LSEP>[argument 1; litteral](str){response}<LEND>[statement 10; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){oilnnet_modelAR}<LEND>[](symbol){mean}<LEND>[argument 1; litteral](real){10.000000}<LEND>[statement 11; call](){}<LSEP>[](symbol){expect_silent}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){woolyrnqnnet}<LEND>[call](){}<LSEP>[](symbol){modelAR}<LSEP>[](symbol){woolyrnq}<LSEP>[](symbol){avnnet2}<LSEP>[](symbol){predict.avnnet2}<LSEP>[argument 3; litteral](logical){TRUE}<LSEP>[argument 4; litteral](real){1.000000}<LSEP>[argument 5; litteral](real){0.000000}<LSEP>[argument 6; litteral](real){8.000000}<LSEP>[argument 7; litteral](real){10.000000}<LEND>[statement 12; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){woolyrnqnnet}<LEND>[argument 1; litteral](str){Series: woolyrnq}<LEND>[statement 13; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){woolyrnqnnet}<LEND>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){woolyrnq}<LEND>[statement 14; call](){}<LSEP>[](symbol){expect_silent}<LEND>[argument 0; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){123.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){woolyrnqnnet}<LEND>[call](){}<LSEP>[](symbol){modelAR}<LSEP>[](symbol){woolyrnq}<LSEP>[](symbol){avnnet2}<LSEP>[](symbol){predict.avnnet2}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[argument 4; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){woolyrnq}<LEND>[argument 5; litteral](real){2.000000}<LSEP>[argument 6; litteral](real){2.000000}<LSEP>[argument 7; litteral](real){4.000000}<LSEP>[argument 8; litteral](real){10.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){123.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){woolyrnqnnet2}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){woolyrnq}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){woolyrnq}<LEND>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){2.000000}<LSEP>[argument 4; litteral](real){4.000000}<LSEP>[argument 5; litteral](real){10.000000}<LEND>[statement 15; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){woolyrnqnnet}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){119.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 16; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){woolyrnqnnet}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){120.000000}<LSEP>[argument 1; litteral](real){130.000000}<LEND>[](symbol){mean}<LEND>[argument 1; litteral](real){11.000000}<LEND>[statement 17; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){woolyrnqnnet}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){120.000000}<LSEP>[argument 1; litteral](real){130.000000}<LEND>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){woolyrnqnnet2}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){120.000000}<LSEP>[argument 1; litteral](real){130.000000}<LEND>[](symbol){mean}<LEND>[statement 18; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){123.000000}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){winennet}<LEND>[call](){}<LSEP>[](symbol){modelAR}<LSEP>[](symbol){wineind}<LSEP>[](symbol){avnnet2}<LSEP>[](symbol){predict.avnnet2}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[argument 4; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){bizdays}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){fourier}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 5; litteral](real){2.000000}<LSEP>[argument 6; litteral](real){1.000000}<LSEP>[argument 7; litteral](real){4.000000}<LSEP>[argument 8; litteral](real){10.000000}<LEND>[statement 20; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){123.000000}<LEND>[statement 21; assign](){<-}<LSEP>[](symbol){winennet2}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){bizdays}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){fourier}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){1.000000}<LSEP>[argument 4; litteral](real){4.000000}<LSEP>[argument 5; litteral](real){10.000000}<LEND>[statement 22; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){winennet}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[](symbol){mean}<LEND>[argument 1; litteral](integer){2}<LEND>[statement 23; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){winennet}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[](symbol){mean}<LEND>[argument 1; litteral](integer){2}<LEND>[statement 24; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){winennet2}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[](symbol){mean}<LEND>[argument 1; litteral](str){different column names}<LEND>[argument 1; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){winennet}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[](symbol){mean}<LEND>[statement 25; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){wwwnnet}<LEND>[call](){}<LSEP>[](symbol){modelAR}<LSEP>[](symbol){WWWusage}<LSEP>[](symbol){avnnet2}<LSEP>[](symbol){predict.avnnet2}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[argument 4; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){WWWusage}<LEND>[argument 5; litteral](real){2.000000}<LSEP>[argument 6; litteral](real){4.000000}<LSEP>[argument 7; litteral](real){3.000000}<LSEP>[argument 8; litteral](real){10.000000}<LEND>[statement 26; call](){}<LSEP>[](symbol){expect_silent}<LEND>[argument 0; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){123.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){wwwnnet}<LEND>[call](){}<LSEP>[](symbol){modelAR}<LSEP>[](symbol){WWWusage}<LSEP>[](symbol){avnnet2}<LSEP>[](symbol){predict.avnnet2}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[argument 4; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){WWWusage}<LEND>[argument 5; litteral](real){2.000000}<LSEP>[argument 6; litteral](real){0.000000}<LSEP>[argument 7; litteral](real){3.000000}<LSEP>[argument 8; litteral](real){0.100000}<LSEP>[argument 9; litteral](real){10.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){123.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){wwwnnet2}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){WWWusage}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){0.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){WWWusage}<LEND>[argument 5; litteral](real){0.100000}<LSEP>[argument 6; litteral](real){10.000000}<LEND>[statement 27; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){wwwnnet}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){WWWusage}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){WWWusage}<LEND>[argument 1; litteral](real){5.000000}<LEND>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){wwwnnet2}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){WWWusage}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){WWWusage}<LEND>[argument 1; litteral](real){5.000000}<LEND>[](symbol){mean}<LEND>[statement 28; assign](){<-}<LSEP>[](symbol){airna}<LSEP>[](symbol){airmiles}<LEND>[statement 29; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){airna}<LSEP>[argument 1; litteral](real){12.000000}<LEND>[litteral](logical){NA}<LEND>[statement 30; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){airnnet}<LEND>[call](){}<LSEP>[](symbol){modelAR}<LSEP>[](symbol){airna}<LSEP>[](symbol){avnnet2}<LSEP>[](symbol){predict.avnnet2}<LSEP>[argument 3; litteral](logical){TRUE}<LSEP>[argument 4; litteral](real){1.000000}<LSEP>[argument 5; litteral](real){0.000000}<LSEP>[argument 6; litteral](logical){TRUE}<LEND>[argument 7; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 8; litteral](real){0.000000}<LSEP>[argument 9; litteral](real){5.000000}<LEND>[statement 31; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){airnnet}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){12.000000}<LSEP>[argument 2; litteral](real){13.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){airna}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){11.000000}<LSEP>[argument 1; litteral](real){12.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){airna}<LEND>[statement 32; call](){}<LSEP>[](symbol){expect_silent}<LEND>[argument 0; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){123.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fit1}<LEND>[call](){}<LSEP>[](symbol){modelAR}<LSEP>[](symbol){WWWusage}<LSEP>[](symbol){avnnet2}<LSEP>[](symbol){predict.avnnet2}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[argument 4; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){WWWusage}<LEND>[argument 5; litteral](real){3.000000}<LSEP>[argument 6; litteral](real){2.000000}<LSEP>[argument 7; litteral](real){2.000000}<LSEP>[argument 8; litteral](real){0.500000}<LSEP>[argument 9; litteral](real){25.000000}<LSEP>[argument 10; litteral](real){7.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit2}<LEND>[call](){}<LSEP>[](symbol){modelAR}<LSEP>[](symbol){WWWusage}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){WWWusage}<LEND>[](symbol){fit1}<LEND>[statement 3; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){123.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fit3}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){WWWusage}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){WWWusage}<LEND>[argument 2; litteral](real){3.000000}<LSEP>[argument 3; litteral](real){2.000000}<LSEP>[argument 4; litteral](real){2.000000}<LSEP>[argument 5; litteral](real){0.500000}<LSEP>[argument 6; litteral](real){25.000000}<LSEP>[argument 7; litteral](real){7.000000}<LEND>[statement 33; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){p}<LEND>[statement 34; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){lambda}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){lambda}<LEND>[statement 35; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){modelargs}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){modelargs}<LEND>[statement 36; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){fit1}<LEND>[argument 1; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){fit2}<LEND>[statement 37; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){fit1}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){fit2}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 38; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){fit1}<LEND>[argument 1; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){fit2}<LEND>[statement 39; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){model}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){model}<LEND>[statement 40; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){model}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){wts}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){model}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){wts}<LEND>[statement 41; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){model}<LEND>[argument 1; litteral](real){7.000000}<LEND>[](symbol){wts}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){model}<LEND>[argument 1; litteral](real){7.000000}<LEND>[](symbol){wts}<LEND>[statement 42; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){fit1}<LEND>[argument 1; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){fit3}<LEND>[statement 43; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){fit1}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){fit3}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 44; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){fit1}<LSEP>[argument 1; litteral](str){response}<LEND>[argument 1; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){fit3}<LSEP>[argument 1; litteral](str){response}<LEND>[statement 45; call](){}<LSEP>[](symbol){expect_silent}<LEND>[argument 0; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){123.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){airnnet}<LEND>[call](){}<LSEP>[](symbol){modelAR}<LSEP>[](symbol){airmiles}<LSEP>[](symbol){}<LSEP>[](symbol){avnnet2}<LSEP>[](symbol){predict.avnnet2}<LSEP>[argument 4; litteral](logical){TRUE}<LEND>[argument 5; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){11.000000}<LSEP>[argument 1; litteral](real){20.000000}<LEND>[argument 6; litteral](real){1.000000}<LSEP>[argument 7; litteral](real){1.000000}<LSEP>[argument 8; litteral](real){10.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){123.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){airnnet2}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){airmiles}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){11.000000}<LSEP>[argument 1; litteral](real){20.000000}<LEND>[argument 3; litteral](real){1.000000}<LSEP>[argument 4; litteral](real){1.000000}<LSEP>[argument 5; litteral](real){10.000000}<LEND>[statement 46; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){airnnet}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){11.000000}<LSEP>[argument 1; litteral](real){20.000000}<LEND>[statement 47; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){airnnet}<LEND>[argument 1; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){airnnet2}<LEND>[statement 48; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){airnnet}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){airnnet2}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[](symbol){mean}<LEND>[statement 49; call](){}<LSEP>[](symbol){expect_silent}<LEND>[argument 0; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){123.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){airnnet}<LEND>[call](){}<LSEP>[](symbol){modelAR}<LSEP>[](symbol){airmiles}<LSEP>[](symbol){avnnet2}<LSEP>[](symbol){predict.avnnet2}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[argument 4; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){F}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){T}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){F}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){airmiles}<LEND>[argument 1; litteral](real){20.000000}<LEND>[argument 5; litteral](real){1.000000}<LSEP>[argument 6; litteral](real){1.000000}<LSEP>[argument 7; litteral](real){10.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){123.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){airnnet2}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){airmiles}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){F}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){T}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){F}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){airmiles}<LEND>[argument 1; litteral](real){20.000000}<LEND>[argument 3; litteral](real){1.000000}<LSEP>[argument 4; litteral](real){1.000000}<LSEP>[argument 5; litteral](real){10.000000}<LEND>[statement 50; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){airnnet}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){11.000000}<LSEP>[argument 1; litteral](real){20.000000}<LEND>[statement 51; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){airnnet}<LEND>[argument 1; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){airnnet2}<LEND>[statement 52; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){airnnet}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){airnnet2}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[](symbol){mean}<LEND>[statement 53; call](){}<LSEP>[](symbol){expect_silent}<LEND>[argument 0; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){456.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){f1}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){airnnet}<LSEP>[argument 1; litteral](real){5.000000}<LSEP>[argument 2; litteral](logical){TRUE}<LSEP>[argument 3; litteral](real){100.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){456.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){f2}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){airnnet2}<LSEP>[argument 1; litteral](real){5.000000}<LSEP>[argument 2; litteral](logical){TRUE}<LSEP>[argument 3; litteral](real){100.000000}<LEND>[statement 54; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){f1}<LSEP>[](symbol){upper}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){f2}<LSEP>[](symbol){upper}<LEND>[statement 55; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){f1}<LSEP>[](symbol){lower}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){f2}<LSEP>[](symbol){lower}<LEND>[statement 56; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){nnetfit}<LEND>[call](){}<LSEP>[](symbol){modelAR}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[](symbol){avnnet2}<LSEP>[](symbol){predict.avnnet2}<LSEP>[argument 3; litteral](real){2.000000}<LSEP>[argument 4; litteral](real){0.000000}<LSEP>[argument 5; litteral](real){1.000000}<LSEP>[argument 6; litteral](real){1.000000}<LSEP>[argument 7; litteral](real){0.100000}<LEND>[argument 1; litteral](str){Constant data}<LEND>[statement 57; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){nnetfit}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 58; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){nnetfit}<LSEP>[](symbol){lambda}<LEND>[statement 59; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){nnetfit}<LSEP>[](symbol){scalex}<LEND>[statement 60; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){nnetfit}<LEND>[call](){}<LSEP>[](symbol){modelAR}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[](symbol){avnnet2}<LSEP>[](symbol){predict.avnnet2}<LSEP>[argument 3; litteral](real){1.000000}<LSEP>[argument 4; litteral](real){0.000000}<LSEP>[argument 5; litteral](real){1.000000}<LSEP>[argument 6; litteral](real){1.000000}<LEND>[argument 1; litteral](str){Not enough data}<LEND>[statement 61; call](){}<LSEP>[](symbol){expect_silent}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){nnetfit}<LEND>[call](){}<LSEP>[](symbol){modelAR}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){3.000000}<LEND>[](symbol){avnnet2}<LSEP>[](symbol){predict.avnnet2}<LSEP>[argument 3; litteral](real){1.000000}<LSEP>[argument 4; litteral](real){0.000000}<LSEP>[argument 5; litteral](real){1.000000}<LSEP>[argument 6; litteral](real){1.000000}<LEND>[statement 62; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){nnetfit}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 63; call](){}<LSEP>[](symbol){expect_silent}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){nnetfit}<LEND>[call](){}<LSEP>[](symbol){modelAR}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){3.000000}<LEND>[](symbol){avnnet2}<LSEP>[](symbol){predict.avnnet2}<LSEP>[argument 3; litteral](real){2.000000}<LSEP>[argument 4; litteral](real){0.000000}<LSEP>[argument 5; litteral](real){1.000000}<LSEP>[argument 6; litteral](real){1.000000}<LEND>[statement 64; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){nnetfit}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 65; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){nnetfit}<LEND>[call](){}<LSEP>[](symbol){modelAR}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){3.000000}<LEND>[](symbol){avnnet2}<LSEP>[](symbol){predict.avnnet2}<LSEP>[argument 3; litteral](real){3.000000}<LSEP>[argument 4; litteral](real){0.000000}<LSEP>[argument 5; litteral](real){1.000000}<LSEP>[argument 6; litteral](real){1.000000}<LEND>[argument 1; litteral](str){short series}<LEND>[statement 66; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){nnetfit}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 67; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){nnetfit}<LEND>[call](){}<LSEP>[](symbol){modelAR}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){3.000000}<LEND>[](symbol){avnnet2}<LSEP>[](symbol){predict.avnnet2}<LSEP>[argument 3; litteral](real){4.000000}<LSEP>[argument 4; litteral](real){0.000000}<LSEP>[argument 5; litteral](real){1.000000}<LSEP>[argument 6; litteral](real){1.000000}<LEND>[argument 1; litteral](str){short series}<LEND>[statement 68; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){nnetfit}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 69; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){nnetfit}<LEND>[call](){}<LSEP>[](symbol){modelAR}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[](symbol){avnnet2}<LSEP>[](symbol){predict.avnnet2}<LEND>[argument 3; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[argument 4; litteral](real){2.000000}<LSEP>[argument 5; litteral](real){0.000000}<LSEP>[argument 6; litteral](real){1.000000}<LSEP>[argument 7; litteral](real){1.000000}<LSEP>[argument 8; litteral](real){0.100000}<LEND>[argument 1; litteral](str){Constant xreg}<LEND>[statement 70; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){nnetfit}<LSEP>[](symbol){scalexreg}<LEND>[statement 71; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){nnetfit}<LEND>[call](){}<LSEP>[](symbol){modelAR}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){3.000000}<LEND>[](symbol){avnnet2}<LSEP>[](symbol){predict.avnnet2}<LEND>[argument 3; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){3.000000}<LSEP>[argument 3; litteral](real){1.000000}<LSEP>[argument 4; litteral](real){1.000000}<LSEP>[argument 5; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 4; litteral](real){1.000000}<LSEP>[argument 5; litteral](real){0.000000}<LSEP>[argument 6; litteral](real){1.000000}<LSEP>[argument 7; litteral](real){1.000000}<LSEP>[argument 8; litteral](real){0.100000}<LEND>[argument 1; litteral](str){Constant xreg}<LEND>[statement 72; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){nnetfit}<LSEP>[](symbol){scalexreg} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){Test msts.R}<LEND>[statement 1; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for msts() and print.msts()}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){msts}<LSEP>[](symbol){taylor}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){48.000000}<LSEP>[argument 1; litteral](real){336.000000}<LEND>[argument 2; litteral](real){48.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){2000.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){22.000000}<LSEP>[argument 1; litteral](real){52.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](str){Multi-Seasonal Time Series} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){Tests on building model in tslm}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){mv_y}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){120.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){20.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){120.000000}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){7.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){16.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){6.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){mv_x}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){120.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){8.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){42.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){120.000000}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){7.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){20.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){6.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){v_y}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){120.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){8.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){12.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){v_x}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){120.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){28.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[argument 1; litteral](real){12.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){datamat}<LSEP>[](symbol){mv_y}<LSEP>[](symbol){mv_x}<LSEP>[](symbol){v_y}<LSEP>[](symbol){v_x}<LEND>[argument 4; call](){}<LSEP>[](symbol){fourier}<LSEP>[](symbol){v_y}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 6; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests on model building with u...}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit1}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){v_y}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[](symbol){data}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fit2}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){v_y}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[](symbol){data}<LSEP>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit3}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){v_y}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[](symbol){data}<LSEP>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){fitted.values}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit3}<LSEP>[](symbol){fitted.values}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fit2}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){v_y}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){120.000000}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){model}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){model}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){fit2}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){v_y}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[statement 7; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){fit1}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){fit2}<LEND>[statement 8; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){model}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){model}<LEND>[statement 9; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){coefficients}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){coefficients}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){fit1}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){USAccDeaths}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[](symbol){USAccDeaths}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){fit2}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){USAccDeaths}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[statement 12; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){fit1}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){fit2}<LEND>[statement 13; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){model}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){model}<LEND>[statement 14; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){coefficients}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){coefficients}<LEND>[statement 15; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){fit3}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){USAccDeaths}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[](symbol){USAccDeaths}<LEND>[argument 2; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){%%}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){USAccDeaths}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.100000}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){USAccDeaths}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[](symbol){USAccDeaths}<LEND>[statement 17; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){trend:season}<LEND>[argument 1; call](){}<LSEP>[](symbol){attr}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){terms}<LEND>[argument 1; litteral](str){term.labels}<LEND>[statement 7; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tslm parity with lm}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit1}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){v_y}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){v_x}<LEND>[argument 1; call](){}<LSEP>[](symbol){fourier}<LSEP>[](symbol){v_y}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){v_y}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fit2}<LEND>[call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){v_y}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){v_x}<LEND>[argument 1; call](){}<LSEP>[](symbol){fourier}<LSEP>[](symbol){v_y}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){v_y}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){coefficients}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){coefficients}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){model}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){model}<LEND>[statement 8; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests on subsetting data}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){a}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mv_y}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){fit1}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){mv_y}<LSEP>[](symbol){trend}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){a}<LSEP>[argument 1; litteral](real){20.000000}<LEND>[argument 1; litteral](str){Subset has been assumed contig...}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){fit2}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){mv_y}<LSEP>[](symbol){trend}<LEND>[argument 1; call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){mv_y}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mv_y}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 1; litteral](real){20.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){v_y}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){v_y}<LSEP>[argument 1; litteral](real){100.000000}<LEND>[argument 1; litteral](str){Subset has been assumed contig...}<LEND>[statement 9; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests on model building with m...}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit1}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){mv_y}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fit2}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){mv_y}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[argument 1; litteral](real){0.500000}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){coefficients}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){coefficients}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){fit3}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){mv_y}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[argument 1; litteral](real){0.500000}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){fitted.values}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit3}<LSEP>[](symbol){fitted.values}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){fit2}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){mv_y}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[](symbol){data}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){fit1}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){fit2}<LEND>[statement 7; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){model}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){model}<LEND>[statement 8; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){coefficients}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){coefficients}<LEND>[statement 9; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){fit3}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){mv_y}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mv_y}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){Subset has been assumed contig...}<LEND>[statement 10; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){fit4}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){mv_y}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[](symbol){data}<LEND>[argument 2; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mv_y}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){Subset has been assumed contig...}<LEND>[statement 11; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){fit3}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){fit4}<LEND>[statement 12; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit3}<LSEP>[](symbol){model}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit4}<LSEP>[](symbol){model}<LEND>[statement 13; call](){}<LSEP>[](symbol){expect_that}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit3}<LSEP>[](symbol){coefficients}<LEND>[argument 1; call](){}<LSEP>[](symbol){equals}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit4}<LSEP>[](symbol){coefficients}<LEND>[statement 10; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests with bad input}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){mpg}<LSEP>[](symbol){cyl}<LEND>[](symbol){mtcars}<LEND>[argument 1; litteral](str){Not time series data}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){tmp2}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[argument 1; call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){tmp2}<LSEP>[argument 1; litteral](str){January}<LEND>[argument 2; litteral](str){Non-seasonal data cannot be mo...}<LEND>[statement 11; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){forecast.lm}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit1}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){v_y}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fit2}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){v_y}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fcast1}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit1}<LSEP>[argument 1; litteral](real){60.000000}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){fcast2}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit2}<LSEP>[argument 1; litteral](real){60.000000}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast1}<LSEP>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast2}<LSEP>[](symbol){mean}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){fred}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){ldeaths}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){fc}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fred}<LEND>[statement 12; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){Unusual usage}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_silent}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){fit1}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){v_y}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){v_x}<LEND>[argument 1; call](){}<LSEP>[](symbol){I}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){v_x}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){fourier}<LSEP>[](symbol){v_x}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 13; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){Missing values}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){USMissingDeaths}<LSEP>[](symbol){USAccDeaths}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){USMissingDeaths}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){44.000000}<LSEP>[argument 2; litteral](real){72.000000}<LEND>[litteral](logical){NA}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){timetrend}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){72.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){USMissingDeaths}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){season}<LSEP>[](symbol){timetrend}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){fit}<LEND>[argument 1; litteral](real){3.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){fc}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LSEP>[argument 0; litteral](real){73.000000}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fc}<LSEP>[](symbol){mean}<LEND>[argument 1; litteral](real){1.000000} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){Tests for BoxCox}<LEND>[statement 1; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for biasadj automaticall...}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){USAccDeaths}<LSEP>[](symbol){trend}<LEND>[argument 1; litteral](real){0.500000}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all.equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){ses}<LSEP>[](symbol){USAccDeaths}<LSEP>[argument 1; litteral](str){simple}<LSEP>[argument 2; litteral](real){0.500000}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all.equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){fracdiff}<LSEP>[](symbol){fracdiff.sim}<LEND>[argument 0; litteral](real){100.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.400000}<LEND>[argument 2; litteral](real){0.300000}<LEND>[](symbol){series}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){arfima}<LSEP>[](symbol){x}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all.equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){fit1}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){USAccDeaths}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 3; litteral](real){0.500000}<LSEP>[argument 4; litteral](logical){TRUE}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){fit2}<LEND>[call](){}<LSEP>[](symbol){auto.arima}<LSEP>[](symbol){USAccDeaths}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){1.000000}<LSEP>[argument 4; litteral](real){0.000000}<LSEP>[argument 5; litteral](real){1.000000}<LSEP>[argument 6; litteral](real){1.000000}<LSEP>[argument 7; litteral](real){0.500000}<LSEP>[argument 8; litteral](logical){TRUE}<LEND>[statement 9; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all.equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit1}<LEND>[argument 1; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit1}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 10; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all.equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit2}<LEND>[argument 1; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit2}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 11; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all.equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit1}<LEND>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit2}<LEND>[](symbol){mean}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){USAccDeaths}<LSEP>[argument 1; litteral](str){ANA}<LSEP>[argument 2; litteral](real){0.500000}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[statement 13; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all.equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 2; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for automatic lambda sel...}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lambda_auto}<LEND>[call](){}<LSEP>[](symbol){BoxCox.lambda}<LSEP>[](symbol){USAccDeaths}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){USAccDeaths}<LSEP>[](symbol){trend}<LEND>[argument 1; litteral](str){auto}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){lambda}<LEND>[](symbol){lambda_auto}<LSEP>[argument 2; litteral](real){0.000010}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){USAccDeaths}<LSEP>[argument 1; litteral](str){ANA}<LSEP>[argument 2; litteral](str){auto}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){lambda}<LEND>[](symbol){lambda_auto}<LSEP>[argument 2; litteral](real){0.000010}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){USAccDeaths}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 3; litteral](str){auto}<LSEP>[argument 4; litteral](logical){TRUE}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){lambda}<LEND>[](symbol){lambda_auto}<LSEP>[argument 2; litteral](real){0.000010} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){Tests on dshw()}<LEND>[statement 1; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){Test dshw()}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){345.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){dshw}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[argument 1; litteral](real){10.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){dshw}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){100.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){5555.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){t}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){0.100000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){exp}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[](symbol){t}<LEND>[argument 1; call](){}<LSEP>[](symbol){cos}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[](symbol){t}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){rnorm}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){t}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.100000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){fit1}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){dshw}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[](symbol){mean}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){fit2}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){dshw}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){4.000000}<LEND>[](symbol){mean}<LEND>[statement 8; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){fit1}<LSEP>[](symbol){fit2}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){fit3}<LEND>[call](){}<LSEP>[](symbol){dshw}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){4.000000}<LSEP>[argument 3; litteral](real){2.000000}<LSEP>[argument 4; litteral](logical){FALSE}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){fit4}<LEND>[call](){}<LSEP>[](symbol){dshw}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){4.000000}<LSEP>[argument 3; litteral](real){2.000000}<LSEP>[argument 4; litteral](logical){TRUE}<LEND>[statement 12; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit3}<LSEP>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit4}<LSEP>[](symbol){mean}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){fit5}<LEND>[call](){}<LSEP>[](symbol){dshw}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){4.000000}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[statement 14; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){dshw}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[statement 15; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){dshw}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){4.100000} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){test thetaf()}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){thetafc}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){thetaf}<LSEP>[](symbol){WWWusage}<LEND>[](symbol){mean}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){thetafc}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){thetaf}<LSEP>[](symbol){WWWusage}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[](symbol){mean}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){thetaf}<LSEP>[](symbol){WWWusage}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){thetaf}<LSEP>[](symbol){WWWusage}<LSEP>[argument 1; litteral](real){110.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){950.000000}<LSEP>[argument 1; litteral](real){20.000000}<LEND>[argument 1; litteral](real){4.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){constantForecast}<LEND>[call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){thetaf}<LSEP>[](symbol){series}<LEND>[argument 1; litteral](logical){NA}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.constant}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){constantForecast}<LSEP>[](symbol){mean}<LEND>[argument 1; litteral](real){12.000000} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){Tests on tbats() functions}<LEND>[statement 1; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){Test simple cases for tbats}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){tbats}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](logical){FALSE}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_warning}<LEND>[argument 0; call](){}<LSEP>[](symbol){tbats}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[argument 1; litteral](logical){NA}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){7.000000}<LSEP>[argument 1; litteral](real){9.000000}<LEND>[argument 1; litteral](logical){FALSE}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[](symbol){tbats}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){100.000000}<LEND>[argument 1; litteral](logical){FALSE}<LEND>[](symbol){mean}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){Test tbats() and forecasts}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tbatsfit1}<LEND>[call](){}<LSEP>[](symbol){tbats}<LEND>[argument 0; call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){wineind}<LSEP>[argument 1; litteral](real){50.000000}<LEND>[argument 1; litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){tbatsfit2}<LEND>[call](){}<LSEP>[](symbol){tbats}<LSEP>[](symbol){WWWusage}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){tbatsfit3}<LEND>[call](){}<LSEP>[](symbol){tbats}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){woolyrnq}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){woolyrnq}<LEND>[argument 2; litteral](logical){FALSE}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){tbatsfit4}<LEND>[call](){}<LSEP>[](symbol){tbats}<LSEP>[](symbol){airmiles}<LSEP>[argument 1; litteral](logical){FALSE}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[statement 4; call](){}<LSEP>[](symbol){tbats.components}<LSEP>[](symbol){tbatsfit1}<LEND>[statement 5; call](){}<LSEP>[](symbol){tbats.components}<LSEP>[](symbol){tbatsfit2}<LEND>[statement 6; call](){}<LSEP>[](symbol){tbats.components}<LSEP>[](symbol){tbatsfit3}<LEND>[statement 7; call](){}<LSEP>[](symbol){tbats.components}<LSEP>[](symbol){tbatsfit4}<LEND>[statement 8; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){tbatsfit1}<LEND>[argument 1; litteral](str){ME}<LEND>[statement 9; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){tbatsfit2}<LEND>[argument 1; litteral](str){ME}<LEND>[statement 10; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){tbatsfit3}<LEND>[argument 1; litteral](str){ME}<LEND>[statement 11; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){tbatsfit4}<LEND>[argument 1; litteral](str){ME}<LEND>[statement 12; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){tbatsfit1}<LEND>[argument 1; litteral](str){Length}<LEND>[statement 13; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){tbatsfit2}<LEND>[argument 1; litteral](str){Length}<LEND>[statement 14; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){tbatsfit3}<LEND>[argument 1; litteral](str){Length}<LEND>[statement 15; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){tbatsfit4}<LEND>[argument 1; litteral](str){Length}<LEND>[statement 16; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){tbatsfit1}<LEND>[argument 1; litteral](real){50.000000}<LEND>[statement 17; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){tbatsfit2}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){WWWusage}<LEND>[statement 18; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){tbatsfit3}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){woolyrnq}<LEND>[statement 19; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){tbatsfit4}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){airmiles}<LEND>[statement 20; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){tbatsfit1}<LEND>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){wineind}<LEND>[statement 21; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){tbatsfit2}<LEND>[](symbol){mean}<LEND>[argument 1; litteral](real){10.000000}<LEND>[statement 22; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){tbatsfit4}<LEND>[](symbol){mean}<LEND>[argument 1; litteral](real){10.000000}<LEND>[statement 23; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){tbatsfit1}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[statement 24; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){tbatsfit1}<LSEP>[argument 1; litteral](real){110.000000}<LEND>[statement 25; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){tbatsfit1}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){tbatsfit1}<LEND>[](symbol){mean} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){context}<LSEP>[argument 0; litteral](str){Test forecast.R}<LEND>[statement 1; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests for findfrequency()}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){airmiles}<LEND>[argument 1; call](){}<LSEP>[](symbol){findfrequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){airmiles}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){wineind}<LEND>[argument 1; call](){}<LSEP>[](symbol){findfrequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){wineind}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){woolyrnq}<LEND>[argument 1; call](){}<LSEP>[](symbol){findfrequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){woolyrnq}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){gas}<LEND>[argument 1; call](){}<LSEP>[](symbol){findfrequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){gas}<LEND>[statement 2; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests forecast.ts()}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fc1}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){airmiles}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[](symbol){mean}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fc2}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){airmiles}<LEND>[](symbol){mean}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){fc1}<LSEP>[](symbol){fc2}<LEND>[statement 3; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){tests summary.forecast() and f...}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){WWWusageforecast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){WWWusage}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){WWWusageforecast}<LEND>[argument 1; litteral](str){Forecast method:}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){WWWusageforecast}<LEND>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){WWWusageforecast}<LEND>[](symbol){mean} |
[](){expression}<LSEP>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){testthat}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){arfima1}<LEND>[call](){}<LSEP>[](symbol){arfima}<LSEP>[](symbol){WWWusage}<LSEP>[argument 1; litteral](str){mle}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){arfima2}<LEND>[call](){}<LSEP>[](symbol){arfima}<LSEP>[](symbol){WWWusage}<LSEP>[argument 1; litteral](str){ls}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){arfimabc}<LEND>[call](){}<LSEP>[](symbol){arfima}<LSEP>[](symbol){WWWusage}<LSEP>[argument 1; litteral](str){mle}<LSEP>[argument 2; litteral](real){0.750000}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){arfimabc2}<LEND>[call](){}<LSEP>[](symbol){arfima}<LSEP>[](symbol){WWWusage}<LSEP>[argument 1; litteral](str){mle}<LSEP>[argument 2; litteral](real){0.750000}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[statement 4; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){test accuracy(), fitted(), and...}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){arfima1}<LEND>[argument 1; call](){}<LSEP>[](symbol){arimaorder}<LSEP>[](symbol){arfima2}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fitarfima}<LEND>[call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){arfima1}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){residarfima}<LEND>[call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){arfima2}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){fitarfima}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){residarfima}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){arfima1}<LEND>[](symbol){WWWusage}<LEND>[statement 5; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){arfimabc}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){arfimabc2}<LSEP>[](symbol){fitted}<LEND>[statement 6; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){arfima1}<LEND>[argument 1; litteral](logical){NA}<LEND>[statement 7; call](){}<LSEP>[](symbol){expect_equal}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){arfima1}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){arfima1}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){ME}<LEND>[statement 5; call](){}<LSEP>[](symbol){test_that}<LSEP>[argument 0; litteral](str){test forecast.fracdiff()}<LEND>[argument 1; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){expect_true}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){arfima1}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){arfima1}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[](symbol){mean}<LEND>[statement 1; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){arfimabc}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){expect_error}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){arfimabc}<LSEP>[argument 1; litteral](real){110.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){expect_false}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){arfimabc}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){arfimabc}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 4; call](){}<LSEP>[](symbol){expect_output}<LEND>[argument 0; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){arfimabc}<LEND>[argument 1; litteral](str){Forecast method: ARFIMA} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){seasadj}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; call](){}<LSEP>[](symbol){UseMethod}<LSEP>[argument 0; litteral](str){seasadj}<LEND>[assign](){<-}<LSEP>[](symbol){seasadj.stl}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){trendcycle}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){remainder}<LSEP>[](symbol){object}<LEND>[assign](){<-}<LSEP>[](symbol){seasadj.mstl}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){trendcycle}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){remainder}<LSEP>[](symbol){object}<LEND>[assign](){<-}<LSEP>[](symbol){seasadj.decomposed.ts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){type}<LEND>[argument 1; litteral](str){additive}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){seasonal}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){seasonal}<LEND>[assign](){<-}<LSEP>[](symbol){seasadj.tbats}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){object}<LEND>[assign](){<-}<LSEP>[](symbol){seasadj.seas}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){seasextract_w_na_action}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](str){final} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){makeTBATSFMatrix}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){gamma.bold.matrix}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){F}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){small.phi}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tau}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){k.vector}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){zero.tau}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){tau}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){F}<LSEP>[](symbol){zero.tau}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ar.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ar.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ar.coefs}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){ar.coefs}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){alpha.phi}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LSEP>[](symbol){ar.coefs}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){F}<LSEP>[](symbol){alpha.phi}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ma.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ma.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ma.coefs}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){ma.coefs}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){q}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){alpha.theta}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LSEP>[](symbol){ma.coefs}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){F}<LSEP>[](symbol){alpha.theta}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta.row}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){small.phi}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta.row}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){beta.row}<LSEP>[](symbol){zero.tau}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ar.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta.phi}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){beta}<LSEP>[](symbol){ar.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta.row}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){beta.row}<LSEP>[](symbol){beta.phi}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ma.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta.theta}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){beta}<LSEP>[](symbol){ma.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta.row}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){beta.row}<LSEP>[](symbol){beta.theta}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){F}<LSEP>[](symbol){beta.row}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal.row}<LEND>[call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){zero.tau}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal.row}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){seasonal.row}<LSEP>[](symbol){seasonal.row}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){A}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){tau}<LSEP>[](symbol){tau}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){last.pos}<LSEP>[litteral](real){0.000000}<LEND>[statement 4; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){k.vector}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){2.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){C}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){makeCIMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.double}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){i}<LEND>[argument 2; litteral](str){forecast}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){C}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){S}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){makeSIMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.double}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){i}<LEND>[argument 2; litteral](str){forecast}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){Ai}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){makeAIMatrix}<LSEP>[](symbol){C}<LSEP>[](symbol){S}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[argument 3; litteral](str){forecast}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){A}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){last.pos}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){last.pos}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){last.pos}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){last.pos}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[](symbol){Ai}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){last.pos}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){last.pos}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){seasonal.row}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){seasonal.row}<LSEP>[](symbol){A}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ar.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){B}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){gamma.bold.matrix}<LEND>[](symbol){ar.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){seasonal.row}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){seasonal.row}<LSEP>[](symbol){B}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ma.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){C}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){gamma.bold.matrix}<LEND>[](symbol){ma.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){seasonal.row}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){seasonal.row}<LSEP>[](symbol){C}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){F}<LSEP>[](symbol){seasonal.row}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ar.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.rows}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){p}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.rows}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){ar.rows}<LSEP>[](symbol){ar.rows}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.seasonal.zeros}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){p}<LSEP>[](symbol){tau}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ar.rows}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){ar.rows}<LSEP>[](symbol){ar.seasonal.zeros}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){ident}<LEND>[call](){}<LSEP>[](symbol){diag}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){ident}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){ident}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){ar.part}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ident}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){ar.rows}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){ar.rows}<LSEP>[](symbol){ar.part}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ma.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.in.ar}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){p}<LSEP>[](symbol){q}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ma.in.ar}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){}<LEND>[](symbol){ma.coefs}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){ar.rows}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){ar.rows}<LSEP>[](symbol){ma.in.ar}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){F}<LSEP>[](symbol){ar.rows}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ma.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.rows}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){q}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.rows}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){ma.rows}<LSEP>[](symbol){ma.rows}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.seasonal}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){q}<LSEP>[](symbol){tau}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ma.rows}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){ma.rows}<LSEP>[](symbol){ma.seasonal}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ar.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.in.ma}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){q}<LSEP>[](symbol){p}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ma.rows}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){ma.rows}<LSEP>[](symbol){ar.in.ma}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){ident}<LEND>[call](){}<LSEP>[](symbol){diag}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){ident}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){ident}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){ma.part}<LEND>[call](){}<LSEP>[](symbol){rbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){q}<LEND>[](symbol){ident}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){ma.rows}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){ma.rows}<LSEP>[](symbol){ma.part}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){F}<LSEP>[](symbol){ma.rows}<LEND>[statement 9; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){F}<LEND>[assign](){<-}<LSEP>[](symbol){makeFMatrix}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){gamma.bold.matrix}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){F}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){small.phi}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tau}<LEND>[call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){seasonal.periods}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){zero.tau}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){tau}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){F}<LSEP>[](symbol){zero.tau}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ar.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ar.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ar.coefs}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){ar.coefs}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){alpha.phi}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LSEP>[](symbol){ar.coefs}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){F}<LSEP>[](symbol){alpha.phi}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ma.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ma.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ma.coefs}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){ma.coefs}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){q}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){alpha.theta}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LSEP>[](symbol){ma.coefs}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){F}<LSEP>[](symbol){alpha.theta}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta.row}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){small.phi}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta.row}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){beta.row}<LSEP>[](symbol){zero.tau}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ar.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta.phi}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){beta}<LSEP>[](symbol){ar.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta.row}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){beta.row}<LSEP>[](symbol){beta.phi}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ma.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta.theta}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){beta}<LSEP>[](symbol){ma.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta.row}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){beta.row}<LSEP>[](symbol){beta.theta}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){F}<LSEP>[](symbol){beta.row}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal.row}<LEND>[call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){zero.tau}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal.row}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){seasonal.row}<LSEP>[](symbol){seasonal.row}<LEND>[statement 2; control flow](){for}<LSEP>[](symbol){i}<LSEP>[](symbol){seasonal.periods}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal.periods}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){a.row.one}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){i}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){a.row.one}<LSEP>[](symbol){i}<LEND>[litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){a.row.two}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){diag}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){A}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){a.row.one}<LSEP>[](symbol){a.row.two}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){old.A.rows}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){A}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){old.A.columns}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){A}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){a.row.one}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){i}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){a.row.one}<LSEP>[](symbol){i}<LEND>[litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){a.row.two}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){diag}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){Ai}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){a.row.one}<LSEP>[](symbol){a.row.two}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){A}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){A}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){Ai}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){old.A.columns}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){A}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){A}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){A}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){Ai}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){A}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){old.A.rows}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){old.A.rows}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){Ai}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){old.A.columns}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){old.A.columns}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){Ai}<LEND>[argument 1; litteral](real){2.000000}<LEND>[](symbol){Ai}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){seasonal.row}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){seasonal.row}<LSEP>[](symbol){A}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ar.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){B}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){gamma.bold.matrix}<LEND>[](symbol){ar.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){seasonal.row}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){seasonal.row}<LSEP>[](symbol){B}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ma.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){C}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){gamma.bold.matrix}<LEND>[](symbol){ma.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){seasonal.row}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){seasonal.row}<LSEP>[](symbol){C}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){F}<LSEP>[](symbol){seasonal.row}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ar.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.rows}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){p}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.rows}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){ar.rows}<LSEP>[](symbol){ar.rows}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.seasonal.zeros}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){p}<LSEP>[](symbol){tau}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ar.rows}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){ar.rows}<LSEP>[](symbol){ar.seasonal.zeros}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){ident}<LEND>[call](){}<LSEP>[](symbol){diag}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){ident}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){ident}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){ar.part}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ident}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){ar.rows}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){ar.rows}<LSEP>[](symbol){ar.part}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ma.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.in.ar}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){p}<LSEP>[](symbol){q}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ma.in.ar}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){}<LEND>[](symbol){ma.coefs}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){ar.rows}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){ar.rows}<LSEP>[](symbol){ma.in.ar}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){F}<LSEP>[](symbol){ar.rows}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ma.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.rows}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){q}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.rows}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){ma.rows}<LSEP>[](symbol){ma.rows}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.seasonal}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){q}<LSEP>[](symbol){tau}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ma.rows}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){ma.rows}<LSEP>[](symbol){ma.seasonal}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ar.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.in.ma}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){q}<LSEP>[](symbol){p}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ma.rows}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){ma.rows}<LSEP>[](symbol){ar.in.ma}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){ident}<LEND>[call](){}<LSEP>[](symbol){diag}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){ident}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){ident}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){ma.part}<LEND>[call](){}<LSEP>[](symbol){rbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){q}<LEND>[](symbol){ident}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){ma.rows}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){ma.rows}<LSEP>[](symbol){ma.part}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){F}<LSEP>[](symbol){ma.rows}<LEND>[statement 9; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){F}<LEND>[assign](){<-}<LSEP>[](symbol){makeXMatrix}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){l}<LSEP>[](symbol){b}<LSEP>[](symbol){s.vector}<LSEP>[](symbol){d.vector}<LSEP>[](symbol){epsilon.vector}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x.transpose}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){l}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){b}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x.transpose}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){x.transpose}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){b}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){s.vector}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x.transpose}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){x.transpose}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){s.vector}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){s.vector}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){d.vector}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x.transpose}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){x.transpose}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){d.vector}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){d.vector}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){epsilon.vector}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x.transpose}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){x.transpose}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){epsilon.vector}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){epsilon.vector}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){x.transpose}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){x}<LSEP>[](symbol){x.transpose} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){modelAR}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){p}<LSEP>[](symbol){P}<LSEP>[](symbol){FUN}<LSEP>[](symbol){predict.FUN}<LSEP>[](symbol){xreg}<LSEP>[](symbol){lambda}<LSEP>[](symbol){model}<LSEP>[](symbol){subset}<LSEP>[](symbol){scale.inputs}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){useoldmodel}<LSEP>[litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){yname}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){useoldmodel}<LSEP>[litteral](logical){TRUE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.modelAR}<LSEP>[](symbol){model}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Model must be a modelAR object}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){1}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){minlength}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){P}<LEND>[](symbol){m}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[](symbol){minlength}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Series must be at least of length}<LSEP>[](symbol){minlength}<LSEP>[argument 2; litteral](str){to use fitted model}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){3.000000}<LEND>[](symbol){m}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Data frequency doesn't match f...}<LSEP>[](symbol){m}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){x}<LSEP>[](symbol){m}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){No external regressors provided}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Number of external regressors ...}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){lambda}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){p}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){P}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){P}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){FUN}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){FUN}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){predict.FUN}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){predict.FUN}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lags}<LEND>[call](){}<LSEP>[](symbol){sort}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){m}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){P}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lags}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[statement 13; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){scalex}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){scale.inputs}<LSEP>[litteral](logical){TRUE}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](real){3.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Not enough data to fit a model}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){constant_data}<LEND>[call](){}<LSEP>[](symbol){is.constant}<LEND>[argument 0; call](){}<LSEP>[](symbol){na.interp}<LSEP>[](symbol){x}<LEND>[statement 2; control flow](){if}<LSEP>[](symbol){constant_data}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Constant data, setting p=1, P=...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){scale.inputs}<LSEP>[litteral](logical){FALSE}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){lambda}<LSEP>[litteral](NULL){NULL}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){p}<LSEP>[litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){P}<LSEP>[litteral](real){0.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){constant_xreg}<LEND>[call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){xreg}<LEND>[argument 1; litteral](real){2.000000}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){is.constant}<LEND>[argument 0; call](){}<LSEP>[](symbol){na.interp}<LSEP>[](symbol){x}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){constant_xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Constant xreg column, setting ...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){scale.inputs}<LSEP>[litteral](logical){FALSE}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Missing values in x, omitting ...}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){xx}<LSEP>[argument 1; litteral](str){lambda}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LSEP>[](symbol){x}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){xsub}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){TRUE}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.numeric}<LSEP>[](symbol){subset}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xsub}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){subset}<LEND>[litteral](logical){FALSE}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.logical}<LSEP>[](symbol){subset}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xsub}<LSEP>[](symbol){subset}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){scalex}<LSEP>[litteral](NULL){NULL}<LEND>[statement 9; control flow](){if}<LSEP>[](symbol){scale.inputs}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){useoldmodel}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){scalex}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){scalex}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tmpx}<LEND>[call](){}<LSEP>[](symbol){scale}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xx}<LSEP>[](symbol){xsub}<LEND>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){scalex}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){tmpx}<LSEP>[argument 1; litteral](str){scaled:center}<LEND>[argument 1; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){tmpx}<LSEP>[argument 1; litteral](str){scaled:scale}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){scale}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){scalex}<LSEP>[](symbol){center}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){scalex}<LSEP>[](symbol){scale}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xx}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){xxreg}<LSEP>[litteral](NULL){NULL}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){scalexreg}<LSEP>[litteral](NULL){NULL}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xxreg}<LEND>[assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){xreg}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Number of rows in xreg does no...}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Missing values in xreg, omitti...}<LEND>[statement 3; control flow](){if}<LSEP>[](symbol){scale.inputs}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){useoldmodel}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){scalexreg}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){scalexreg}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tmpx}<LEND>[call](){}<LSEP>[](symbol){scale}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xxreg}<LSEP>[](symbol){xsub}<LSEP>[](symbol){}<LEND>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){scalexreg}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){tmpx}<LSEP>[argument 1; litteral](str){scaled:center}<LEND>[argument 1; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){tmpx}<LSEP>[argument 1; litteral](str){scaled:scale}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xxreg}<LEND>[call](){}<LSEP>[](symbol){scale}<LSEP>[](symbol){xxreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){scalexreg}<LSEP>[](symbol){center}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){scalexreg}<LSEP>[](symbol){scale}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){xx}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){xx}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){xx}<LEND>[argument 1; litteral](integer){1}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){useoldmodel}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){p}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){ar}<LEND>[argument 0; call](){}<LSEP>[](symbol){na.interp}<LSEP>[](symbol){xx}<LEND>[](symbol){ar}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>=}<LSEP>[](symbol){p}<LSEP>[](symbol){n}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Reducing number of lagged inpu...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){lags}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Non-seasonal data, ignoring se...}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){P}<LSEP>[litteral](real){0.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){p}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>=}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){m}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x.sa}<LEND>[call](){}<LSEP>[](symbol){seasadj}<LEND>[argument 0; call](){}<LSEP>[](symbol){mstl}<LEND>[argument 0; call](){}<LSEP>[](symbol){na.interp}<LSEP>[](symbol){xx}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x.sa}<LEND>[call](){}<LSEP>[](symbol){na.interp}<LSEP>[](symbol){xx}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){ar}<LSEP>[](symbol){x.sa}<LEND>[](symbol){ar}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>=}<LSEP>[](symbol){p}<LSEP>[](symbol){n}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Reducing number of lagged inpu...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>=}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){m}<LSEP>[](symbol){P}<LEND>[argument 1; litteral](real){2.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lags}<LEND>[call](){}<LSEP>[](symbol){sort}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){m}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){P}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lags}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Series too short for seasonal ...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){P}<LSEP>[litteral](real){0.000000}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){maxlag}<LEND>[call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){lags}<LEND>[statement 18; assign](){<-}<LSEP>[](symbol){nlag}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){lags}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){maxlag}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){lags.X}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){nan}<LSEP>[](symbol){nlag}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[](symbol){maxlag}<LEND>[statement 21; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nlag}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lags.X}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){maxlag}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lags}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lags}<LSEP>[](symbol){i}<LEND>[statement 22; assign](){<-}<LSEP>[](symbol){lags.X}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){lags.X}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xxreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){maxlag}<LEND>[](symbol){}<LEND>[statement 23; assign](){<-}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){complete.cases}<LSEP>[](symbol){lags.X}<LSEP>[](symbol){y}<LEND>[statement 24; assign](){<-}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){&}<LSEP>[](symbol){j}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xsub}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){maxlag}<LEND>[statement 25; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lags.X}<LSEP>[](symbol){j}<LSEP>[](symbol){}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){No data to fit (possibly due t...}<LEND>[statement 26; control flow](){if}<LSEP>[](symbol){useoldmodel}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){model}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){FUN}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lags.X}<LSEP>[](symbol){j}<LSEP>[](symbol){}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y}<LSEP>[](symbol){j}<LEND>[](symbol){...}<LEND>[statement 27; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[statement 28; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){x}<LEND>[statement 29; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){m}<LEND>[](symbol){m}<LEND>[statement 30; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){p}<LEND>[](symbol){p}<LEND>[statement 31; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){P}<LEND>[](symbol){P}<LEND>[statement 32; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){FUN}<LEND>[](symbol){FUN}<LEND>[statement 33; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){predict.FUN}<LEND>[](symbol){predict.FUN}<LEND>[statement 34; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){scalex}<LEND>[](symbol){scalex}<LEND>[statement 35; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){scalexreg}<LEND>[](symbol){scalexreg}<LEND>[statement 36; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){xreg}<LEND>[](symbol){xreg}<LEND>[statement 37; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){lambda}<LEND>[](symbol){lambda}<LEND>[statement 38; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){subset}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[](symbol){xsub}<LEND>[statement 39; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){model}<LEND>[](symbol){fit}<LEND>[statement 40; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){modelargs}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){...}<LEND>[statement 41; control flow](){if}<LSEP>[](symbol){useoldmodel}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){modelargs}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){modelargs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){nan}<LSEP>[](symbol){maxlag}<LEND>[argument 1; call](){}<LSEP>[](symbol){predict.FUN}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lags.X}<LSEP>[](symbol){j}<LSEP>[](symbol){}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){nan}<LSEP>[](symbol){maxlag}<LEND>[argument 1; call](){}<LSEP>[](symbol){predict.FUN}<LSEP>[](symbol){fit}<LEND>[statement 42; control flow](){if}<LSEP>[](symbol){scale.inputs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){fits}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){scalex}<LSEP>[](symbol){scale}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){scalex}<LSEP>[](symbol){center}<LEND>[statement 43; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){fits}<LEND>[statement 44; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){fits}<LSEP>[](symbol){lambda}<LEND>[statement 45; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){nan}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){x}<LEND>[statement 46; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){TRUE}<LSEP>[](symbol){maxlag}<LEND>[](symbol){j}<LEND>[](symbol){fits}<LEND>[statement 47; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){x}<LEND>[statement 48; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){residuals}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){fitted}<LEND>[statement 49; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){lags}<LEND>[](symbol){lags}<LEND>[statement 50; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){series}<LEND>[](symbol){yname}<LEND>[statement 51; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){FUN}<LEND>[statement 52; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){paste0}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[argument 1; litteral](str){-AR(}<LSEP>[](symbol){p}<LEND>[statement 53; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[argument 1; litteral](str){,}<LSEP>[](symbol){P}<LSEP>[argument 3; litteral](str){}<LEND>[statement 54; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){paste0}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[argument 1; litteral](str){)}<LEND>[statement 55; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[argument 1; litteral](str){[}<LSEP>[](symbol){m}<LSEP>[argument 3; litteral](str){]}<LSEP>[argument 4; litteral](str){}<LEND>[statement 56; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 57; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){modelAR}<LEND>[assign](){<-}<LSEP>[](symbol){forecast.modelAR}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){PI}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){xreg}<LSEP>[](symbol){lambda}<LSEP>[](symbol){bootstrap}<LSEP>[](symbol){npaths}<LSEP>[](symbol){innov}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LSEP>[](symbol){object}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){x}<LEND>[statement 2; control flow](){if}<LSEP>[](symbol){fan}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){51.000000}<LSEP>[argument 1; litteral](real){99.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){100.000000}<LSEP>[](symbol){level}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){99.990000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Confidence limit out of range}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){External regressors were not u...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xreg}<LSEP>[litteral](NULL){NULL}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){No external regressors provided}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){xreg}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Number of external regressors ...}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){h}<LEND>[call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){xreg}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){h}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){xxreg}<LSEP>[](symbol){xreg}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){xx}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){xx}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){scale}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){center}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){scale}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xxreg}<LEND>[call](){}<LSEP>[](symbol){scale}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalexreg}<LEND>[](symbol){center}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalexreg}<LEND>[](symbol){scale}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){lags}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lags}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){maxlag}<LEND>[call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){lags}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){flag}<LEND>[call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){tail}<LSEP>[](symbol){xx}<LSEP>[](symbol){maxlag}<LEND>[statement 12; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){newdata}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){flag}<LSEP>[](symbol){lags}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xxreg}<LSEP>[](symbol){i}<LSEP>[](symbol){}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){newdata}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){I can't forecast when there ar...}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fcast}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){predict.FUN}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){newdata}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){flag}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fcast}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){flag}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){maxlag}<LEND>[statement 13; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){fcast}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){scale}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){center}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){fcast}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 15; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lambda}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){isTRUE}<LSEP>[](symbol){PI}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nint}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){level}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){sim}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){npaths}<LSEP>[](symbol){h}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){innov}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){innov}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){h}<LSEP>[](symbol){npaths}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Incorrect number of innovation...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){innov}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){innov}<LSEP>[](symbol){h}<LSEP>[](symbol){npaths}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){bootstrap}<LSEP>[litteral](logical){FALSE}<LEND>[statement 3; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){npaths}<LEND>[body; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sim}<LSEP>[](symbol){i}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){simulate}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){bootstrap}<LSEP>[](symbol){xreg}<LSEP>[](symbol){lambda}<LEND>[argument 5; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){innov}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[](symbol){...}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){sim}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){quantile}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](real){200.000000}<LEND>[argument 4; litteral](real){8.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){sim}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){quantile}<LEND>[argument 3; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](real){200.000000}<LEND>[argument 4; litteral](real){8.000000}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){nint}<LSEP>[argument 1; litteral](integer){1}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){lower}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){upper}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){lower}<LSEP>[argument 1; litteral](integer){1}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){upper}<LSEP>[argument 1; litteral](integer){1}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){lower}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){fcast}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lower}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){upper}<LSEP>[litteral](NULL){NULL}<LEND>[statement 17; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){mean}<LEND>[](symbol){fcast}<LEND>[statement 18; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){level}<LEND>[](symbol){level}<LEND>[statement 19; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){lower}<LEND>[](symbol){lower}<LEND>[statement 20; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){upper}<LEND>[](symbol){upper}<LEND>[statement 21; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){out}<LSEP>[argument 1; litteral](str){forecast}<LEND>[assign](){<-}<LSEP>[](symbol){fitted.modelAR}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){hfitted}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[argument 2; litteral](str){modelAR}<LSEP>[](symbol){...}<LEND>[assign](){<-}<LSEP>[](symbol){print.modelAR}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){digits}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Series:}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){series}<LEND>[argument 2; litteral](str){\n}<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Model: }<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){method}<LEND>[argument 2; litteral](str){\n}<LEND>[statement 2; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Call: }<LEND>[statement 3; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){call}<LEND>[statement 4; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){model}<LEND>[statement 5; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\nsigma^2 estimated as }<LEND>[argument 1; call](){}<LSEP>[](symbol){format}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[](symbol){digits}<LEND>[argument 2; litteral](str){\n}<LSEP>[argument 3; litteral](str){}<LEND>[statement 6; call](){}<LSEP>[](symbol){invisible}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){is.modelAR}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){modelAR} |
[](){expression}<LSEP>[litteral](NULL){NULL}<LEND>[call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){magrittr}<LSEP>[](symbol){%>%} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){Acf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){lag.max}<LSEP>[](symbol){type}<LSEP>[](symbol){plot}<LSEP>[](symbol){na.action}<LSEP>[](symbol){demean}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){type}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){type}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){nseries}<LEND>[call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){x}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lag.max}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lag.max}<LEND>[call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){floor}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){log10}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){log10}<LSEP>[](symbol){nseries}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){acf.out}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){acf}<LEND>[](symbol){x}<LSEP>[argument 1; litteral](logical){FALSE}<LSEP>[](symbol){lag.max}<LSEP>[](symbol){type}<LSEP>[](symbol){na.action}<LSEP>[](symbol){demean}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){acf.out}<LSEP>[](symbol){tsp}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){acf.out}<LSEP>[](symbol){periods}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){x}<LEND>[](symbol){msts}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){acf.out}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){x}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){nlags}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){acf.out}<LSEP>[](symbol){lag}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){partial}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){acf.out}<LSEP>[](symbol){lag}<LEND>[](symbol){}<LSEP>[](symbol){}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LSEP>[](symbol){nlags}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){acf.out}<LSEP>[](symbol){lag}<LEND>[](symbol){}<LSEP>[](symbol){}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){nlags}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 9; control flow](){if}<LSEP>[](symbol){plot}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){plot.out}<LSEP>[](symbol){acf.out}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){correlation}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){plot.out}<LSEP>[](symbol){lag}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){i}<LSEP>[](symbol){i}<LEND>[litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){plot.out}<LSEP>[](symbol){acf}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){i}<LSEP>[](symbol){i}<LEND>[litteral](real){0.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){nseries}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){plot.out}<LSEP>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){input_list}<LEND>[call](){}<LSEP>[](symbol){as.list}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ylimarg}<LEND>[call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){ylim}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){input_list}<LEND>[statement 2; control flow](){if}<LSEP>[](symbol){ylimarg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){plot.out}<LSEP>[argument 1; litteral](str){n}<LSEP>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ylim}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ylim}<LEND>[call](){}<LSEP>[](symbol){range}<LSEP>[](symbol){ylim}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){plot.out}<LSEP>[](symbol){acf}<LEND>[statement 2; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){plot.out}<LSEP>[](symbol){ylim}<LSEP>[argument 2; litteral](str){n}<LSEP>[](symbol){...}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){msts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){seasonalaxis}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){x}<LEND>[](symbol){msts}<LEND>[](symbol){nlags}<LSEP>[argument 2; litteral](str){acf}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){seasonalaxis}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[](symbol){nlags}<LSEP>[argument 2; litteral](str){acf}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){covariance}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){axis}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){invisible}<LSEP>[](symbol){acf.out}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){acf.out}<LEND>[assign](){<-}<LSEP>[](symbol){seasonalaxis}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){nlags}<LSEP>[](symbol){type}<LSEP>[](symbol){plot}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out2}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){frequency}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){np}<LEND>[call](){}<LSEP>[](symbol){trunc}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){nlags}<LSEP>[](symbol){frequency}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){evenfreq}<LEND>[call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%%}<LSEP>[](symbol){frequency}<LSEP>[argument 1; litteral](integer){2}<LEND>[argument 1; litteral](integer){0}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){acf}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){pretty}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nlags}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){pretty}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){nlags}<LEND>[](symbol){nlags}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){frequency}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){acf}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){nlags}<LSEP>[argument 1; litteral](real){16.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nlags}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){ccf}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){nlags}<LSEP>[argument 1; litteral](real){8.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){nlags}<LEND>[](symbol){nlags}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){nlags}<LSEP>[argument 1; litteral](real){30.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){acf}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out2}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nlags}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){nlags}<LSEP>[argument 1; litteral](real){15.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){ccf}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out2}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){nlags}<LEND>[](symbol){nlags}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){out2}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){pretty}<LSEP>[](symbol){out2}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){frequency}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){acf}<LEND>[argument 1; call](){}<LSEP>[](symbol){>=}<LSEP>[](symbol){np}<LSEP>[argument 1; litteral](integer){2}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){ccf}<LEND>[argument 1; call](){}<LSEP>[](symbol){>=}<LSEP>[](symbol){np}<LSEP>[argument 1; litteral](integer){1}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){acf}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){nlags}<LSEP>[argument 1; litteral](real){40.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){frequency}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){np}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){out2}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nlags}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){nlags}<LSEP>[argument 1; litteral](real){30.000000}<LEND>[](symbol){evenfreq}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){np}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){frequency}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){np}<LEND>[argument 1; litteral](real){0.500000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){ccf}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){nlags}<LSEP>[argument 1; litteral](real){20.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){frequency}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){np}<LEND>[](symbol){np}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){out2}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){nlags}<LEND>[](symbol){nlags}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){nlags}<LSEP>[argument 1; litteral](real){15.000000}<LEND>[](symbol){evenfreq}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){np}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){frequency}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){np}<LEND>[](symbol){np}<LEND>[argument 1; litteral](real){0.500000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){np}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){12.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){4.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){ccf}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){frequency}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){np}<LEND>[](symbol){np}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){np}<LEND>[call](){}<LSEP>[](symbol){trunc}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){nlags}<LSEP>[](symbol){frequency}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){frequency}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){frequency}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){np}<LSEP>[argument 1; litteral](real){16.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){frequency}<LEND>[argument 1; litteral](integer){0}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){frequency}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){frequency}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){frequency}<LSEP>[litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){seasonalaxis}<LSEP>[](symbol){frequency}<LSEP>[](symbol){nlags}<LSEP>[](symbol){type}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[statement 2; control flow](){if}<LSEP>[](symbol){plot}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){axis}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){out}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){out2}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){axis}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){out2}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.200000}<LEND>[argument 3; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){out}<LEND>[assign](){<-}<LSEP>[](symbol){Pacf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){lag.max}<LSEP>[](symbol){plot}<LSEP>[](symbol){na.action}<LSEP>[](symbol){demean}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){Acf}<LSEP>[](symbol){x}<LSEP>[](symbol){lag.max}<LSEP>[argument 2; litteral](str){partial}<LSEP>[](symbol){na.action}<LSEP>[](symbol){demean}<LSEP>[argument 5; litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){x}<LEND>[statement 2; control flow](){if}<LSEP>[](symbol){plot}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nlags}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lag}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){plot.out}<LSEP>[](symbol){object}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){input_list}<LEND>[call](){}<LSEP>[](symbol){as.list}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){...}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){ylimarg}<LEND>[call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){ylim}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){input_list}<LEND>[statement 4; control flow](){if}<LSEP>[](symbol){ylimarg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){plot.out}<LSEP>[argument 1; litteral](str){n}<LSEP>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ylim}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ylim}<LEND>[call](){}<LSEP>[](symbol){range}<LSEP>[](symbol){ylim}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){plot.out}<LSEP>[](symbol){acf}<LEND>[statement 2; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){plot.out}<LSEP>[](symbol){ylim}<LSEP>[argument 2; litteral](str){n}<LSEP>[](symbol){...}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){msts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){seasonalaxis}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){x}<LEND>[](symbol){msts}<LEND>[](symbol){nlags}<LSEP>[argument 2; litteral](str){acf}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){seasonalaxis}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[](symbol){nlags}<LSEP>[argument 2; litteral](str){acf}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){invisible}<LSEP>[](symbol){object}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){object}<LEND>[assign](){<-}<LSEP>[](symbol){Ccf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){y}<LSEP>[](symbol){lag.max}<LSEP>[](symbol){type}<LSEP>[](symbol){plot}<LSEP>[](symbol){na.action}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){type}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){type}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lag.max}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lag.max}<LEND>[call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){floor}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){log10}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){ccf.out}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){ccf}<LEND>[](symbol){x}<LSEP>[](symbol){y}<LSEP>[argument 2; litteral](logical){FALSE}<LSEP>[](symbol){type}<LSEP>[](symbol){lag.max}<LSEP>[](symbol){na.action}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){nlags}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ccf.out}<LSEP>[](symbol){lag}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ccf.out}<LSEP>[](symbol){lag}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){nlags}<LEND>[](symbol){nlags}<LEND>[statement 5; control flow](){if}<LSEP>[](symbol){plot}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){vnames}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){1}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](integer){1}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ccf.out}<LSEP>[](symbol){snames}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){vnames}<LSEP>[argument 1; litteral](str){ & }<LEND>[statement 2; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){ccf.out}<LSEP>[argument 1; litteral](str){CCF}<LSEP>[argument 2; litteral](str){n}<LSEP>[](symbol){...}<LEND>[statement 3; call](){}<LSEP>[](symbol){seasonalaxis}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[](symbol){nlags}<LSEP>[argument 2; litteral](str){ccf}<LEND>[statement 4; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){invisible}<LSEP>[](symbol){ccf.out}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){ccf.out}<LEND>[assign](){<-}<LSEP>[](symbol){kappa}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 4; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){k}<LEND>[assign](){<-}<LSEP>[](symbol){wacf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){lag.max}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lag.max}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){lag.max}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){lag.max}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){'lag.max' must be at least 0}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){acfest}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){acf}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){x}<LEND>[](symbol){lag.max}<LSEP>[argument 2; litteral](logical){FALSE}<LSEP>[](symbol){na.contiguous}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){acfest}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){x}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){s}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){acfest}<LSEP>[](symbol){acf}<LEND>[](symbol){}<LSEP>[](symbol){}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){log}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[](symbol){n}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){ac}<LEND>[call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){acfest}<LSEP>[](symbol){acf}<LEND>[](symbol){}<LSEP>[](symbol){}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){ac}<LSEP>[](symbol){upper}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){l}<LSEP>[litteral](real){0.000000}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){k}<LSEP>[litteral](real){1.000000}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){N}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){j}<LEND>[argument 1; litteral](real){4.000000}<LEND>[statement 12; control flow](){while}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){l}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){k}<LSEP>[](symbol){N}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){j}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){k}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){l}<LSEP>[](symbol){k}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 13; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){acfest}<LSEP>[](symbol){acf}<LEND>[](symbol){}<LSEP>[](symbol){}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){acfest}<LSEP>[](symbol){acf}<LEND>[](symbol){}<LSEP>[](symbol){}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){kappa}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){s}<LSEP>[](symbol){l}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){gamma}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){acfest}<LSEP>[](symbol){acf}<LEND>[](symbol){}<LSEP>[](symbol){}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){s}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){gamma}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){Gamma}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){s}<LSEP>[](symbol){s}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){d}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){row}<LSEP>[](symbol){Gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){col}<LSEP>[](symbol){Gamma}<LEND>[statement 18; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[body; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){d}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){d}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){ei}<LEND>[call](){}<LSEP>[](symbol){eigen}<LSEP>[](symbol){Gamma}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){d}<LEND>[call](){}<LSEP>[](symbol){pmax}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ei}<LSEP>[](symbol){values}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){20.000000}<LSEP>[](symbol){n}<LEND>[statement 21; assign](){<-}<LSEP>[](symbol){Gamma2}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ei}<LSEP>[](symbol){vectors}<LEND>[argument 1; call](){}<LSEP>[](symbol){diag}<LSEP>[](symbol){d}<LEND>[argument 1; call](){}<LSEP>[](symbol){t}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ei}<LSEP>[](symbol){vectors}<LEND>[statement 22; assign](){<-}<LSEP>[](symbol){Gamma2}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){Gamma2}<LEND>[argument 1; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){d}<LEND>[statement 23; assign](){<-}<LSEP>[](symbol){d}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){row}<LSEP>[](symbol){Gamma2}<LEND>[argument 1; call](){}<LSEP>[](symbol){col}<LSEP>[](symbol){Gamma2}<LEND>[statement 24; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){s}<LEND>[body; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){gamma}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Gamma2}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){d}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 25; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){acfest}<LSEP>[](symbol){acf}<LEND>[](symbol){}<LSEP>[](symbol){}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[](symbol){gamma}<LEND>[statement 26; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){acfest}<LEND>[assign](){<-}<LSEP>[](symbol){wpacf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){lag.max}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){Pacf}<LSEP>[](symbol){x}<LSEP>[](symbol){lag.max}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){acvf}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){wacf}<LSEP>[](symbol){x}<LSEP>[](symbol){lag.max}<LEND>[](symbol){acf}<LEND>[](symbol){}<LSEP>[](symbol){}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){acvf}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){phis}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){acvf}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){acvf}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){pev}<LEND>[call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){acvf}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){pacf}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){phis}<LSEP>[](symbol){p}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pev}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pev}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){phis}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){p}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){old.phis}<LSEP>[](symbol){phis}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){phis}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){k}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){phis}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){acvf}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){old.phis}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){acvf}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pev}<LSEP>[](symbol){k}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){phis}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){old.phis}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){phis}<LSEP>[](symbol){k}<LEND>[argument 1; call](){}<LSEP>[](symbol){rev}<LSEP>[](symbol){old.phis}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pacf}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){phis}<LSEP>[](symbol){k}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pev}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pev}<LSEP>[](symbol){k}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){phis}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){acf}<LEND>[](symbol){}<LSEP>[](symbol){}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[](symbol){pacf}<LEND>[statement 9; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){out}<LEND>[assign](){<-}<LSEP>[](symbol){taperedacf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){lag.max}<LSEP>[](symbol){type}<LSEP>[](symbol){plot}<LSEP>[](symbol){calc.ci}<LSEP>[](symbol){level}<LSEP>[](symbol){nsim}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){type}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){type}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lag.max}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lag.max}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){floor}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){20.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){log10}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){4.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){lag}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){lag.max}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){correlation}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){z}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){wacf}<LSEP>[](symbol){x}<LSEP>[](symbol){}<LEND>[](symbol){acf}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){lag}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){z}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){wpacf}<LSEP>[](symbol){x}<LSEP>[](symbol){}<LEND>[](symbol){acf}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){lag}<LEND>[](symbol){}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){z}<LSEP>[](symbol){lag}<LSEP>[](symbol){type}<LSEP>[](symbol){x}<LEND>[statement 5; control flow](){if}<LSEP>[](symbol){calc.ci}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bootsim}<LEND>[call](){}<LSEP>[](symbol){lpb}<LSEP>[](symbol){x}<LSEP>[](symbol){nsim}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){s1}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){lag}<LSEP>[](symbol){nsim}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){correlation}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nsim}<LEND>[body; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){s1}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){wacf}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){bootsim}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[](symbol){acf}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){lag}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nsim}<LEND>[body; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){s1}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){wpacf}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){bootsim}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[](symbol){acf}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){lag}<LEND>[](symbol){}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){prob}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){100.000000}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){200.000000}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){s1}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){quantile}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){prob}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){s1}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){quantile}<LSEP>[](symbol){prob}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){out}<LSEP>[argument 1; litteral](str){mpacf}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){plot}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){out}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){out}<LSEP>[](symbol){...}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){invisible}<LSEP>[](symbol){out}<LEND>[statement 8; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){out}<LEND>[assign](){<-}<LSEP>[](symbol){taperedpacf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){taperedacf}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){partial}<LSEP>[](symbol){...}<LEND>[assign](){<-}<LSEP>[](symbol){plot.mpacf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){xlim}<LSEP>[](symbol){ylim}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lagx}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lag}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xlim}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xlim}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lag}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ylim}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ylim}<LEND>[call](){}<LSEP>[](symbol){range}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){z}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){upper}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lower}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){ylab}<LSEP>[argument 1; litteral](str){}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ylab}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){type}<LEND>[argument 1; litteral](str){partial}<LEND>[argument 1; litteral](str){PACF}<LSEP>[argument 2; litteral](str){ACF}<LEND>[statement 4; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){lagx}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){z}<LEND>[argument 2; litteral](str){n}<LSEP>[](symbol){xlim}<LSEP>[](symbol){ylim}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[argument 7; litteral](str){n}<LSEP>[](symbol){...}<LEND>[statement 5; call](){}<LSEP>[](symbol){grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){gray}<LSEP>[argument 0; litteral](real){0.800000}<LEND>[argument 1; litteral](logical){NA}<LSEP>[argument 2; litteral](NULL){NULL}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[statement 6; call](){}<LSEP>[](symbol){abline}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){gray}<LSEP>[argument 0; litteral](real){0.400000}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){axis}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){100.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[statement 1; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){100.000000}<LEND>[body; call](){}<LSEP>[](symbol){abline}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){gray}<LSEP>[argument 0; litteral](real){0.800000}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){axis}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){gray}<LSEP>[argument 0; litteral](real){0.800000}<LEND>[argument 1; litteral](logical){NA}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lower}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lag}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){polygon}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lagx}<LSEP>[](symbol){j}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.550000}<LEND>[argument 1; litteral](real){0.550000}<LSEP>[argument 2; litteral](real){0.550000}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.550000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lower}<LEND>[](symbol){j}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){upper}<LEND>[](symbol){j}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){gray}<LSEP>[argument 0; litteral](real){0.600000}<LEND>[argument 3; litteral](logical){FALSE}<LEND>[statement 9; call](){}<LSEP>[](symbol){lines}<LSEP>[](symbol){lagx}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){z}<LEND>[argument 2; litteral](real){1.500000}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lower}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){upper}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 11; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lagx}<LSEP>[](symbol){j}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){z}<LEND>[](symbol){j}<LEND>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){0.500000}<LEND>[statement 12; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lagx}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){j}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){z}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){j}<LEND>[argument 2; litteral](real){19.000000}<LEND>[assign](){<-}<LSEP>[](symbol){is.acf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){acf} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){cutWTBATS}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){use.beta}<LSEP>[](symbol){w.tilda.transpose}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){p}<LSEP>[](symbol){q}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){mask.vector}<LEND>[call](){}<LSEP>[](symbol){numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){seasonal.periods}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){seasonal.periods}<LEND>[statement 2; control flow](){while}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%%}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){j}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mask.vector}<LSEP>[](symbol){j}<LEND>[litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){w.pos.counter}<LSEP>[litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){w.pos}<LSEP>[litteral](real){1.000000}<LEND>[statement 5; control flow](){if}<LSEP>[](symbol){use.beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){w.pos}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){w.pos}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 6; control flow](){for}<LSEP>[](symbol){s}<LSEP>[](symbol){seasonal.periods}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mask.vector}<LSEP>[](symbol){w.pos.counter}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){w.tilda.transpose}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){w.tilda.transpose}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){w.pos}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){w.pos}<LSEP>[](symbol){s}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mask.vector}<LSEP>[](symbol){w.pos.counter}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){w.pos}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){w.pos}<LSEP>[](symbol){s}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){w.tilda.transpose}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){w.tilda.transpose}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){w.pos}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mask.vector}<LSEP>[](symbol){w.pos.counter}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){w.pos}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){w.pos}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){w.pos}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mask.vector}<LSEP>[](symbol){w.pos.counter}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){w.pos}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){w.pos}<LSEP>[](symbol){s}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){w.tilda.transpose}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){w.tilda.transpose}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){w.pos}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){w.pos}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){w.pos}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){w.pos.counter}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){w.pos.counter}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){end.cut}<LEND>[call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){w.tilda.transpose}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){start.cut}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){end.cut}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[](symbol){q}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){w.tilda.transpose}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){w.tilda.transpose}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){start.cut}<LSEP>[](symbol){end.cut}<LEND>[statement 8; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){w.tilda.transpose}<LSEP>[](symbol){mask.vector}<LEND>[assign](){<-}<LSEP>[](symbol){cutW}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){use.beta}<LSEP>[](symbol){w.tilda.transpose}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){p}<LSEP>[](symbol){q}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){mask.vector}<LEND>[call](){}<LSEP>[](symbol){numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){seasonal.periods}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){seasonal.periods}<LEND>[statement 2; control flow](){while}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%%}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){j}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mask.vector}<LSEP>[](symbol){j}<LEND>[litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){s}<LEND>[range; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 1; litteral](real){2.000000}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){hcf}<LEND>[call](){}<LSEP>[](symbol){findGCD}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){s}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){j}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){hcf}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mask.vector}<LSEP>[](symbol){s}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mask.vector}<LSEP>[](symbol){j}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mask.vector}<LSEP>[](symbol){s}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){hcf}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){w.pos.counter}<LSEP>[litteral](real){1.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){w.pos}<LSEP>[litteral](real){1.000000}<LEND>[statement 6; control flow](){if}<LSEP>[](symbol){use.beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){w.pos}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){w.pos}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 7; control flow](){for}<LSEP>[](symbol){s}<LSEP>[](symbol){seasonal.periods}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mask.vector}<LSEP>[](symbol){w.pos.counter}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){w.tilda.transpose}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){w.tilda.transpose}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){w.pos}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){w.pos}<LSEP>[](symbol){s}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mask.vector}<LSEP>[](symbol){w.pos.counter}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){w.pos}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){w.pos}<LSEP>[](symbol){s}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){w.tilda.transpose}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){w.tilda.transpose}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){w.pos}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mask.vector}<LSEP>[](symbol){w.pos.counter}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){w.pos}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){w.pos}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){w.pos}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mask.vector}<LSEP>[](symbol){w.pos.counter}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){w.pos}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){w.pos}<LSEP>[](symbol){s}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){w.tilda.transpose}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){w.tilda.transpose}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){w.pos}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){w.pos}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){w.pos}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){w.pos.counter}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){w.pos.counter}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){end.cut}<LEND>[call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){w.tilda.transpose}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){start.cut}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){end.cut}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[](symbol){q}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){w.tilda.transpose}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){w.tilda.transpose}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){start.cut}<LSEP>[](symbol){end.cut}<LEND>[statement 9; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){w.tilda.transpose}<LSEP>[](symbol){mask.vector}<LEND>[assign](){<-}<LSEP>[](symbol){calcSeasonalSeeds}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){use.beta}<LSEP>[](symbol){coefs}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){mask.vector}<LSEP>[](symbol){p}<LSEP>[](symbol){q}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x.pos.counter}<LSEP>[litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){sum.k}<LSEP>[litteral](real){0.000000}<LEND>[statement 2; control flow](){if}<LSEP>[](symbol){use.beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x.pos}<LSEP>[litteral](real){2.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){new.x.nought}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){coefs}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x.pos}<LSEP>[litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){new.x.nought}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){coefs}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){x.pos.counter}<LSEP>[litteral](real){1.000000}<LEND>[statement 4; control flow](){for}<LSEP>[](symbol){s}<LSEP>[](symbol){seasonal.periods}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mask.vector}<LSEP>[](symbol){x.pos.counter}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){season}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){s}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){new.x.nought}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){new.x.nought}<LSEP>[](symbol){season}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mask.vector}<LSEP>[](symbol){x.pos.counter}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){extract}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){coefs}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){x.pos}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){x.pos}<LSEP>[](symbol){s}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mask.vector}<LSEP>[](symbol){x.pos.counter}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){extract}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){sum.k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){sum.k}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){k}<LSEP>[](symbol){s}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){current.periodicity}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){extract}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){k}<LSEP>[](symbol){s}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){current.periodicity}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){current.periodicity}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){current.periodicity}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){additional}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){k}<LEND>[](symbol){s}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mask.vector}<LSEP>[](symbol){x.pos.counter}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){current.periodicity}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){current.periodicity}<LSEP>[](symbol){additional}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){new.x.nought}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){new.x.nought}<LSEP>[](symbol){current.periodicity}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){x.pos}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){x.pos}<LSEP>[](symbol){s}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mask.vector}<LSEP>[](symbol){x.pos.counter}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){coefs}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){x.pos}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){x.pos}<LSEP>[](symbol){s}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){sum.k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){sum.k}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){k}<LSEP>[](symbol){s}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){current.periodicity}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){coefs}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){x.pos}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){x.pos}<LSEP>[](symbol){s}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){k}<LSEP>[](symbol){s}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){current.periodicity}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){current.periodicity}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){k}<LEND>[](symbol){s}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){current.periodicity}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){current.periodicity}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){current.periodicity}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){new.x.nought}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){new.x.nought}<LSEP>[](symbol){current.periodicity}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){x.pos}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){x.pos}<LSEP>[](symbol){s}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x.pos.counter}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){x.pos.counter}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){arma.seed.states}<LEND>[call](){}<LSEP>[](symbol){numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[](symbol){q}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){arma.seed.states}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){arma.seed.states}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){arma.seed.states}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){x.nought}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){new.x.nought}<LSEP>[](symbol){arma.seed.states}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x.nought}<LSEP>[](symbol){new.x.nought}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){x.nought}<LEND>[assign](){<-}<LSEP>[](symbol){findGCD}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){larger}<LSEP>[](symbol){smaller}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){remainder}<LEND>[call](){}<LSEP>[](symbol){%%}<LSEP>[](symbol){larger}<LSEP>[](symbol){smaller}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){remainder}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){findGCD}<LSEP>[](symbol){smaller}<LSEP>[](symbol){remainder}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){smaller} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){residuals.forecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){type}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){type}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){type}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){innovation}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){residuals}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){object}<LEND>[assign](){<-}<LSEP>[](symbol){residuals.ar}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){type}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){type}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){type}<LEND>[statement 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){resid}<LEND>[assign](){<-}<LSEP>[](symbol){residuals.Arima}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){type}<LSEP>[](symbol){h}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){type}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){type}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){innovation}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){residuals}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){response}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){object}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){getxreg}<LSEP>[](symbol){object}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){intercept}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coef}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[](symbol){xreg}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){x}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){norder}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coef}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){norder}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coef}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[argument 2; call](){}<LSEP>[](symbol){start}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){residuals.forecast_ARIMA}<LSEP>[](symbol){residuals.Arima}<LEND>[assign](){<-}<LSEP>[](symbol){residuals.bats}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){type}<LSEP>[](symbol){h}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){type}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){type}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){innovation}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){errors}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LEND>[assign](){<-}<LSEP>[](symbol){residuals.tbats}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){type}<LSEP>[](symbol){h}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){type}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){type}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){innovation}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){errors}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LEND>[assign](){<-}<LSEP>[](symbol){residuals.ets}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){type}<LSEP>[](symbol){h}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){type}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){type}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){innovation}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){residuals}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LEND>[assign](){<-}<LSEP>[](symbol){residuals.ARFIMA}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){type}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){type}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){type}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){innovation}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){residuals}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){residuals}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){eval.parent}<LEND>[argument 0; call](){}<LSEP>[](symbol){parse}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){call}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){fracdiff}<LSEP>[](symbol){diffseries}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){d}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){arima}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ar}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ma}<LEND>[argument 2; litteral](logical){FALSE}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ar}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ma}<LEND>[statement 4; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){fit}<LSEP>[argument 1; litteral](str){innovation}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){object}<LEND>[assign](){<-}<LSEP>[](symbol){residuals.nnetar}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){type}<LSEP>[](symbol){h}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){type}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){type}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){innovation}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){unlist}<LEND>[argument 0; call](){}<LSEP>[](symbol){lapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){residuals}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){scale}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){res}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){scale}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){object}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){res}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](integer){3}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](integer){2}<LEND>[statement 4; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){res}<LEND>[assign](){<-}<LSEP>[](symbol){residuals.stlm}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){type}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){type}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){type}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){innovation}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){residuals}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){object}<LEND>[assign](){<-}<LSEP>[](symbol){residuals.tslm}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){type}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){type}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){type}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){innovation}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){deviance}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){residuals}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){object} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){thetaf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){fan}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){51.000000}<LSEP>[argument 1; litteral](real){99.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){100.000000}<LSEP>[](symbol){level}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){99.990000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Confidence limit out of range}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){x}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.constant}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){m}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){r}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){acf}<LSEP>[](symbol){x}<LSEP>[](symbol){m}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[](symbol){acf}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){stat}<LEND>[call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){r}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){m}<LEND>[argument 1; litteral](real){2.000000}<LEND>[](symbol){n}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){seasonal}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){r}<LSEP>[](symbol){m}<LEND>[](symbol){stat}<LEND>[argument 1; call](){}<LSEP>[](symbol){qnorm}<LSEP>[argument 0; litteral](real){0.950000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal}<LSEP>[litteral](logical){FALSE}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){origx}<LSEP>[](symbol){x}<LEND>[statement 6; control flow](){if}<LSEP>[](symbol){seasonal}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){decomp}<LEND>[call](){}<LSEP>[](symbol){decompose}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){multiplicative}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){decomp}<LEND>[argument 1; litteral](real){0.000100}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Seasonal indexes close to zero...}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){seasadj}<LSEP>[](symbol){decomp}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){ses}<LSEP>[](symbol){x}<LSEP>[](symbol){h}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){tmp2}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){lsfit}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){x}<LEND>[](symbol){coefficients}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){pmax}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){model}<LEND>[](symbol){par}<LEND>[argument 1; litteral](str){alpha}<LEND>[statement 10; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){mean}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){tmp2}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){alpha}<LEND>[](symbol){n}<LEND>[](symbol){alpha}<LEND>[statement 11; control flow](){if}<LSEP>[](symbol){seasonal}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){mean}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){tail}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){decomp}<LSEP>[](symbol){seasonal}<LEND>[](symbol){m}<LEND>[argument 1; call](){}<LSEP>[](symbol){trunc}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){h}<LSEP>[](symbol){m}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){decomp}<LSEP>[](symbol){seasonal}<LEND>[statement 12; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){residuals}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){origx}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){fitted}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){fcast.se}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){model}<LEND>[](symbol){sigma2}<LEND>[argument 1; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){alpha}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){nconf}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){level}<LEND>[statement 15; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lower}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){h}<LSEP>[](symbol){nconf}<LEND>[statement 16; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lower}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){mean}<LEND>[statement 17; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nconf}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){zt}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){qnorm}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){level}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){200.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lower}<LEND>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){zt}<LSEP>[](symbol){fcast.se}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){upper}<LEND>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){zt}<LSEP>[](symbol){fcast.se}<LEND>[statement 18; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){x}<LEND>[](symbol){origx}<LEND>[statement 19; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){level}<LEND>[](symbol){level}<LEND>[statement 20; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){method}<LEND>[litteral](str){Theta}<LEND>[statement 21; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){alpha}<LSEP>[](symbol){tmp2}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){model}<LEND>[](symbol){sigma2}<LEND>[statement 22; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){model}<LEND>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 23; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fcast} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){baggedModel}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){bootstrapped_series}<LSEP>[](symbol){fn}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.function}<LSEP>[](symbol){fn}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){Using character specification ...}<LEND>[argument 1; call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){fn}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){ets}<LSEP>[argument 1; litteral](str){auto.arima}<LEND>[argument 2; litteral](str){`.}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fn}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){utils}<LSEP>[](symbol){getFromNamespace}<LEND>[argument 0; call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){fn}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){ets}<LSEP>[argument 1; litteral](str){auto.arima}<LEND>[argument 1; litteral](str){forecast}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){mod_boot}<LEND>[call](){}<LSEP>[](symbol){lapply}<LSEP>[](symbol){bootstrapped_series}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){mod}<LEND>[call](){}<LSEP>[](symbol){fn}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){y}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){bootstrapped_series}<LEND>[](symbol){bootstrapped_series}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){models}<LEND>[](symbol){mod_boot}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){modelargs}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){...}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){fitted_boot}<LEND>[call](){}<LSEP>[](symbol){lapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){models}<LEND>[](symbol){fitted}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){fitted_boot}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.data.frame}<LSEP>[](symbol){fitted_boot}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){fitted_boot}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){mean}<LEND>[statement 10; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){y}<LEND>[statement 11; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){residuals}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){fitted}<LEND>[statement 12; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 13; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[litteral](str){baggedModel}<LEND>[statement 14; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 15; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){baggedModel}<LEND>[assign](){<-}<LSEP>[](symbol){baggedETS}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){bootstrapped_series}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){baggedModel}<LSEP>[](symbol){y}<LSEP>[](symbol){bootstrapped_series}<LSEP>[](symbol){ets}<LSEP>[](symbol){...}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){baggedETS}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){out}<LEND>[](symbol){out}<LEND>[assign](){<-}<LSEP>[](symbol){forecast.baggedModel}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){method}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted}<LEND>[argument 5; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){residuals}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){forecasts_boot}<LEND>[call](){}<LSEP>[](symbol){lapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){model}<LEND>[](symbol){models}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){mod}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){mod}<LSEP>[argument 1; litteral](str){ets}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){mod}<LSEP>[argument 1; litteral](logical){FALSE}<LSEP>[](symbol){h}<LSEP>[](symbol){...}<LEND>[](symbol){mean}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){mod}<LSEP>[](symbol){h}<LSEP>[](symbol){...}<LEND>[](symbol){mean}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){forecasts_boot}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.data.frame}<LSEP>[](symbol){forecasts_boot}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){forecasts_boot}<LEND>[litteral](NULL){NULL}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){tspx}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){start.f}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){x}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){start.f}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){forecasts_boot}<LEND>[](symbol){forecasts_boot}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){mean}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){forecasts_boot}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){x}<LEND>[](symbol){start.f}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){median}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){forecasts_boot}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){median}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){forecasts_boot}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){min}<LEND>[statement 10; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){forecasts_boot}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){max}<LEND>[statement 11; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){level}<LEND>[litteral](real){100.000000}<LEND>[statement 12; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){median}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){lower}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){mean}<LEND>[statement 13; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){out}<LEND>[litteral](str){forecast}<LEND>[](symbol){out}<LEND>[assign](){<-}<LSEP>[](symbol){print.baggedModel}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){digits}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Series:}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){series}<LEND>[argument 2; litteral](str){\n}<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Model: }<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){method}<LEND>[argument 2; litteral](str){\n}<LEND>[statement 2; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Call: }<LEND>[statement 3; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){call}<LEND>[statement 4; call](){}<LSEP>[](symbol){invisible}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){is.baggedModel}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){baggedModel} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){tl}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){tt}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){supsmu}<LSEP>[](symbol){tt}<LSEP>[](symbol){x}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){y}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){out}<LEND>[argument 1; litteral](str){stl}<LEND>[statement 8; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){out}<LEND>[assign](){<-}<LSEP>[](symbol){lpb}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){nsim}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){meanx}<LEND>[call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){x}<LSEP>[](symbol){meanx}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){gamma}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){wacf}<LSEP>[](symbol){y}<LSEP>[](symbol){n}<LEND>[](symbol){acf}<LEND>[](symbol){}<LSEP>[](symbol){}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){s}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){gamma}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){Gamma}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){s}<LSEP>[](symbol){s}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){d}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){row}<LSEP>[](symbol){Gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){col}<LSEP>[](symbol){Gamma}<LEND>[statement 7; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[body; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){d}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){d}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){L}<LEND>[call](){}<LSEP>[](symbol){t}<LEND>[argument 0; call](){}<LSEP>[](symbol){chol}<LSEP>[](symbol){Gamma}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){W}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){solve}<LSEP>[](symbol){L}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){L}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){sample}<LSEP>[](symbol){W}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){n}<LSEP>[](symbol){nsim}<LEND>[argument 2; litteral](logical){TRUE}<LEND>[](symbol){n}<LSEP>[](symbol){nsim}<LEND>[](symbol){meanx}<LEND>[statement 11; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 12; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){out}<LEND>[assign](){<-}<LSEP>[](symbol){MBB}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){window_size}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bx}<LEND>[call](){}<LSEP>[](symbol){array}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){floor}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[](symbol){window_size}<LEND>[argument 1; litteral](real){2.000000}<LEND>[](symbol){window_size}<LEND>[statement 1; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){floor}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[](symbol){window_size}<LEND>[argument 1; litteral](real){2.000000}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){c}<LEND>[call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[](symbol){window_size}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){bx}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){window_size}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){i}<LSEP>[](symbol){window_size}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){c}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){c}<LSEP>[](symbol){window_size}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){start_from}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){window_size}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){bx}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){start_from}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){start_from}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){bld.mbb.bootstrap}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){num}<LSEP>[](symbol){block_size}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){1}<LEND>[true branch; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){x}<LEND>[](symbol){num}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){freq}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){freq}<LSEP>[litteral](integer){1}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){block_size}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){block_size}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){freq}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){freq}<LEND>[argument 2; call](){}<LSEP>[](symbol){min}<LSEP>[argument 0; litteral](real){8.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){floor}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){xs}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){xs}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){x}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){num}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){0.000001}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){BoxCox.lambda}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lambda}<LSEP>[litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x.bc}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x.bc}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){freq}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x.stl}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){stl}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){x.bc}<LSEP>[](symbol){freq}<LEND>[argument 1; litteral](str){per}<LEND>[](symbol){time.series}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){seasonal}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x.stl}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){trend}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x.stl}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){remainder}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x.stl}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){trend}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 1; call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){x.loess}<LEND>[call](){}<LSEP>[](symbol){loess}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){x.bc}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){trend}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){6.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){seasonal}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){trend}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x.loess}<LSEP>[](symbol){fitted}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){remainder}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x.loess}<LSEP>[](symbol){residuals}<LEND>[statement 7; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){num}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){xs}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){seasonal}<LEND>[argument 1; call](){}<LSEP>[](symbol){MBB}<LSEP>[](symbol){remainder}<LSEP>[](symbol){block_size}<LEND>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){xs}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[](symbol){xs} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){autolayer}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){UseMethod}<LSEP>[argument 0; litteral](str){autolayer}<LEND>[call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){autoplot}<LEND>[assign](){<-}<LSEP>[](symbol){ggAddExtras}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){main}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){dots}<LEND>[call](){}<LSEP>[](symbol){eval.parent}<LEND>[argument 0; call](){}<LSEP>[](symbol){quote}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){extras}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){xlab}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){dots}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xlab}<LEND>[argument 1; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){xlab}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){xlab}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){dots}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){extras}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){extras}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){xlab}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dots}<LSEP>[](symbol){xlab}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){extras}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){extras}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){xlab}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xlab}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){xlab}<LEND>[argument 1; litteral](str){ }<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){ylab}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){dots}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ylab}<LEND>[argument 1; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){ylab}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){ylab}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){dots}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){extras}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){extras}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ylab}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dots}<LSEP>[](symbol){ylab}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){extras}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){extras}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ylab}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ylab}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){ylab}<LEND>[argument 1; litteral](str){ }<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){main}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){dots}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){main}<LEND>[argument 1; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){main}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){main}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){dots}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){extras}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){extras}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggtitle}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dots}<LSEP>[](symbol){main}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){extras}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){extras}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggtitle}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){main}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){main}<LEND>[argument 1; litteral](str){ }<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){xlim}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){dots}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){extras}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){extras}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){xlim}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dots}<LSEP>[](symbol){xlim}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){ylim}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){dots}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){extras}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){extras}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ylim}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dots}<LSEP>[](symbol){ylim}<LEND>[statement 7; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){extras}<LEND>[assign](){<-}<LSEP>[](symbol){ggtsbreaks}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){pretty}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){floor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ceiling}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){autoplot.acf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){ci}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){ggplot2 is needed for this fun...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](str){acf}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){autoplot.acf requires a acf ob...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){acf}<LEND>[call](){}<LSEP>[](symbol){dimnames<-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){acf}<LEND>[argument 1; call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](NULL){NULL}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){snames}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){snames}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){lag}<LEND>[call](){}<LSEP>[](symbol){dimnames<-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lag}<LEND>[argument 1; call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](NULL){NULL}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){snames}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){snames}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.data.frame.table}<LSEP>[](symbol){acf}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){lag}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){lag}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){type}<LEND>[argument 1; litteral](str){correlation}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ccf}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){lag}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){lag}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){lag}<LEND>[argument 2; litteral](real){0.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Freq}<LEND>[](symbol){data}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_hline}<LEND>[argument 0; litteral](real){0.000000}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_segment}<LEND>[argument 0; litteral](str){butt}<LSEP>[](symbol){...}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){ci}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){qnorm}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){ci}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){n.used}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_hline}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){ci}<LEND>[](symbol){ci}<LEND>[argument 1; litteral](str){blue}<LSEP>[argument 2; litteral](str){dashed}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){acf}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){facet_grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.formula}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](str){~}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ccf}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ylab}<LSEP>[litteral](str){CCF}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ticktype}<LSEP>[litteral](str){ccf}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){main}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Series:}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){snames}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){nlags}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lag}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){type}<LEND>[argument 1; litteral](str){partial}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ylab}<LSEP>[litteral](str){PACF}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ticktype}<LSEP>[litteral](str){acf}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){main}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Series:}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){nlags}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lag}<LEND>[argument 1; litteral](real){1.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){type}<LEND>[argument 1; litteral](str){correlation}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ylab}<LSEP>[litteral](str){ACF}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ticktype}<LSEP>[litteral](str){acf}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){main}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Series:}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){nlags}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lag}<LEND>[argument 1; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ylab}<LSEP>[litteral](NULL){NULL}<LEND>[statement 13; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){tsp}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){tsp}<LEND>[argument 1; litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){freq}<LSEP>[litteral](real){1.000000}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){periods}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){periods}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){periods}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){periods}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){periods}<LSEP>[](symbol){freq}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){minorbreaks}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){periods}<LEND>[argument 1; call](){}<LSEP>[](symbol){seq}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){20.000000}<LEND>[argument 1; litteral](real){20.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){minorbreaks}<LSEP>[litteral](NULL){NULL}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){scale_x_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){seasonalaxis}<LSEP>[](symbol){freq}<LSEP>[](symbol){nlags}<LSEP>[](symbol){ticktype}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[](symbol){minorbreaks}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggAddExtras}<LSEP>[](symbol){ylab}<LSEP>[argument 1; litteral](str){Lag}<LSEP>[](symbol){main}<LEND>[statement 17; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){p}<LEND>[assign](){<-}<LSEP>[](symbol){ggAcf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){lag.max}<LSEP>[](symbol){type}<LSEP>[](symbol){plot}<LSEP>[](symbol){na.action}<LSEP>[](symbol){demean}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){Acf}<LSEP>[](symbol){x}<LSEP>[](symbol){lag.max}<LSEP>[](symbol){type}<LSEP>[](symbol){na.action}<LSEP>[](symbol){demean}<LSEP>[argument 5; litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){tsp}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){periods}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){x}<LEND>[](symbol){msts}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){x}<LEND>[statement 4; control flow](){if}<LSEP>[](symbol){plot}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){object}<LEND>[assign](){<-}<LSEP>[](symbol){ggPacf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){lag.max}<LSEP>[](symbol){plot}<LSEP>[](symbol){na.action}<LSEP>[](symbol){demean}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){Acf}<LSEP>[](symbol){x}<LSEP>[](symbol){lag.max}<LSEP>[argument 2; litteral](str){partial}<LSEP>[](symbol){na.action}<LSEP>[](symbol){demean}<LSEP>[argument 5; litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){tsp}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){periods}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){x}<LEND>[](symbol){msts}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){x}<LEND>[statement 4; control flow](){if}<LSEP>[](symbol){plot}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){object}<LEND>[assign](){<-}<LSEP>[](symbol){ggCcf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){y}<LSEP>[](symbol){lag.max}<LSEP>[](symbol){type}<LSEP>[](symbol){plot}<LSEP>[](symbol){na.action}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){Ccf}<LSEP>[](symbol){x}<LSEP>[](symbol){y}<LSEP>[](symbol){lag.max}<LSEP>[](symbol){type}<LSEP>[](symbol){na.action}<LSEP>[argument 5; litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){snames}<LEND>[call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](str){&}<LEND>[argument 2; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ccf}<LEND>[litteral](logical){TRUE}<LEND>[statement 3; control flow](){if}<LSEP>[](symbol){plot}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){object}<LEND>[assign](){<-}<LSEP>[](symbol){autoplot.mpacf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){ggplot2 is needed for this fun...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](str){mpacf}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){autoplot.mpacf requires a mpac...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lower}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lag}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){z}<LEND>[argument 2; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lower}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){upper}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){cidata}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lag}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){z}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){upper}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lower}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){plotpi}<LSEP>[litteral](logical){TRUE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lag}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){z}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){plotpi}<LSEP>[litteral](logical){FALSE}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggplot}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_hline}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes}<LEND>[argument 0; litteral](real){0.000000}<LEND>[argument 1; litteral](real){0.200000}<LEND>[statement 4; control flow](){if}<LSEP>[](symbol){plotpi}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_ribbon}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Lag}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){lower}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){upper}<LEND>[](symbol){cidata}<LSEP>[argument 2; litteral](str){grey50}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_line}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Lag}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){z}<LEND>[](symbol){data}<LEND>[statement 6; control flow](){if}<LSEP>[](symbol){plotpi}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_point}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Lag}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){z}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){sig}<LEND>[](symbol){data}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){msts}<LEND>[call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){msts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[statement 9; control flow](){if}<LSEP>[](symbol){msts}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){periods}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){attributes}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[](symbol){msts}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){periods}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){periods}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){periods}<LSEP>[](symbol){freq}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){minorbreaks}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){periods}<LEND>[argument 1; call](){}<LSEP>[](symbol){seq}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){20.000000}<LEND>[argument 1; litteral](real){20.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){minorbreaks}<LSEP>[litteral](NULL){NULL}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){scale_x_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){seasonalaxis}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Lag}<LEND>[argument 2; litteral](str){acf}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[](symbol){minorbreaks}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){type}<LEND>[argument 1; litteral](str){partial}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ylab}<LSEP>[litteral](str){PACF}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){type}<LEND>[argument 1; litteral](str){correlation}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ylab}<LSEP>[litteral](str){ACF}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggAddExtras}<LSEP>[](symbol){ylab}<LEND>[statement 13; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){p}<LEND>[assign](){<-}<LSEP>[](symbol){ggtaperedacf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){lag.max}<LSEP>[](symbol){type}<LSEP>[](symbol){plot}<LSEP>[](symbol){calc.ci}<LSEP>[](symbol){level}<LSEP>[](symbol){nsim}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){cl}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){plot}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){cl}<LSEP>[](symbol){plot}<LEND>[litteral](logical){FALSE}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){cl}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){quote}<LSEP>[](symbol){taperedacf}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){eval.parent}<LSEP>[](symbol){cl}<LEND>[statement 4; control flow](){if}<LSEP>[](symbol){plot}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){object}<LEND>[assign](){<-}<LSEP>[](symbol){ggtaperedpacf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){ggtaperedacf}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){partial}<LSEP>[](symbol){...}<LEND>[assign](){<-}<LSEP>[](symbol){autoplot.Arima}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){type}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){ggplot2 is needed for this fun...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.Arima}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){type}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){type}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){q}<LEND>[assign](){<-}<LSEP>[](symbol){p}<LSEP>[litteral](real){0.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){phi}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){phi}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LSEP>[](symbol){test}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LSEP>[](symbol){test}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){theta}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){theta}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LSEP>[](symbol){test}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LSEP>[](symbol){test}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){both}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){type}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){ar}<LSEP>[argument 1; litteral](str){ma}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](str){ar}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){type}<LSEP>[litteral](str){ar}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){arroots}<LSEP>[](symbol){object}<LEND>[](symbol){roots}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){q}<LSEP>[litteral](real){0.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){autoplot.Arima requires an Ari...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){type}<LEND>[call](){}<LSEP>[](symbol){intersect}<LSEP>[](symbol){type}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){ar}<LSEP>[argument 1; litteral](str){ma}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){arData}<LEND>[assign](){<-}<LSEP>[](symbol){maData}<LSEP>[litteral](NULL){NULL}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){allRoots}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){numeric}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){character}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){ar}<LSEP>[](symbol){type}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){arData}<LEND>[call](){}<LSEP>[](symbol){arroots}<LSEP>[](symbol){object}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){allRoots}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){allRoots}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){arData}<LSEP>[](symbol){roots}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){arData}<LSEP>[](symbol){type}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){ma}<LSEP>[](symbol){type}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){maData}<LEND>[call](){}<LSEP>[](symbol){maroots}<LSEP>[](symbol){object}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){allRoots}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){allRoots}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){maData}<LSEP>[](symbol){roots}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){maData}<LSEP>[](symbol){type}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){allRoots}<LSEP>[](symbol){Real}<LEND>[call](){}<LSEP>[](symbol){Re}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){allRoots}<LSEP>[](symbol){roots}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){allRoots}<LSEP>[](symbol){Imaginary}<LEND>[call](){}<LSEP>[](symbol){Im}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){allRoots}<LSEP>[](symbol){roots}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){allRoots}<LSEP>[](symbol){UnitCircle}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){allRoots}<LSEP>[](symbol){roots}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){Within}<LSEP>[argument 2; litteral](str){Outside}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Real}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Imaginary}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){UnitCircle}<LEND>[](symbol){allRoots}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){coord_fixed}<LEND>[argument 0; litteral](real){1.000000}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){annotate}<LEND>[argument 0; litteral](str){path}<LEND>[argument 1; call](){}<LSEP>[](symbol){cos}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[argument 2; litteral](real){100.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[argument 2; litteral](real){100.000000}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_vline}<LEND>[argument 0; litteral](real){0.000000}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_hline}<LEND>[argument 0; litteral](real){0.000000}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggAddExtras}<LSEP>[argument 0; litteral](str){Real}<LSEP>[argument 1; litteral](str){Imaginary}<LEND>[statement 15; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){allRoots}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggAddExtras}<LSEP>[argument 0; litteral](str){No AR or MA roots}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_point}<LEND>[argument 0; litteral](real){3.000000}<LEND>[statement 17; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){type}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggAddExtras}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Inverse}<LEND>[argument 1; call](){}<LSEP>[](symbol){toupper}<LSEP>[](symbol){type}<LEND>[argument 2; litteral](str){roots}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){type}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){labels}<LEND>[body; call](){}<LSEP>[](symbol){lapply}<LSEP>[](symbol){labels}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Inverse}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){x}<LEND>[argument 2; litteral](str){roots}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){p}<LEND>[assign](){<-}<LSEP>[](symbol){autoplot.ar}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){autoplot.Arima}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[assign](){<-}<LSEP>[](symbol){autoplot.decomposed.ts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){labels}<LSEP>[](symbol){range.bars}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){ggplot2 is needed for this fun...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](str){decomposed.ts}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){autoplot.decomposed.ts require...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){labels}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){labels}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){trend}<LSEP>[argument 1; litteral](str){seasonal}<LSEP>[argument 2; litteral](str){remainder}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){cn}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){data}<LSEP>[](symbol){labels}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){trend}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){seasonal}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){random}<LEND>[argument 2; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){cn}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[](symbol){cn}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[](symbol){data}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){int}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){type}<LEND>[argument 1; litteral](str){multiplicative}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_line}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){parts}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){cn}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 2; litteral](logical){TRUE}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_segment}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){datetime}<LEND>[](symbol){int}<LEND>[argument 3; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){parts}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){cn}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 2; litteral](str){butt}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){facet_grid}<LEND>[argument 0; litteral](str){parts ~ .}<LSEP>[argument 1; litteral](str){free_y}<LSEP>[argument 2; litteral](str){y}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_hline}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){int}<LEND>[argument 1; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){cn}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[](symbol){cn}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){range.bars}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){range.bars}<LEND>[call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){type}<LEND>[argument 1; litteral](str){additive}<LEND>[statement 11; control flow](){if}<LSEP>[](symbol){range.bars}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){yranges}<LEND>[call](){}<LSEP>[](symbol){vapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){split}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){parts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){range}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 2; call](){}<LSEP>[](symbol){numeric}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xranges}<LEND>[call](){}<LSEP>[](symbol){range}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){datetime}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){barmid}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){yranges}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){mean}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){barlength}<LEND>[call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){yranges}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){diff}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){barwidth}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){64.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){xranges}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){barpos}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xranges}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){barwidth}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xranges}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){barwidth}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){barmid}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){barlength}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){barmid}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){barlength}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){yranges}<LEND>[](symbol){cn}<LEND>[argument 5; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xranges}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){barmid}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_rect}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){left}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){right}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){top}<LEND>[argument 3; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){bottom}<LEND>[](symbol){barpos}<LSEP>[argument 2; litteral](str){gray75}<LSEP>[argument 3; litteral](str){black}<LEND>[argument 4; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggAddExtras}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Decomposition of}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){type}<LEND>[argument 2; litteral](str){time series}<LEND>[argument 1; litteral](str){Time}<LSEP>[argument 2; litteral](str){}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){scale_x_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){pretty}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){datetime}<LEND>[statement 14; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){p}<LEND>[assign](){<-}<LSEP>[](symbol){autoplot.ets}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){range.bars}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){ggplot2 is needed for this fun...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.ets}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){autoplot.ets requires an ets o...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){names}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){observed}<LSEP>[argument 1; litteral](str){level}<LSEP>[argument 2; litteral](str){slope}<LSEP>[argument 3; litteral](str){season}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){states}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){states}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){names}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){cn}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){states}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){data}<LEND>[assign](){<-}<LSEP>[](symbol){cn}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){names}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){na.exclude}<LEND>[argument 0; call](){}<LSEP>[](symbol){match}<LSEP>[](symbol){cn}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){names}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){data}<LEND>[argument 2; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){cn}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){data}<LEND>[](symbol){cn}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[](symbol){data}<LSEP>[argument 2; litteral](str){}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_line}<LEND>[argument 0; litteral](logical){TRUE}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){facet_grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){parts}<LSEP>[](symbol){.}<LEND>[argument 1; litteral](str){free_y}<LSEP>[argument 2; litteral](str){y}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){range.bars}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){range.bars}<LEND>[call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[statement 10; control flow](){if}<LSEP>[](symbol){range.bars}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){yranges}<LEND>[call](){}<LSEP>[](symbol){vapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){split}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){parts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){range}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 2; call](){}<LSEP>[](symbol){numeric}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xranges}<LEND>[call](){}<LSEP>[](symbol){range}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){datetime}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){barmid}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){yranges}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){mean}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){barlength}<LEND>[call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){yranges}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){diff}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){barwidth}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){64.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){xranges}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){barpos}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xranges}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){barwidth}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xranges}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){barwidth}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){barmid}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){barlength}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){barmid}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){barlength}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){yranges}<LEND>[](symbol){cn}<LEND>[argument 5; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xranges}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){barmid}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_rect}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){left}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){right}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){top}<LEND>[argument 3; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){bottom}<LEND>[](symbol){barpos}<LSEP>[argument 2; litteral](str){gray75}<LSEP>[argument 3; litteral](str){black}<LEND>[argument 4; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggAddExtras}<LSEP>[argument 0; litteral](NULL){NULL}<LSEP>[argument 1; litteral](str){}<LEND>[argument 2; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Components of}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){method}<LEND>[argument 2; litteral](str){method}<LEND>[statement 12; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){p}<LEND>[assign](){<-}<LSEP>[](symbol){autoplot.tbats}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){range.bars}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){cl}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){cl}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){quote}<LSEP>[](symbol){autoplot.bats}<LEND>[statement 2; call](){}<LSEP>[](symbol){eval.parent}<LSEP>[](symbol){cl}<LEND>[assign](){<-}<LSEP>[](symbol){autoplot.bats}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){range.bars}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){tbats.components}<LSEP>[](symbol){object}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){cn}<LEND>[call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){data}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){data}<LEND>[argument 2; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){cn}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){data}<LEND>[](symbol){cn}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[](symbol){data}<LSEP>[argument 2; litteral](str){}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_line}<LEND>[argument 0; litteral](logical){TRUE}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){facet_grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){parts}<LSEP>[](symbol){.}<LEND>[argument 1; litteral](str){free_y}<LSEP>[argument 2; litteral](str){y}<LEND>[statement 6; control flow](){if}<LSEP>[](symbol){range.bars}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){yranges}<LEND>[call](){}<LSEP>[](symbol){vapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){split}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){parts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){range}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 2; call](){}<LSEP>[](symbol){numeric}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xranges}<LEND>[call](){}<LSEP>[](symbol){range}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){datetime}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){barmid}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){yranges}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){mean}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){barlength}<LEND>[call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){yranges}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){diff}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){barwidth}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){64.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){xranges}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){barpos}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xranges}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){barwidth}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xranges}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){barwidth}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){barmid}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){barlength}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){barmid}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){barlength}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){yranges}<LEND>[](symbol){cn}<LEND>[argument 5; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xranges}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){barmid}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_rect}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){left}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){right}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){top}<LEND>[argument 3; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){bottom}<LEND>[](symbol){barpos}<LSEP>[argument 2; litteral](str){gray75}<LSEP>[argument 3; litteral](str){black}<LEND>[argument 4; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggAddExtras}<LSEP>[argument 0; litteral](NULL){NULL}<LSEP>[argument 1; litteral](str){}<LEND>[argument 2; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Components of}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){method}<LEND>[argument 2; litteral](str){method}<LEND>[statement 8; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){p}<LEND>[assign](){<-}<LSEP>[](symbol){autoplot.forecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){include}<LSEP>[](symbol){PI}<LSEP>[](symbol){shadecols}<LSEP>[](symbol){fcol}<LSEP>[](symbol){flwd}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){ggplot2 is needed for this fun...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.forecast}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){autoplot.forecast requires a f...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lower}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){upper}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){level}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){PI}<LSEP>[litteral](logical){FALSE}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.finite}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){upper}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){PI}<LSEP>[litteral](logical){FALSE}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){terms}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){mt}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){terms}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){yvar}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){yvar}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){mt}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){xvar}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){mt}<LSEP>[argument 1; litteral](str){term.labels}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){vars}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){yvar}<LSEP>[](symbol){xvar}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){model}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){vars}<LEND>[argument 1; call](){}<LSEP>[](symbol){match}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){data}<LEND>[](symbol){vars}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){yvar}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){yvar}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){lambda}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){residuals}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){residuals}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Could not find data}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){vars}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){call}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){vars}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){call}<LEND>[](symbol){y}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){vars}<LSEP>[argument 1; litteral](str){object}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){vars}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){y}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){vars}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){y}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggplot}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){ts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){mean}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){xvar}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Forecast plot for regression m...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){newdata}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){newdata}<LEND>[](symbol){xvar}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){flwd}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){flwd}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_point}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){xvar}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){yvar}<LEND>[](symbol){data}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){labs}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){vars}<LSEP>[argument 1; litteral](str){yvar}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){vars}<LSEP>[argument 1; litteral](str){xvar}<LEND>[statement 5; control flow](){if}<LSEP>[](symbol){PI}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){levels}<LEND>[call](){}<LSEP>[](symbol){NROW}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){level}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){interval}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){newdata}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){levels}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lower}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){upper}<LEND>[argument 3; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){level}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){newdata}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){interval}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){interval}<LEND>[argument 1; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){interval}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[](symbol){}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_linerange}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){xpred}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){lower}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){upper}<LEND>[argument 3; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){level}<LEND>[](symbol){interval}<LSEP>[](symbol){flwd}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){5.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){scale_colour_gradientn}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){level}<LEND>[](symbol){shadecols}<LSEP>[argument 2; litteral](str){legend}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){scale_colour_gradientn}<LEND>[](symbol){shadecols}<LSEP>[argument 1; litteral](str){colourbar}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){predicted}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){newdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){mean}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){predicted}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){xpred}<LSEP>[argument 1; litteral](str){ypred}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_point}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){xpred}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){ypred}<LEND>[](symbol){predicted}<LSEP>[](symbol){fcol}<LSEP>[](symbol){flwd}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){coef}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){match}<LSEP>[argument 0; litteral](str){(Intercept)}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){coefficients}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){coef}<LSEP>[](symbol){int}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){coefficients}<LEND>[](symbol){i}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){coefficients}<LEND>[argument 1; litteral](real){2.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){coef}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){coefficients}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){coefficients}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){coef}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){coefficients}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_abline}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){coef}<LSEP>[](symbol){int}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){coef}<LSEP>[](symbol){m}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){shadecols}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){The `schadecols` argument is d...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){timex}<LEND>[call](){}<LSEP>[](symbol){time}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){residuals}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){timex}<LEND>[call](){}<LSEP>[](symbol){time}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){residuals}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){yvar}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){timex}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){include}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){tail}<LSEP>[](symbol){data}<LSEP>[](symbol){include}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){scale_x_continuous}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_line}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){yvar}<LEND>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){labs}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){vars}<LSEP>[argument 1; litteral](str){yvar}<LEND>[argument 1; litteral](str){Time}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){autolayer}<LSEP>[](symbol){object}<LSEP>[](symbol){PI}<LSEP>[](symbol){fcol}<LSEP>[](symbol){flwd}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggAddExtras}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Forecasts from }<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){method}<LEND>[argument 2; litteral](str){}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){p}<LEND>[assign](){<-}<LSEP>[](symbol){autoplot.mforecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){PI}<LSEP>[](symbol){facets}<LSEP>[](symbol){colour}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){ggplot2 is needed for this fun...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.mforecast}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){autoplot.mforecast requires a ...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){forecast}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){mean}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){autoplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){object}<LEND>[](symbol){facets}<LSEP>[](symbol){colour}<LEND>[argument 1; call](){}<LSEP>[](symbol){autolayer}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){facets}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){series}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){labels}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){method}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){lapply}<LSEP>[](symbol){labels}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){paste0}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](str){\n}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){method}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){x}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){lapply}<LSEP>[](symbol){labels}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){paste0}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){x}<LEND>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](str){free_y}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggAddExtras}<LSEP>[argument 0; litteral](NULL){NULL}<LEND>[statement 3; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){p}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){grid}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){grid is needed for this functi...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){K}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){forecast}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){K}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Expected at least two plots bu...}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){PI}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){PI}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){TRUE}<LSEP>[](symbol){K}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){gridlayout}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){K}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){K}<LEND>[statement 5; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){grid.newpage}<LEND>[statement 6; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){pushViewport}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){viewport}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){grid.layout}<LEND>[argument 0; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){gridlayout}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){gridlayout}<LEND>[statement 7; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){K}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){partialfcast}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){forecast}<LEND>[](symbol){i}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){partialfcast}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){mlmsplit}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){i}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){matchidx}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){gridlayout}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 3; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){autoplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){partialfcast}<LSEP>[argument 1; litteral](str){forecast}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){PI}<LSEP>[](symbol){i}<LEND>[](symbol){...}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggAddExtras}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){forecast}<LEND>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){viewport}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){matchidx}<LSEP>[](symbol){row}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){matchidx}<LSEP>[](symbol){col}<LEND>[assign](){<-}<LSEP>[](symbol){ggtsdisplay}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){plot.type}<LSEP>[](symbol){points}<LSEP>[](symbol){smooth}<LSEP>[](symbol){lag.max}<LSEP>[](symbol){na.action}<LSEP>[](symbol){theme}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){ggplot2 is needed for this fun...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){grid}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){grid is needed for this functi...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){ggtsdisplay is only for univar...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){plot.type}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){plot.type}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){main}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){x}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.ts}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){x}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){lag.max}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lag.max}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){log10}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){3.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){dots}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){...}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dots}<LSEP>[](symbol){xlab}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dots}<LSEP>[](symbol){xlab}<LEND>[litteral](str){}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dots}<LSEP>[](symbol){ylab}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dots}<LSEP>[](symbol){ylab}<LEND>[litteral](str){}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){labs}<LEND>[call](){}<LSEP>[](symbol){match}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){xlab}<LSEP>[argument 1; litteral](str){ylab}<LSEP>[argument 2; litteral](str){main}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){dots}<LEND>[argument 2; litteral](real){0.000000}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){gridlayout}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){3.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 10; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){grid.newpage}<LEND>[statement 11; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){pushViewport}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){viewport}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){grid.layout}<LEND>[argument 0; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){gridlayout}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){gridlayout}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){matchidx}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){gridlayout}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){tsplot}<LEND>[call](){}<LSEP>[](symbol){do.call}<LEND>[argument 0; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){autoplot}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){quote}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dots}<LSEP>[](symbol){labs}<LEND>[statement 14; control flow](){if}<LSEP>[](symbol){points}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tsplot}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){tsplot}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_point}<LEND>[argument 0; litteral](real){0.500000}<LEND>[statement 15; control flow](){if}<LSEP>[](symbol){smooth}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tsplot}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){tsplot}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_smooth}<LEND>[argument 0; litteral](str){loess}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tsplot}<LSEP>[](symbol){labels}<LEND>[](symbol){title}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tsplot}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){tsplot}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggtitle}<LEND>[](symbol){main}<LEND>[statement 17; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){theme}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tsplot}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){tsplot}<LSEP>[](symbol){theme}<LEND>[statement 18; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){tsplot}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){viewport}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){matchidx}<LSEP>[](symbol){row}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){matchidx}<LSEP>[](symbol){col}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){acfplot}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){do.call}<LSEP>[](symbol){ggAcf}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){quote}<LSEP>[](symbol){x}<LEND>[](symbol){lag.max}<LSEP>[](symbol){na.action}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dots}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){labs}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggtitle}<LEND>[argument 0; litteral](NULL){NULL}<LEND>[statement 20; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){theme}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){acfplot}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){acfplot}<LSEP>[](symbol){theme}<LEND>[statement 21; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){plot.type}<LSEP>[argument 1; litteral](str){partial}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lastplot}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggPacf}<LSEP>[](symbol){x}<LSEP>[](symbol){lag.max}<LSEP>[](symbol){na.action}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggtitle}<LEND>[argument 0; litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){acfplotrange}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){layer_scales}<LEND>[](symbol){acfplot}<LEND>[](symbol){y}<LEND>[](symbol){range}<LEND>[](symbol){range}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){pacfplotrange}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){layer_scales}<LEND>[](symbol){lastplot}<LEND>[](symbol){y}<LEND>[](symbol){range}<LEND>[](symbol){range}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){yrange}<LEND>[call](){}<LSEP>[](symbol){range}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){acfplotrange}<LSEP>[](symbol){pacfplotrange}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){acfplot}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){acfplot}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ylim}<LEND>[](symbol){yrange}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){lastplot}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){lastplot}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ylim}<LEND>[](symbol){yrange}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){plot.type}<LSEP>[argument 1; litteral](str){histogram}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lastplot}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){gghistogram}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){xlab}<LEND>[](symbol){main}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){plot.type}<LSEP>[argument 1; litteral](str){scatter}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){scatterData}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lastplot}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){x}<LEND>[](symbol){scatterData}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_point}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){labs}<LEND>[argument 0; call](){}<LSEP>[](symbol){expression}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Y}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){t}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){expression}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Y}<LSEP>[](symbol){t}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){plot.type}<LSEP>[argument 1; litteral](str){spectrum}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){specData}<LEND>[call](){}<LSEP>[](symbol){spec.ar}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){specData}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){specData}<LSEP>[](symbol){spec}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){specData}<LSEP>[](symbol){freq}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){lastplot}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){spectrum}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){frequency}<LEND>[](symbol){specData}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_line}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){scale_y_log10}<LEND>[statement 22; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){theme}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lastplot}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){lastplot}<LSEP>[](symbol){theme}<LEND>[statement 23; assign](){<-}<LSEP>[](symbol){matchidx}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){gridlayout}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 24; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){acfplot}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){viewport}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){matchidx}<LSEP>[](symbol){row}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){matchidx}<LSEP>[](symbol){col}<LEND>[statement 25; assign](){<-}<LSEP>[](symbol){matchidx}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){gridlayout}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 26; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){lastplot}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){viewport}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){matchidx}<LSEP>[](symbol){row}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){matchidx}<LSEP>[](symbol){col}<LEND>[assign](){<-}<LSEP>[](symbol){gglagplot}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){lags}<LSEP>[](symbol){set.lags}<LSEP>[](symbol){diag}<LSEP>[](symbol){diag.col}<LSEP>[](symbol){do.lines}<LSEP>[](symbol){colour}<LSEP>[](symbol){continuous}<LSEP>[](symbol){labels}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){ggplot2 is needed for this fun...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){freq}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){linecol}<LEND>[call](){}<LSEP>[](symbol){cycle}<LSEP>[](symbol){x}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){freq}<LSEP>[argument 1; litteral](real){24.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){continuous}<LSEP>[litteral](logical){TRUE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal}<LSEP>[litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){continuous}<LSEP>[litteral](logical){TRUE}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){seasonal}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){continuous}<LSEP>[litteral](logical){TRUE}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){tmp}<LSEP>[](symbol){lags}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){x}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){x}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[statement 7; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){lagi}<LSEP>[](symbol){set.lags}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){sname}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){x}<LEND>[](symbol){i}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){sname}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){sname}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){match.call}<LEND>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[](symbol){lagi}<LEND>[argument 1; control flow](){if}<LSEP>[](symbol){seasonal}<LEND>[true branch; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){linecol}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){lagi}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){n}<LEND>[false branch; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){lagi}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){n}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){lagi}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){n}<LEND>[](symbol){i}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[](symbol){lagi}<LEND>[](symbol){i}<LEND>[argument 4; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){lagi}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[](symbol){lagi}<LEND>[argument 5; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){sname}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[](symbol){lagi}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){continuous}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){freqcur}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){freqcur}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){lagged}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){orig}<LEND>[](symbol){data}<LEND>[statement 10; control flow](){if}<LSEP>[](symbol){diag}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_abline}<LEND>[](symbol){diag.col}<LSEP>[argument 1; litteral](str){dashed}<LEND>[statement 11; control flow](){if}<LSEP>[](symbol){labels}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){linesize}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.250000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){do.lines}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){linesize}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){do.lines}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){plottype}<LEND>[control flow](){if}<LSEP>[](symbol){do.lines}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_path}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_point}<LEND>[statement 13; control flow](){if}<LSEP>[](symbol){colour}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){plottype}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){freqcur}<LEND>[](symbol){linesize}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){plottype}<LSEP>[](symbol){linesize}<LEND>[statement 14; control flow](){if}<LSEP>[](symbol){labels}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_text}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){lagnum}<LEND>[statement 15; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){set.lags}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){2.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){axissize}<LEND>[call](){}<LSEP>[](symbol){rbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){aggregate}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){orig}<LSEP>[](symbol){series}<LEND>[](symbol){data}<LSEP>[](symbol){min}<LEND>[argument 1; call](){}<LSEP>[](symbol){aggregate}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){orig}<LSEP>[](symbol){series}<LEND>[](symbol){data}<LSEP>[](symbol){max}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){axissize}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){axissize}<LSEP>[](symbol){series}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){set.lags}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){axissize}<LSEP>[](symbol){orig}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){set.lags}<LEND>[argument 2; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){set.lags}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_blank}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){orig}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){orig}<LEND>[](symbol){axissize}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){labellerFn}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){labels}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){labels}<LSEP>[](symbol){series}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){labels}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){labels}<LSEP>[](symbol){series}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){labels}<LSEP>[](symbol){lagVal}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){lag}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){labels}<LSEP>[](symbol){lagVal}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){labels}<LEND>[statement 17; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){series}<LSEP>[](symbol){lagVal}<LEND>[argument 1; litteral](str){free}<LSEP>[](symbol){labellerFn}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){lagVal}<LEND>[](symbol){labellerFn}<LEND>[statement 18; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){theme}<LEND>[argument 0; litteral](real){1.000000}<LEND>[statement 19; control flow](){if}<LSEP>[](symbol){colour}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){seasonal}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){freq}<LSEP>[argument 1; litteral](integer){4}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){title}<LSEP>[litteral](str){Quarter}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){freq}<LSEP>[argument 1; litteral](integer){12}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){title}<LSEP>[litteral](str){Month}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){freq}<LSEP>[argument 1; litteral](integer){7}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){title}<LSEP>[litteral](str){Day}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){freq}<LSEP>[argument 1; litteral](integer){24}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){title}<LSEP>[litteral](str){Hour}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){title}<LSEP>[litteral](str){Season}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){title}<LSEP>[litteral](str){Time}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){continuous}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){guides}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){guide_colourbar}<LEND>[](symbol){title}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){guides}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){guide_legend}<LEND>[](symbol){title}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggAddExtras}<LSEP>[argument 0; litteral](NULL){NULL}<LSEP>[argument 1; litteral](NULL){NULL}<LEND>[statement 21; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){p}<LEND>[assign](){<-}<LSEP>[](symbol){gglagchull}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){lags}<LSEP>[](symbol){set.lags}<LSEP>[](symbol){diag}<LSEP>[](symbol){diag.col}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){ggplot2 is needed for this fun...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tmp}<LSEP>[](symbol){lags}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){x}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[statement 4; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){lag}<LSEP>[](symbol){set.lags}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){sname}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){x}<LEND>[](symbol){i}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){sname}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){sname}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){lag}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){n}<LEND>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[](symbol){lag}<LEND>[](symbol){i}<LEND>[argument 2; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){lag}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[](symbol){lag}<LEND>[argument 3; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){sname}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[](symbol){lag}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grDevices}<LSEP>[](symbol){chull}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){lag}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){n}<LEND>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[](symbol){lag}<LEND>[](symbol){i}<LEND>[](symbol){}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){orig}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){lagged}<LEND>[](symbol){data}<LEND>[statement 6; control flow](){if}<LSEP>[](symbol){diag}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_abline}<LEND>[](symbol){diag.col}<LSEP>[argument 1; litteral](str){dashed}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_polygon}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){lag}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){lag}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){lag}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){set.lags}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){guides}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){guide_colourbar}<LEND>[argument 0; litteral](str){lag}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){theme}<LEND>[argument 0; litteral](real){1.000000}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){series}<LEND>[argument 1; litteral](str){free}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggAddExtras}<LSEP>[argument 0; litteral](str){lagged}<LSEP>[argument 1; litteral](str){original}<LEND>[statement 12; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){p}<LEND>[assign](){<-}<LSEP>[](symbol){ggmonthplot}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){labels}<LSEP>[](symbol){times}<LSEP>[](symbol){phase}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){ggsubseriesplot}<LSEP>[](symbol){x}<LSEP>[](symbol){labels}<LSEP>[](symbol){times}<LSEP>[](symbol){phase}<LSEP>[](symbol){...}<LEND>[assign](){<-}<LSEP>[](symbol){ggsubseriesplot}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){labels}<LSEP>[](symbol){times}<LSEP>[](symbol){phase}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){ggplot2 is needed for this fun...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){ts}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){ggsubseriesplot requires a ts ...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Data are not seasonal}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){1}<LEND>[argument 1; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){dimnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LSEP>[](symbol){phase}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Each season requires at least ...}<LEND>[argument 1; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){%%}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; litteral](str){Your series length may be too ...}<LSEP>[argument 2; litteral](str){This may be caused from specif...}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){trunc}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){x}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){phase}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){seasonwidth}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){year}<LEND>[argument 1; call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){year}<LEND>[argument 1; litteral](real){1.050000}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){time}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){season}<LEND>[argument 1; litteral](real){0.025000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){year}<LEND>[argument 1; call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){year}<LEND>[](symbol){seasonwidth}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){avgLines}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){aggregate}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){season}<LEND>[](symbol){mean}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){avgLines}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){season}<LSEP>[argument 1; litteral](str){avg}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){data}<LSEP>[](symbol){avgLines}<LSEP>[argument 2; litteral](str){season}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){time}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){season}<LEND>[](symbol){data}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){element_blank}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_line}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_line}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){avg}<LEND>[argument 1; litteral](str){#0000AA}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){xfreq}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){labels}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){xfreq}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){labels}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){The number of labels supplied ...}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xbreaks}<LSEP>[](symbol){labels}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){xfreq}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xbreaks}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Q1}<LSEP>[argument 1; litteral](str){Q2}<LSEP>[argument 2; litteral](str){Q3}<LSEP>[argument 3; litteral](str){Q4}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xlab}<LSEP>[litteral](str){Quarter}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){xfreq}<LSEP>[argument 1; litteral](real){7.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xbreaks}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Sunday}<LSEP>[argument 1; litteral](str){Monday}<LSEP>[argument 2; litteral](str){Tuesday}<LSEP>[argument 3; litteral](str){Wednesday}<LSEP>[argument 4; litteral](str){Thursday}<LSEP>[argument 5; litteral](str){Friday}<LSEP>[argument 6; litteral](str){Saturday}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xlab}<LSEP>[litteral](str){Day}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){xfreq}<LSEP>[argument 1; litteral](real){12.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xbreaks}<LSEP>[](symbol){month.abb}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xlab}<LSEP>[litteral](str){Month}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xbreaks}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xlab}<LSEP>[litteral](str){Season}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){scale_x_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){xfreq}<LEND>[](symbol){xbreaks}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggAddExtras}<LEND>[argument 0; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){x}<LEND>[](symbol){xlab}<LEND>[statement 17; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){p}<LEND>[assign](){<-}<LSEP>[](symbol){ggseasonplot}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){season.labels}<LSEP>[](symbol){year.labels}<LSEP>[](symbol){year.labels.left}<LSEP>[](symbol){type}<LSEP>[](symbol){col}<LSEP>[](symbol){continuous}<LSEP>[](symbol){polar}<LSEP>[](symbol){labelgap}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){ggplot2 is needed for this fun...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){ts}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){autoplot.seasonplot requires a...}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){type}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){message}<LSEP>[argument 0; litteral](str){Plot types are not yet support...}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){s}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Data are not seasonal}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){xname}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){x}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){s}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){trunc}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){8.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){cycle}<LSEP>[](symbol){x}<LEND>[argument 3; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){cycle}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){s}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){year}<LEND>[control flow](){if}<LSEP>[](symbol){continuous}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){year}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){year}<LEND>[statement 10; control flow](){if}<LSEP>[](symbol){polar}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){startValues}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){cycle}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){cycle}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){startValues}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){startValues}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[](symbol){}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){startValues}<LSEP>[](symbol){time}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){.Machine}<LSEP>[](symbol){double.eps}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){startValues}<LSEP>[](symbol){year}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){startValues}<LSEP>[](symbol){year}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){data}<LSEP>[](symbol){startValues}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){time}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){year}<LEND>[argument 3; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){year}<LEND>[](symbol){data}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_line}<LEND>[statement 13; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){col}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.numeric}<LSEP>[](symbol){col}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){col}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){palette}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){%%}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){col}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){palette}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){continuous}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){scale_color_gradientn}<LEND>[](symbol){col}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ncol}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){year}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){col}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){scale_color_manual}<LEND>[argument 0; litteral](str){none}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){col}<LSEP>[](symbol){ncol}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){scale_color_manual}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){col}<LEND>[argument 1; call](){}<LSEP>[](symbol){ceiling}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){ncol}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){col}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){ncol}<LEND>[statement 14; control flow](){if}<LSEP>[](symbol){year.labels}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){yrlab}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){aggregate}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){time}<LSEP>[](symbol){year}<LEND>[](symbol){data}<LSEP>[](symbol){max}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){yrlab}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){yrlab}<LSEP>[](symbol){labelgap}<LEND>[statement 15; control flow](){if}<LSEP>[](symbol){year.labels.left}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){yrlabL}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){aggregate}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){time}<LSEP>[](symbol){year}<LEND>[](symbol){data}<LSEP>[](symbol){min}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){yrlabL}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){yrlabL}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){labelgap}<LEND>[statement 2; control flow](){if}<LSEP>[](symbol){year.labels}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){yrlab}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){yrlab}<LSEP>[](symbol){yrlabL}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LSEP>[](symbol){year.labels}<LSEP>[](symbol){year.labels.left}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){yrlab}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){yrlab}<LSEP>[](symbol){data}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){yrlab}<LSEP>[](symbol){time}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){yrlab}<LSEP>[](symbol){time}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){yrlab}<LSEP>[](symbol){offset}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){guides}<LEND>[argument 0; litteral](str){none}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_text}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){time}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){year}<LEND>[](symbol){yrlab}<LEND>[statement 17; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){12.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){labs}<LSEP>[](symbol){month.abb}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xLab}<LSEP>[litteral](str){Month}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){labs}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Q}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 2; litteral](str){}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xLab}<LSEP>[litteral](str){Quarter}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){7.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){labs}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Sun}<LSEP>[argument 1; litteral](str){Mon}<LSEP>[argument 2; litteral](str){Tue}<LSEP>[argument 3; litteral](str){Wed}<LSEP>[argument 4; litteral](str){Thu}<LSEP>[argument 5; litteral](str){Fri}<LSEP>[argument 6; litteral](str){Sat}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xLab}<LSEP>[litteral](str){Day}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){52.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){labs}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){s}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xLab}<LSEP>[litteral](str){Week}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){24.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){labs}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xLab}<LSEP>[litteral](str){Hour}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){48.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){labs}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){23.500000}<LSEP>[argument 2; litteral](real){0.500000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xLab}<LSEP>[litteral](str){Half-hour}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){labs}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){s}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xLab}<LSEP>[litteral](str){Season}<LEND>[statement 18; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){season.labels}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){season.labels}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){labs}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){Provided season.labels have le...}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){season.labels}<LEND>[argument 2; litteral](str){, but }<LEND>[argument 3; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){labs}<LEND>[argument 4; litteral](str){ are required. Ignoring season...}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){labs}<LSEP>[](symbol){season.labels}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){breaks}<LEND>[call](){}<LSEP>[](symbol){sort}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){time}<LEND>[statement 20; control flow](){if}<LSEP>[](symbol){polar}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){breaks}<LEND>[call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){breaks}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){coord_polar}<LEND>[statement 21; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){scale_x_continuous}<LEND>[](symbol){breaks}<LSEP>[argument 1; litteral](NULL){NULL}<LSEP>[](symbol){labs}<LEND>[statement 22; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggAddExtras}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Seasonal plot:}<LSEP>[](symbol){xname}<LEND>[](symbol){xLab}<LSEP>[argument 2; litteral](NULL){NULL}<LEND>[statement 23; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){p}<LEND>[assign](){<-}<LSEP>[](symbol){autoplot.splineforecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){PI}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){ggplot2 is needed for this fun...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){autoplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){autolayer}<LSEP>[](symbol){object}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_point}<LEND>[argument 0; litteral](real){2.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_line}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](str){red}<LSEP>[](symbol){fit}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggAddExtras}<LEND>[argument 0; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){call}<LEND>[](symbol){x}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ylab}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){p}<LEND>[assign](){<-}<LSEP>[](symbol){autoplot.stl}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){labels}<LSEP>[](symbol){range.bars}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){ggplot2 is needed for this fun...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](str){stl}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){autoplot.stl requires a stl ob...}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){time.series}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){time.series}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){trend}<LSEP>[argument 1; litteral](str){seasonal}<LSEP>[argument 2; litteral](str){remainder}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){labels}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){labels}<LEND>[call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){time.series}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){time.series}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){cn}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){data}<LSEP>[](symbol){labels}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){data}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){rowSums}<LSEP>[](symbol){data}<LEND>[](symbol){data}<LEND>[argument 2; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){cn}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){data}<LEND>[](symbol){cn}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[](symbol){data}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_line}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){parts}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){cn}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 2; litteral](logical){TRUE}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_segment}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){datetime}<LEND>[argument 2; litteral](real){0.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){parts}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){cn}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 2; litteral](str){butt}<LEND>[statement 9; control flow](){if}<LSEP>[](symbol){range.bars}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){yranges}<LEND>[call](){}<LSEP>[](symbol){vapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){split}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){parts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){range}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 2; call](){}<LSEP>[](symbol){numeric}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xranges}<LEND>[call](){}<LSEP>[](symbol){range}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){datetime}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){barmid}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){yranges}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){mean}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){barlength}<LEND>[call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){yranges}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){diff}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){barwidth}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){64.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){xranges}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){barpos}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xranges}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){barwidth}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xranges}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){barwidth}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){barmid}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){barlength}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){barmid}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){barlength}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){yranges}<LEND>[](symbol){cn}<LEND>[argument 5; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xranges}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){barmid}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_rect}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){left}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){right}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){top}<LEND>[argument 3; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){bottom}<LEND>[](symbol){barpos}<LSEP>[argument 2; litteral](str){gray75}<LSEP>[argument 3; litteral](str){black}<LEND>[argument 4; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){facet_grid}<LEND>[argument 0; litteral](str){parts ~ .}<LSEP>[argument 1; litteral](str){free_y}<LSEP>[argument 2; litteral](str){y}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_hline}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){cn}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[](symbol){cn}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggAddExtras}<LSEP>[argument 0; litteral](str){Time}<LSEP>[argument 1; litteral](str){}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){scale_x_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){pretty}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){datetime}<LEND>[statement 14; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){p}<LEND>[assign](){<-}<LSEP>[](symbol){autoplot.StructTS}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){labels}<LSEP>[](symbol){range.bars}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){ggplot2 is needed for this fun...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](str){StructTS}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){autoplot.StructTS requires a S...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){labels}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){labels}<LEND>[call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){cn}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){data}<LSEP>[](symbol){labels}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){data}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){data}<LEND>[](symbol){data}<LEND>[argument 2; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){cn}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){data}<LEND>[](symbol){cn}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[](symbol){data}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_line}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){facet_grid}<LEND>[argument 0; litteral](str){parts ~ .}<LSEP>[argument 1; litteral](str){free_y}<LSEP>[argument 2; litteral](str){y}<LEND>[statement 8; control flow](){if}<LSEP>[](symbol){range.bars}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){yranges}<LEND>[call](){}<LSEP>[](symbol){vapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){split}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){parts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){range}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 2; call](){}<LSEP>[](symbol){numeric}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xranges}<LEND>[call](){}<LSEP>[](symbol){range}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){datetime}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){barmid}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){yranges}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){mean}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){barlength}<LEND>[call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){yranges}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){diff}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){barwidth}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){64.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){xranges}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){barpos}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xranges}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){barwidth}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xranges}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){barwidth}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){barmid}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){barlength}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){barmid}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){barlength}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){yranges}<LEND>[](symbol){cn}<LEND>[argument 5; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xranges}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){barmid}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_rect}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){left}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){right}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){top}<LEND>[argument 3; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){bottom}<LEND>[](symbol){barpos}<LSEP>[argument 2; litteral](str){gray75}<LSEP>[argument 3; litteral](str){black}<LEND>[argument 4; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggAddExtras}<LSEP>[argument 0; litteral](str){Time}<LSEP>[argument 1; litteral](str){}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){scale_x_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){pretty}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){datetime}<LEND>[statement 11; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){p}<LEND>[assign](){<-}<LSEP>[](symbol){autoplot.seas}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){labels}<LSEP>[](symbol){range.bars}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){ggplot2 is needed for this fun...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](str){seas}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){autoplot.seas requires a seas ...}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){labels}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){seasonal}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){data}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){labels}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){trend}<LSEP>[argument 1; litteral](str){seasonal}<LSEP>[argument 2; litteral](str){irregular}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){labels}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){trend}<LSEP>[argument 1; litteral](str){irregular}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){data}<LEND>[](symbol){}<LSEP>[](symbol){labels}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){data}<LEND>[assign](){<-}<LSEP>[](symbol){cn}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){data}<LSEP>[](symbol){labels}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){data}<LEND>[argument 2; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){cn}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){data}<LEND>[](symbol){cn}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){data}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){sum_first_year}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){seq}<LSEP>[](symbol){freq}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){sum_first_year}<LSEP>[argument 1; litteral](str){try-error}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){int}<LEND>[call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){sum_first_year}<LSEP>[argument 1; litteral](real){0.500000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){int}<LSEP>[litteral](real){0.000000}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[](symbol){data}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_line}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){parts}<LEND>[argument 1; call](){}<LSEP>[](symbol){tail}<LSEP>[](symbol){cn}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](logical){TRUE}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_segment}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){datetime}<LEND>[](symbol){int}<LEND>[argument 3; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){parts}<LEND>[argument 1; call](){}<LSEP>[](symbol){tail}<LSEP>[](symbol){cn}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](str){butt}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){facet_grid}<LEND>[argument 0; litteral](str){parts ~ .}<LSEP>[argument 1; litteral](str){free_y}<LSEP>[argument 2; litteral](str){y}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_hline}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){int}<LEND>[argument 1; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){tail}<LSEP>[](symbol){cn}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){cn}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){range.bars}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){range.bars}<LEND>[call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){spc}<LEND>[](symbol){transform}<LEND>[](symbol){function}<LEND>[argument 1; litteral](str){none}<LEND>[statement 15; control flow](){if}<LSEP>[](symbol){range.bars}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){yranges}<LEND>[call](){}<LSEP>[](symbol){vapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){split}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){parts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){range}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 2; call](){}<LSEP>[](symbol){numeric}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xranges}<LEND>[call](){}<LSEP>[](symbol){range}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){datetime}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){barmid}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){yranges}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){mean}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){barlength}<LEND>[call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){yranges}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){diff}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){barwidth}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){64.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){xranges}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){barpos}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xranges}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){barwidth}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xranges}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){barwidth}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){barmid}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){barlength}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){barmid}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){barlength}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){yranges}<LEND>[](symbol){cn}<LEND>[argument 5; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xranges}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){barmid}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_rect}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){left}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){right}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){top}<LEND>[argument 3; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){bottom}<LEND>[](symbol){barpos}<LSEP>[argument 2; litteral](str){gray75}<LSEP>[argument 3; litteral](str){black}<LEND>[argument 4; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggAddExtras}<LSEP>[argument 0; litteral](str){Time}<LSEP>[argument 1; litteral](str){}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){scale_x_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){pretty}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){datetime}<LEND>[statement 18; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){p}<LEND>[assign](){<-}<LSEP>[](symbol){autolayer.mts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){colour}<LSEP>[](symbol){series}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){ggplot2 is needed for this fun...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){cl}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){cl}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){quote}<LSEP>[](symbol){autolayer}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){cl}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){quote}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){object}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){series}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){colour}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){message}<LSEP>[argument 0; litteral](str){For a multivariate time series...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){object}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[statement 5; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){object}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){cl}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){series}<LSEP>[](symbol){i}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){out}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){eval}<LSEP>[](symbol){cl}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){out}<LEND>[assign](){<-}<LSEP>[](symbol){autolayer.msts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){object}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){mts}<LSEP>[argument 1; litteral](str){ts}<LSEP>[argument 2; litteral](str){matrix}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){series}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){series}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){ts}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](str){msts}<LEND>[litteral](NULL){NULL}<LEND>[statement 2; call](){}<LSEP>[](symbol){autolayer}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LSEP>[](symbol){...}<LEND>[assign](){<-}<LSEP>[](symbol){autolayer.ts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){colour}<LSEP>[](symbol){series}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){ggplot2 is needed for this fun...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tsdata}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){series}<LEND>[argument 1; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){object}<LEND>[](symbol){series}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){object}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){colour}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_line}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){timeVal}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){seriesVal}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){series}<LEND>[argument 3; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){series}<LEND>[](symbol){tsdata}<LSEP>[](symbol){...}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_line}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){timeVal}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){seriesVal}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){series}<LEND>[](symbol){tsdata}<LSEP>[](symbol){...}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){autolayer.forecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LSEP>[](symbol){PI}<LSEP>[](symbol){showgap}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){PI}<LEND>[call](){}<LSEP>[](symbol){&}<LSEP>[](symbol){PI}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){level}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){forecast2plotdf}<LSEP>[](symbol){object}<LSEP>[](symbol){PI}<LSEP>[](symbol){showgap}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){mapping}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){data}<LSEP>[argument 1; litteral](str){series}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){series}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){data}<LSEP>[argument 1; litteral](str){series}<LEND>[](symbol){series}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){mapping}<LSEP>[](symbol){colour}<LEND>[call](){}<LSEP>[](symbol){quote}<LSEP>[](symbol){series}<LEND>[statement 5; control flow](){if}<LSEP>[](symbol){PI}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){mapping}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){quote}<LSEP>[](symbol){level}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){mapping}<LSEP>[](symbol){ymin}<LEND>[call](){}<LSEP>[](symbol){quote}<LSEP>[](symbol){ymin}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){mapping}<LSEP>[](symbol){ymax}<LEND>[call](){}<LSEP>[](symbol){quote}<LSEP>[](symbol){ymax}<LEND>[statement 6; call](){}<LSEP>[](symbol){geom_forecast}<LSEP>[](symbol){mapping}<LSEP>[](symbol){data}<LSEP>[argument 2; litteral](str){identity}<LSEP>[](symbol){...}<LSEP>[argument 4; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){autolayer.mforecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LSEP>[](symbol){PI}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){cl}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){cl}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){quote}<LSEP>[](symbol){autolayer}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){cl}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){quote}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){forecast}<LEND>[](symbol){i}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){series}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){series}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){forecast}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){forecast}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[statement 5; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){forecast}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){cl}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){series}<LSEP>[](symbol){i}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){out}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){eval}<LSEP>[](symbol){cl}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){out}<LEND>[assign](){<-}<LSEP>[](symbol){autoplot.ts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){main}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){ggplot2 is needed for this fun...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.ts}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){autoplot.ts requires a ts obje...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){object}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){series}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){transform}<LSEP>[](symbol){data}<LSEP>[](symbol){series}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){x}<LEND>[](symbol){data}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){series}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_line}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){series}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){series}<LEND>[argument 1; litteral](logical){TRUE}<LSEP>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_line}<LEND>[argument 0; litteral](logical){TRUE}<LSEP>[](symbol){...}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggAddExtras}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){main}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){scale_x_continuous}<LEND>[](symbol){ggtsbreaks}<LEND>[statement 7; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){p}<LEND>[assign](){<-}<LSEP>[](symbol){autoplot.mts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){colour}<LSEP>[](symbol){facets}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){main}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){ggplot2 is needed for this fun...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){is.mts}<LEND>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){autoplot.mts requires a mts ob...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){object}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){autoplot.ts}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){cn}<LEND>[call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){object}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){cn}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){cn}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Series}<LEND>[argument 1; call](){}<LSEP>[](symbol){seq_len}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){object}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){object}<LEND>[argument 2; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){cn}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){object}<LEND>[](symbol){cn}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){mapping}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){x}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){series}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LSEP>[](symbol){colour}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){facets}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){colour}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){mapping}<LSEP>[](symbol){colour}<LEND>[call](){}<LSEP>[](symbol){quote}<LSEP>[](symbol){series}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggplot}<LEND>[](symbol){mapping}<LSEP>[](symbol){data}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_line}<LEND>[argument 0; litteral](logical){TRUE}<LSEP>[](symbol){...}<LEND>[statement 9; control flow](){if}<LSEP>[](symbol){facets}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){facet_grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){series}<LSEP>[](symbol){.}<LEND>[argument 1; litteral](str){free_y}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggAddExtras}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){main}<LEND>[statement 11; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){p}<LEND>[assign](){<-}<LSEP>[](symbol){autoplot.msts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){sname}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){object}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){object}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){mts}<LSEP>[argument 1; litteral](str){ts}<LSEP>[argument 2; litteral](str){matrix}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){ts}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](str){msts}<LEND>[litteral](NULL){NULL}<LEND>[statement 3; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){autoplot}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggAddExtras}<LSEP>[](symbol){sname}<LEND>[assign](){<-}<LSEP>[](symbol){fortify.ts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){model}<LSEP>[](symbol){data}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){exists}<LSEP>[argument 0; litteral](str){ggfreqplot}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tsp}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){model}<LSEP>[argument 1; litteral](str){tsp}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){dtindex}<LEND>[call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){model}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){4.000000}<LSEP>[argument 1; litteral](real){12.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){dtindex}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){zoo}<LSEP>[](symbol){as.Date.yearmon}<LEND>[](symbol){dtindex}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){dtindex}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){model}<LEND>[statement 4; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){fortify}<LEND>[](symbol){model}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){model}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){model}<LEND>[statement 1; call](){}<LSEP>[](symbol){as.data.frame}<LSEP>[](symbol){model}<LEND>[assign](){<-}<LSEP>[](symbol){forecast2plotdf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){model}<LSEP>[](symbol){data}<LSEP>[](symbol){PI}<LSEP>[](symbol){showgap}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){ts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){mean}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xVals}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){mean}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){model}<LSEP>[argument 1; litteral](str){newdata}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xVals}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){model}<LSEP>[argument 1; litteral](str){newdata}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){model}<LSEP>[argument 1; litteral](str){newdata}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){message}<LSEP>[argument 0; litteral](str){Note: only extracting first co...}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Could not find forecast x axis}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){Hiloc}<LEND>[call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){Hi }<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){data}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){Loloc}<LEND>[call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){Lo }<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){data}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LSEP>[](symbol){PI}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){level}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){Hiloc}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){Loloc}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){Hiloc}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){xVals}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){Hiloc}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){Hiloc}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){Hi }<LSEP>[argument 1; litteral](str){}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){data}<LEND>[](symbol){Hiloc}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){data}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){unlist}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[](symbol){Hiloc}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){data}<LEND>[argument 4; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){unlist}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[](symbol){Loloc}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){data}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){numInterval}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){level}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){missing intervals detected, pl...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){PI}<LSEP>[litteral](logical){FALSE}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){PI}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){xVals}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){mean}<LEND>[argument 2; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){mean}<LEND>[argument 3; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){mean}<LEND>[argument 4; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){mean}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){numInterval}<LSEP>[litteral](real){0.000000}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){showgap}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Removing the gap requires hist...}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){intervalGap}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){numInterval}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){numInterval}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){level}<LEND>[argument 1; call](){}<LSEP>[](symbol){seq_along}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){numInterval}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){x}<LEND>[](symbol){numInterval}<LEND>[argument 4; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){x}<LEND>[](symbol){numInterval}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){intervalGap}<LSEP>[](symbol){out}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){out}<LEND>[assign](){<-}<LSEP>[](symbol){StatForecast}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggproto}<LEND>[argument 0; litteral](str){StatForecast}<LEND>[argument 1; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){Stat}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){x}<LSEP>[argument 1; litteral](str){y}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){data}<LSEP>[](symbol){scales}<LSEP>[](symbol){params}<LSEP>[](symbol){PI}<LSEP>[](symbol){showgap}<LSEP>[](symbol){series}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){robust}<LSEP>[](symbol){lambda}<LSEP>[](symbol){find.frequency}<LSEP>[](symbol){allow.multiplicative.trend}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){recoverTSP}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){x}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){h}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){h}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; litteral](real){10.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){tsdat}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){tsdat}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){robust}<LSEP>[](symbol){lambda}<LSEP>[](symbol){find.frequency}<LSEP>[](symbol){allow.multiplicative.trend}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecast2plotdf}<LSEP>[](symbol){fcast}<LSEP>[](symbol){PI}<LSEP>[](symbol){showgap}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){extraInfo}<LEND>[call](){}<LSEP>[](symbol){as.list}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){fcast}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){extraInfo}<LSEP>[](symbol){_data}<LEND>[call](){}<LSEP>[](symbol){quote}<LSEP>[](symbol){fcast}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){series}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){group}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){series}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){message}<LSEP>[argument 0; litteral](str){Recycling series argument, ple...}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){extraInfo}<LSEP>[argument 1; litteral](str){series}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){series}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){%%}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){group}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){series}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 8; call](){}<LSEP>[](symbol){do.call}<LSEP>[argument 0; litteral](str){transform}<LSEP>[](symbol){extraInfo}<LEND>[assign](){<-}<LSEP>[](symbol){GeomForecast}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggproto}<LEND>[argument 0; litteral](str){GeomForecast}<LEND>[argument 1; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){Geom}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){x}<LSEP>[argument 1; litteral](str){y}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){ymin}<LSEP>[argument 1; litteral](str){ymax}<LSEP>[argument 2; litteral](str){level}<LEND>[argument 4; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes}<LEND>[argument 0; litteral](str){blue}<LSEP>[argument 1; litteral](str){grey60}<LSEP>[argument 2; litteral](real){0.500000}<LSEP>[argument 3; litteral](real){1.000000}<LSEP>[argument 4; litteral](real){1.000000}<LSEP>[argument 5; litteral](real){1.000000}<LSEP>[argument 6; litteral](logical){NA}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){data}<LSEP>[](symbol){params}<LSEP>[](symbol){size}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lwd}<LEND>[call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){size}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){size}<LEND>[argument 1; litteral](real){4.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){linecol}<LEND>[call](){}<LSEP>[](symbol){blendHex}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){col}<LEND>[argument 1; litteral](str){gray30}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fillcol}<LEND>[call](){}<LSEP>[](symbol){blendHex}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){col}<LEND>[argument 1; litteral](str){#CCCCCC}<LSEP>[argument 2; litteral](real){0.800000}<LEND>[statement 3; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){grobTree}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){rectGrob}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){unit}<LEND>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](str){npc}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){unit}<LEND>[](symbol){lwd}<LSEP>[argument 1; litteral](str){mm}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){unit}<LEND>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](str){npc}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){unit}<LEND>[](symbol){lwd}<LSEP>[argument 1; litteral](str){mm}<LEND>[argument 2; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){gpar}<LEND>[](symbol){fillcol}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){scales}<LSEP>[](symbol){alpha}<LEND>[](symbol){fillcol}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){alpha}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){linetype}<LEND>[argument 3; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){lwd}<LEND>[argument 1; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){.pt}<LEND>[argument 4; litteral](str){mitre}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){linesGrob}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.400000}<LSEP>[argument 2; litteral](real){0.600000}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.200000}<LSEP>[argument 1; litteral](real){0.600000}<LSEP>[argument 2; litteral](real){0.400000}<LSEP>[argument 3; litteral](real){0.900000}<LEND>[argument 2; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){gpar}<LEND>[](symbol){linecol}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){scales}<LSEP>[](symbol){alpha}<LEND>[](symbol){linecol}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){alpha}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){linetype}<LEND>[argument 3; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){lwd}<LEND>[argument 1; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){.pt}<LEND>[argument 4; litteral](str){mitre}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){self}<LSEP>[](symbol){data}<LSEP>[](symbol){params}<LEND>[body; block](){}<LSEP>[](symbol){data}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){data}<LSEP>[](symbol){panel_scales}<LSEP>[](symbol){coord}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){data}<LEND>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){level}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){split}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){level}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){data}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){data}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){:::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggname}<LEND>[argument 0; litteral](str){geom_forecast}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){GeomForecastPoint}<LSEP>[](symbol){draw_panel}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){data}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){panel_scales}<LSEP>[](symbol){coord}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){:::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggname}<LEND>[argument 0; litteral](str){geom_forecast}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){addGrob}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){GeomForecastInterval}<LSEP>[](symbol){draw_group}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){data}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){panel_scales}<LSEP>[](symbol){coord}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){GeomForecastPoint}<LSEP>[](symbol){draw_panel}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){data}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){panel_scales}<LSEP>[](symbol){coord}<LEND>[assign](){<-}<LSEP>[](symbol){GeomForecastPoint}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggproto}<LEND>[argument 0; litteral](str){GeomForecastPoint}<LSEP>[](symbol){GeomForecast}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){x}<LSEP>[argument 1; litteral](str){y}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){data}<LSEP>[](symbol){params}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){y}<LEND>[](symbol){}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){data}<LSEP>[](symbol){panel_scales}<LSEP>[](symbol){coord}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){linecol}<LEND>[call](){}<LSEP>[](symbol){blendHex}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){colour}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){gray30}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grDevices}<LSEP>[](symbol){col2rgb}<LEND>[](symbol){linecol}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 1; litteral](real){4.000000}<LSEP>[](symbol){}<LEND>[argument 1; litteral](real){255.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){alpha}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){data}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){GeomBlank}<LEND>[](symbol){draw_panel}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){data}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){GeomForecastPointGeom}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){GeomPoint}<LEND>[](symbol){draw_panel}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){pointpred}<LEND>[call](){}<LSEP>[](symbol){transform}<LSEP>[](symbol){data}<LSEP>[argument 1; litteral](logical){NA}<LSEP>[](symbol){linecol}<LSEP>[argument 3; litteral](real){1.000000}<LSEP>[argument 4; litteral](real){19.000000}<LSEP>[argument 5; litteral](real){0.500000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){GeomForecastPointGeom}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){GeomLine}<LEND>[](symbol){draw_panel}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){pointpred}<LEND>[call](){}<LSEP>[](symbol){transform}<LSEP>[](symbol){data}<LSEP>[argument 1; litteral](logical){NA}<LSEP>[](symbol){linecol}<LEND>[statement 3; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){:::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggname}<LEND>[argument 0; litteral](str){geom_forecast_point}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){grobTree}<LEND>[argument 0; call](){}<LSEP>[](symbol){GeomForecastPointGeom}<LSEP>[](symbol){pointpred}<LSEP>[](symbol){panel_scales}<LSEP>[](symbol){coord}<LEND>[assign](){<-}<LSEP>[](symbol){blendHex}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){mixcol}<LSEP>[](symbol){seqcol}<LSEP>[](symbol){alpha}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){methods}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){seqcol}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){mixcol}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){seqcol}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grDevices}<LSEP>[](symbol){col2rgb}<LEND>[](symbol){seqcol}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){mixcol}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grDevices}<LSEP>[](symbol){col2rgb}<LEND>[](symbol){mixcol}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){seqcolHLS}<LEND>[call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){methods}<LSEP>[](symbol){coerce}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){colorspace}<LSEP>[](symbol){RGB}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seqcol}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){}<LEND>[argument 1; litteral](real){255.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seqcol}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){}<LEND>[argument 1; litteral](real){255.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seqcol}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[](symbol){}<LEND>[argument 1; litteral](real){255.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){structure}<LSEP>[argument 0; litteral](NULL){NULL}<LSEP>[argument 1; litteral](str){HLS}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){mixcolHLS}<LEND>[call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){methods}<LSEP>[](symbol){coerce}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){colorspace}<LSEP>[](symbol){RGB}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mixcol}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){}<LEND>[argument 1; litteral](real){255.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mixcol}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){}<LEND>[argument 1; litteral](real){255.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mixcol}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[](symbol){}<LEND>[argument 1; litteral](real){255.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){structure}<LSEP>[argument 0; litteral](NULL){NULL}<LSEP>[argument 1; litteral](str){HLS}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){@}<LSEP>[](symbol){mixcolHLS}<LSEP>[](symbol){coords}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){L}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){@}<LSEP>[](symbol){seqcolHLS}<LSEP>[](symbol){coords}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){L}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){@}<LSEP>[](symbol){mixcolHLS}<LSEP>[](symbol){coords}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){S}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){@}<LSEP>[](symbol){mixcolHLS}<LSEP>[](symbol){coords}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){S}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){@}<LSEP>[](symbol){seqcolHLS}<LSEP>[](symbol){coords}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){S}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){mixcolHex}<LEND>[call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){methods}<LSEP>[](symbol){coerce}<LEND>[](symbol){mixcolHLS}<LEND>[argument 1; call](){}<LSEP>[](symbol){structure}<LSEP>[argument 0; litteral](NULL){NULL}<LSEP>[argument 1; litteral](str){RGB}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){mixcolHex}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){colorspace}<LSEP>[](symbol){hex}<LEND>[](symbol){mixcolHex}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){mixcolHex}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){alpha}<LEND>[](symbol){mixcolHex}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mixcol}<LSEP>[argument 1; litteral](real){4.000000}<LSEP>[](symbol){}<LEND>[argument 1; litteral](real){255.000000}<LEND>[statement 11; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){mixcolHex}<LEND>[assign](){<-}<LSEP>[](symbol){GeomForecastInterval}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggproto}<LEND>[argument 0; litteral](str){GeomForecastInterval}<LSEP>[](symbol){GeomForecast}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){x}<LSEP>[argument 1; litteral](str){ymin}<LSEP>[argument 2; litteral](str){ymax}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){data}<LSEP>[](symbol){params}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){y}<LEND>[](symbol){}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){data}<LSEP>[](symbol){panel_scales}<LSEP>[](symbol){coord}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){level}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){leveldiff}<LEND>[call](){}<LSEP>[](symbol){diff}<LEND>[argument 0; call](){}<LSEP>[](symbol){range}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){level}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){leveldiff}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){leveldiff}<LSEP>[litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){shadeVal}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){level}<LEND>[argument 1; call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){level}<LEND>[](symbol){leveldiff}<LEND>[argument 1; litteral](real){0.200000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){8.000000}<LSEP>[argument 1; litteral](real){15.000000}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){rgb}<LSEP>[](symbol){shadeVal}<LSEP>[](symbol){shadeVal}<LSEP>[](symbol){shadeVal}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){intervalGrobList}<LEND>[call](){}<LSEP>[](symbol){lapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){split}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){level}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fillcol}<LEND>[call](){}<LSEP>[](symbol){blendHex}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){colour}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](real){0.700000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grDevices}<LSEP>[](symbol){col2rgb}<LEND>[](symbol){fillcol}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 1; litteral](real){4.000000}<LSEP>[](symbol){}<LEND>[argument 1; litteral](real){255.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){alpha}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){GeomBlank}<LEND>[](symbol){draw_panel}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){GeomForecastIntervalGeom}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){GeomLinerange}<LEND>[](symbol){draw_panel}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){transform}<LSEP>[](symbol){x}<LSEP>[](symbol){fillcol}<LSEP>[argument 2; litteral](logical){NA}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){GeomForecastIntervalGeom}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){GeomRibbon}<LEND>[](symbol){draw_group}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){transform}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){NA}<LSEP>[](symbol){fillcol}<LEND>[statement 3; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){GeomForecastIntervalGeom}<LSEP>[](symbol){x}<LSEP>[](symbol){panel_scales}<LSEP>[](symbol){coord}<LEND>[statement 2; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){:::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggname}<LEND>[argument 0; litteral](str){geom_forecast_interval}<LEND>[argument 1; call](){}<LSEP>[](symbol){do.call}<LEND>[argument 0; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grid}<LSEP>[](symbol){grobTree}<LEND>[argument 1; call](){}<LSEP>[](symbol){rev}<LSEP>[](symbol){intervalGrobList}<LEND>[assign](){<-}<LSEP>[](symbol){geom_forecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){mapping}<LSEP>[](symbol){data}<LSEP>[](symbol){stat}<LSEP>[](symbol){position}<LSEP>[](symbol){na.rm}<LSEP>[](symbol){show.legend}<LSEP>[](symbol){inherit.aes}<LSEP>[](symbol){PI}<LSEP>[](symbol){showgap}<LSEP>[](symbol){series}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.forecast}<LSEP>[](symbol){mapping}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.mforecast}<LSEP>[](symbol){mapping}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Use autolayer instead of geom_...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){cl}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){cl}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){quote}<LSEP>[](symbol){autolayer}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){cl}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){cl}<LEND>[argument 1; litteral](str){mapping}<LEND>[litteral](str){object}<LEND>[statement 4; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){eval.parent}<LSEP>[](symbol){cl}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.ts}<LSEP>[](symbol){mapping}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){mapping}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){mapping}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){mapping}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){x}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){stat}<LSEP>[argument 1; litteral](str){forecast}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){paramlist}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){na.rm}<LSEP>[](symbol){PI}<LSEP>[](symbol){showgap}<LSEP>[](symbol){series}<LSEP>[](symbol){...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){series}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){mapping}<LSEP>[argument 1; litteral](str){uneval}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){mapping}<LSEP>[](symbol){colour}<LEND>[call](){}<LSEP>[](symbol){quote}<LSEP>[](symbol){..series..}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){mapping}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes_}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){..series..}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){paramlist}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){na.rm}<LSEP>[](symbol){...}<LEND>[statement 3; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){layer}<LEND>[](symbol){GeomForecast}<LSEP>[](symbol){mapping}<LSEP>[](symbol){data}<LSEP>[](symbol){stat}<LSEP>[](symbol){position}<LSEP>[](symbol){show.legend}<LSEP>[](symbol){inherit.aes}<LSEP>[](symbol){paramlist}<LEND>[assign](){<-}<LSEP>[](symbol){gghistogram}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){add.normal}<LSEP>[](symbol){add.kde}<LSEP>[](symbol){add.rug}<LSEP>[](symbol){bins}<LSEP>[](symbol){boundary}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){ggplot2 is needed for this fun...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){bins}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bins}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[argument 0; litteral](real){500.000000}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){grDevices}<LSEP>[](symbol){nclass.FD}<LEND>[argument 0; call](){}<LSEP>[](symbol){na.exclude}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){binwidth}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 1; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[](symbol){bins}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){ggplot}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_histogram}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes}<LEND>[](symbol){x}<LEND>[](symbol){data}<LSEP>[](symbol){binwidth}<LSEP>[](symbol){boundary}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){xlab}<LEND>[argument 0; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){x}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LSEP>[](symbol){add.normal}<LSEP>[](symbol){add.kde}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xmin}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xmax}<LEND>[call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 2; control flow](){if}<LSEP>[](symbol){add.kde}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){h}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){bw.SJ}<LEND>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xmin}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){xmin}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[](symbol){h}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){xmax}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){xmax}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[](symbol){h}<LEND>[statement 3; control flow](){if}<LSEP>[](symbol){add.normal}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xmean}<LEND>[call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xsd}<LEND>[call](){}<LSEP>[](symbol){sd}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){xmin}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){xmin}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){xmean}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[](symbol){xsd}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){xmax}<LEND>[call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){xmax}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){xmean}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[](symbol){xsd}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){xgrid}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[](symbol){xmin}<LSEP>[](symbol){xmax}<LSEP>[argument 2; litteral](real){512.000000}<LEND>[statement 5; control flow](){if}<LSEP>[](symbol){add.normal}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){df}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){xgrid}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[](symbol){binwidth}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){dnorm}<LEND>[](symbol){xgrid}<LSEP>[](symbol){xmean}<LSEP>[](symbol){xsd}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_line}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){df}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){df}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](str){#ff8a62}<LEND>[statement 6; control flow](){if}<LSEP>[](symbol){add.kde}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){kde}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){density}<LEND>[](symbol){x}<LSEP>[](symbol){h}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xgrid}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xgrid}<LSEP>[argument 1; litteral](real){512.000000}<LEND>[argument 4; litteral](real){512.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_line}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){kde}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[](symbol){binwidth}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){kde}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](str){#67a9ff}<LEND>[statement 5; control flow](){if}<LSEP>[](symbol){add.rug}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){geom_rug}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ggplot2}<LSEP>[](symbol){aes}<LEND>[](symbol){x}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){p} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){HoltWintersZZ}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){exponential}<LSEP>[](symbol){phi}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){warnings}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){origx}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){seasonal}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){seasonal}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){lenx}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.numeric}<LSEP>[](symbol){phi}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){phi}<LSEP>[litteral](real){1.000000}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.numeric}<LSEP>[](symbol){alpha}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){cannot fit models without leve...}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){'alpha', 'beta' and 'gamma' mu...}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){gamma}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](str){multiplicative}<LEND>[argument 1; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){data must be positive for mult...}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma}<LSEP>[litteral](logical){FALSE}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.logical}<LSEP>[](symbol){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){gamma}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal}<LSEP>[litteral](str){none}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){l.start}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](integer){1}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){s.start}<LSEP>[litteral](real){0.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.logical}<LSEP>[](symbol){beta}<LEND>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){exponential}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){b.start}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](integer){2}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](integer){1}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){b.start}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](integer){2}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](integer){1}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){l.start}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){m}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){b.start}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){m}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){m}<LEND>[](symbol){l.start}<LEND>[](symbol){m}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](str){additive}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){s.start}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){m}<LEND>[](symbol){l.start}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){s.start}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){m}<LEND>[](symbol){l.start}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.000000}<LSEP>[argument 3; litteral](real){0.000000}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.logical}<LSEP>[](symbol){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){trendtype}<LSEP>[litteral](str){N}<LEND>[false branch; control flow](){if}<LSEP>[](symbol){exponential}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){trendtype}<LSEP>[litteral](str){M}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){trendtype}<LSEP>[litteral](str){A}<LEND>[statement 15; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](str){none}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasontype}<LSEP>[litteral](str){N}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](str){multiplicative}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasontype}<LSEP>[litteral](str){M}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasontype}<LSEP>[litteral](str){A}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){optim.start}<LEND>[call](){}<LSEP>[](symbol){initparam}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[argument 3; litteral](real){1.000000}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){seasontype}<LSEP>[argument 6; litteral](logical){FALSE}<LSEP>[](symbol){lower}<LSEP>[](symbol){upper}<LSEP>[](symbol){m}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){error}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){p}<LSEP>[](symbol){select}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){select}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](integer){1}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){select}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](integer){1}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){select}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){select}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](integer){1}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){select}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){select}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){zzhw}<LSEP>[](symbol){x}<LSEP>[](symbol){lenx}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){m}<LEND>[argument 7; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.logical}<LSEP>[](symbol){beta}<LEND>[](symbol){beta}<LEND>[argument 8; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.logical}<LSEP>[](symbol){gamma}<LEND>[](symbol){gamma}<LEND>[](symbol){exponential}<LSEP>[](symbol){phi}<LSEP>[](symbol){l.start}<LSEP>[](symbol){b.start}<LSEP>[](symbol){s.start}<LEND>[](symbol){SSE}<LEND>[statement 18; assign](){<-}<LSEP>[](symbol){select}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){beta}<LEND>[argument 2; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){gamma}<LEND>[statement 19; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){select}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){sol}<LEND>[call](){}<LSEP>[](symbol){optim}<LSEP>[](symbol){optim.start}<LSEP>[](symbol){error}<LSEP>[argument 2; litteral](str){L-BFGS-B}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[](symbol){select}<LEND>[argument 4; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[](symbol){select}<LEND>[](symbol){select}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sol}<LSEP>[](symbol){convergence}<LEND>[argument 1; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sol}<LSEP>[](symbol){par}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sol}<LSEP>[](symbol){par}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sol}<LSEP>[](symbol){convergence}<LEND>[argument 1; litteral](real){50.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){warnings}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LEND>[argument 0; call](){}<LSEP>[](symbol){gettextf}<LSEP>[argument 0; litteral](str){optimization difficulties: %s}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sol}<LSEP>[](symbol){message}<LEND>[argument 1; litteral](logical){NA}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){optimization failure}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){select}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sol}<LSEP>[](symbol){par}<LEND>[argument 1; litteral](integer){1}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){select}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sol}<LSEP>[](symbol){par}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](integer){1}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){select}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){select}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sol}<LSEP>[](symbol){par}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](integer){1}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){select}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){select}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){final.fit}<LEND>[call](){}<LSEP>[](symbol){zzhw}<LSEP>[](symbol){x}<LSEP>[](symbol){lenx}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){m}<LEND>[argument 7; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.logical}<LSEP>[](symbol){beta}<LEND>[](symbol){beta}<LEND>[argument 8; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.logical}<LSEP>[](symbol){gamma}<LEND>[](symbol){gamma}<LEND>[](symbol){exponential}<LSEP>[](symbol){phi}<LSEP>[](symbol){l.start}<LSEP>[](symbol){b.start}<LSEP>[](symbol){s.start}<LEND>[statement 21; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 22; assign](){<-}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){final.fit}<LSEP>[](symbol){fitted}<LEND>[](symbol){m}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 23; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){final.fit}<LSEP>[](symbol){residuals}<LEND>[](symbol){m}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 24; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){fitted}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[argument 3; call](){}<LSEP>[](symbol){var}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){final.fit}<LSEP>[](symbol){residuals}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](str){biasadj}<LEND>[](symbol){biasadj}<LEND>[statement 25; assign](){<-}<LSEP>[](symbol){states}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){final.fit}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 26; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){states}<LEND>[litteral](str){l}<LEND>[statement 27; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){states}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){states}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){final.fit}<LSEP>[](symbol){trend}<LEND>[statement 28; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nr}<LEND>[call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){states}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){nc}<LEND>[call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){states}<LEND>[statement 2; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){m}<LEND>[body; assign](){<-}<LSEP>[](symbol){states}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){states}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){final.fit}<LSEP>[](symbol){season}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){m}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nr}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){states}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){nc}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){s}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){m}<LEND>[argument 2; litteral](str){}<LEND>[statement 29; assign](){<-}<LSEP>[](symbol){states}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){states}<LSEP>[](symbol){m}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){m}<LEND>[statement 30; assign](){<-}<LSEP>[](symbol){damped}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){phi}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 31; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](str){additive}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){components}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){A}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){seasontype}<LSEP>[](symbol){damped}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](str){multiplicative}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){components}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){M}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){seasontype}<LSEP>[](symbol){damped}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](str){none}<LEND>[](symbol){exponential}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){components}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){M}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){seasontype}<LSEP>[](symbol){damped}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){components}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){A}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){seasontype}<LSEP>[](symbol){damped}<LEND>[statement 32; assign](){<-}<LSEP>[](symbol){initstate}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){states}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){}<LEND>[statement 33; assign](){<-}<LSEP>[](symbol){param}<LSEP>[](symbol){alpha}<LEND>[statement 34; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){param}<LEND>[litteral](str){alpha}<LEND>[statement 35; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){param}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){param}<LSEP>[](symbol){beta}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){param}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){param}<LEND>[litteral](str){beta}<LEND>[statement 36; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){param}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){param}<LSEP>[](symbol){gamma}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){param}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){param}<LEND>[litteral](str){gamma}<LEND>[statement 37; control flow](){if}<LSEP>[](symbol){damped}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){param}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){param}<LSEP>[](symbol){phi}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){param}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){param}<LEND>[litteral](str){phi}<LEND>[statement 38; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){components}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){A}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){sigma2}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){res}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){sigma2}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){res}<LSEP>[](symbol){fitted}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 39; call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){fitted}<LSEP>[](symbol){res}<LSEP>[](symbol){components}<LSEP>[](symbol){origx}<LEND>[argument 4; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){param}<LSEP>[](symbol){initstate}<LEND>[](symbol){initstate}<LSEP>[](symbol){states}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){final.fit}<LSEP>[](symbol){SSE}<LEND>[](symbol){sigma2}<LEND>[argument 9; call](){}<LSEP>[](symbol){match.call}<LEND>[](symbol){m}<LSEP>[](symbol){lambda}<LEND>[argument 1; litteral](str){ets}<LEND>[assign](){<-}<LSEP>[](symbol){zzhw}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){lenx}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){m}<LSEP>[](symbol){dotrend}<LSEP>[](symbol){doseasonal}<LSEP>[](symbol){l.start}<LSEP>[](symbol){exponential}<LSEP>[](symbol){phi}<LSEP>[](symbol){b.start}<LSEP>[](symbol){s.start}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){exponential}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){exponential}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){exponential}<LSEP>[litteral](logical){FALSE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.numeric}<LSEP>[](symbol){phi}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){phi}<LSEP>[litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){level}<LEND>[assign](){<-}<LSEP>[](symbol){trend}<LEND>[assign](){<-}<LSEP>[](symbol){season}<LEND>[assign](){<-}<LSEP>[](symbol){xfit}<LEND>[assign](){<-}<LSEP>[](symbol){residuals}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){lenx}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){SSE}<LSEP>[litteral](real){0.000000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){dotrend}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta}<LSEP>[litteral](real){0.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){b.start}<LSEP>[litteral](real){0.000000}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){doseasonal}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma}<LSEP>[litteral](real){0.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){s.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){s.start}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](str){additive}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){lastlevel}<LEND>[assign](){<-}<LSEP>[](symbol){level0}<LSEP>[](symbol){l.start}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){lasttrend}<LEND>[assign](){<-}<LSEP>[](symbol){trend0}<LSEP>[](symbol){b.start}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){season0}<LSEP>[](symbol){s.start}<LEND>[statement 9; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){lenx}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lastlevel}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){level}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lasttrend}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trend}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){i}<LSEP>[](symbol){m}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lastseason}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){season}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[](symbol){m}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lastseason}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){season0}<LSEP>[](symbol){i}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){lastseason}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lastseason}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](str){additive}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](str){additive}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){exponential}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xhat}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){lastlevel}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){phi}<LSEP>[](symbol){lasttrend}<LEND>[](symbol){lastseason}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xhat}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){lastlevel}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){lasttrend}<LSEP>[](symbol){phi}<LEND>[](symbol){lastseason}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){exponential}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xhat}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){lastlevel}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){phi}<LSEP>[](symbol){lasttrend}<LEND>[](symbol){lastseason}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xhat}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){lastlevel}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){lasttrend}<LSEP>[](symbol){phi}<LEND>[](symbol){lastseason}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xfit}<LSEP>[](symbol){i}<LEND>[](symbol){xhat}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){i}<LEND>[](symbol){xhat}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){residuals}<LSEP>[](symbol){i}<LEND>[](symbol){res}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){SSE}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){SSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){res}<LSEP>[](symbol){res}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](str){additive}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){exponential}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){level}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){i}<LEND>[](symbol){lastseason}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){lastlevel}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){phi}<LSEP>[](symbol){lasttrend}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){level}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){i}<LEND>[](symbol){lastseason}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){lastlevel}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){lasttrend}<LSEP>[](symbol){phi}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){exponential}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){level}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){i}<LEND>[](symbol){lastseason}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){lastlevel}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){phi}<LSEP>[](symbol){lasttrend}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){level}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){i}<LEND>[](symbol){lastseason}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){lastlevel}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){lasttrend}<LSEP>[](symbol){phi}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){exponential}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trend}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){level}<LSEP>[](symbol){i}<LEND>[](symbol){lastlevel}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){beta}<LEND>[](symbol){phi}<LEND>[](symbol){lasttrend}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trend}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){level}<LSEP>[](symbol){i}<LEND>[](symbol){lastlevel}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){lasttrend}<LSEP>[](symbol){phi}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](str){additive}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){exponential}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){season}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){i}<LEND>[](symbol){lastlevel}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){phi}<LSEP>[](symbol){lasttrend}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){gamma}<LEND>[](symbol){lastseason}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){season}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){lastlevel}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){lasttrend}<LSEP>[](symbol){phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){gamma}<LEND>[](symbol){lastseason}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){exponential}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){season}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){lastlevel}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){phi}<LSEP>[](symbol){lasttrend}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){gamma}<LEND>[](symbol){lastseason}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){season}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){lastlevel}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){lasttrend}<LSEP>[](symbol){phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){gamma}<LEND>[](symbol){lastseason}<LEND>[statement 10; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){SSE}<LSEP>[](symbol){xfit}<LSEP>[](symbol){residuals}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){level0}<LSEP>[](symbol){level}<LEND>[argument 4; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){trend0}<LSEP>[](symbol){trend}<LEND>[argument 5; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){season0}<LSEP>[](symbol){season}<LEND>[](symbol){phi}<LEND>[assign](){<-}<LSEP>[](symbol){ses}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){initial}<LSEP>[](symbol){alpha}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){initial}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){initial}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){initial}<LSEP>[argument 1; litteral](str){optimal}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){ANN}<LSEP>[](symbol){alpha}<LSEP>[argument 3; litteral](str){mse}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[](symbol){HoltWintersZZ}<LSEP>[](symbol){x}<LSEP>[](symbol){alpha}<LSEP>[argument 2; litteral](logical){FALSE}<LSEP>[argument 3; litteral](logical){FALSE}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){...}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){method}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){model}<LEND>[](symbol){method}<LEND>[litteral](str){Simple exponential smoothing}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){model}<LEND>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 5; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fcast}<LEND>[assign](){<-}<LSEP>[](symbol){holt}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){h}<LSEP>[](symbol){damped}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){initial}<LSEP>[](symbol){exponential}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){phi}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){initial}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){initial}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](integer){1}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){I need at least two observatio...}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){initial}<LSEP>[argument 1; litteral](str){optimal}<LEND>[](symbol){damped}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){exponential}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){MMN}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){phi}<LSEP>[](symbol){damped}<LSEP>[argument 6; litteral](str){mse}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){AAN}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){phi}<LSEP>[](symbol){damped}<LSEP>[argument 6; litteral](str){mse}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[](symbol){HoltWintersZZ}<LSEP>[](symbol){x}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[argument 3; litteral](logical){FALSE}<LSEP>[](symbol){phi}<LSEP>[](symbol){exponential}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){...}<LEND>[statement 3; control flow](){if}<LSEP>[](symbol){damped}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){method}<LEND>[litteral](str){Damped Holt's method}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){initial}<LSEP>[argument 1; litteral](str){simple}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Damped Holt's method requires ...}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){method}<LEND>[litteral](str){Holt's method}<LEND>[statement 4; control flow](){if}<LSEP>[](symbol){exponential}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){method}<LEND>[argument 1; litteral](str){with exponential trend}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){model}<LEND>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){method}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){model}<LEND>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 8; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fcast}<LEND>[assign](){<-}<LSEP>[](symbol){hw}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){h}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){damped}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){initial}<LSEP>[](symbol){exponential}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){phi}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){initial}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){initial}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){seasonal}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){seasonal}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](integer){1}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){The time series should have fr...}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){I need at least}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; litteral](str){observations to estimate seaso...}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){initial}<LSEP>[argument 1; litteral](str){optimal}<LEND>[](symbol){damped}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](str){additive}<LEND>[](symbol){exponential}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Forbidden model combination}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](str){additive}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){exponential}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){AAA}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){phi}<LSEP>[](symbol){damped}<LSEP>[argument 7; litteral](str){mse}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](str){additive}<LEND>[](symbol){exponential}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){MMM}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){phi}<LSEP>[](symbol){damped}<LSEP>[argument 7; litteral](str){mse}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){MAM}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){phi}<LSEP>[](symbol){damped}<LSEP>[argument 7; litteral](str){mse}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[](symbol){HoltWintersZZ}<LSEP>[](symbol){x}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){phi}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){exponential}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){...}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](str){additive}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){method}<LEND>[litteral](str){Holt-Winters' additive method}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){method}<LEND>[litteral](str){Holt-Winters' multiplicative m...}<LEND>[statement 7; control flow](){if}<LSEP>[](symbol){exponential}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){method}<LEND>[argument 1; litteral](str){with exponential trend}<LEND>[statement 8; control flow](){if}<LSEP>[](symbol){damped}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Damped}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){method}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){initial}<LSEP>[argument 1; litteral](str){simple}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Damped methods require optimal...}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){model}<LEND>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){method}<LEND>[statement 10; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){model}<LEND>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 11; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 12; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fcast} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){ndiffs}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){alpha}<LSEP>[](symbol){test}<LSEP>[](symbol){type}<LSEP>[](symbol){max.d}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){test}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){type}<LEND>[call](){}<LSEP>[](symbol){match}<LEND>[argument 0; call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){type}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){level}<LSEP>[argument 1; litteral](str){trend}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){na.omit}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){x}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){d}<LSEP>[litteral](real){0.000000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){alpha}<LSEP>[argument 1; litteral](real){0.010000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Specified alpha value is less ...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){alpha}<LSEP>[litteral](real){0.010000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){alpha}<LSEP>[argument 1; litteral](real){0.100000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Specified alpha value is large...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){alpha}<LSEP>[litteral](real){0.100000}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.constant}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){d}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){urca_pval}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){urca_test}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){approx}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){@}<LSEP>[](symbol){urca_test}<LSEP>[](symbol){cval}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){sub}<LSEP>[argument 0; litteral](str){pct}<LSEP>[argument 1; litteral](str){}<LEND>[argument 2; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){@}<LSEP>[](symbol){urca_test}<LSEP>[](symbol){cval}<LEND>[argument 1; litteral](real){100.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){@}<LSEP>[](symbol){urca_test}<LSEP>[](symbol){teststat}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 3; litteral](real){2.000000}<LEND>[](symbol){y}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){kpss_wrap}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){...}<LSEP>[](symbol){use.lag}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){ur.kpss}<LSEP>[](symbol){...}<LSEP>[](symbol){use.lag}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){runTests}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){test}<LSEP>[](symbol){alpha}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){tryCatch}<LEND>[argument 0; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){diff}<LEND>[call](){}<LSEP>[](symbol){switch}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){urca_pval}<LEND>[argument 0; call](){}<LSEP>[](symbol){kpss_wrap}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){mu}<LSEP>[argument 1; litteral](str){tau}<LEND>[](symbol){type}<LEND>[](symbol){...}<LEND>[](symbol){alpha}<LEND>[argument 2; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){urca_pval}<LEND>[argument 0; call](){}<LSEP>[](symbol){ur.df}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){drift}<LSEP>[argument 1; litteral](str){trend}<LEND>[](symbol){type}<LEND>[](symbol){...}<LEND>[](symbol){alpha}<LEND>[argument 3; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){urca_pval}<LEND>[argument 0; call](){}<LSEP>[](symbol){ur.pp}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){Z-tau}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){constant}<LSEP>[argument 1; litteral](str){trend}<LEND>[](symbol){type}<LEND>[](symbol){...}<LEND>[](symbol){alpha}<LEND>[argument 4; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){This shouldn't happen}<LEND>[](symbol){diff}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){e}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){The chosen unit root test enco...}<LEND>[argument 1; call](){}<LSEP>[](symbol){switch}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){d}<LEND>[argument 1; litteral](str){first}<LSEP>[argument 2; litteral](str){second}<LSEP>[argument 3; litteral](str){third}<LEND>[argument 4; call](){}<LSEP>[](symbol){paste0}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){th}<LEND>[argument 2; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){call}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){message}<LEND>[](symbol){d}<LEND>[statement 1; litteral](logical){FALSE}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){dodiff}<LEND>[call](){}<LSEP>[](symbol){runTests}<LSEP>[](symbol){x}<LSEP>[](symbol){test}<LSEP>[](symbol){alpha}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){dodiff}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){d}<LEND>[statement 11; control flow](){while}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LSEP>[](symbol){dodiff}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){d}<LSEP>[](symbol){max.d}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){d}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){x}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.constant}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){d}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){dodiff}<LEND>[call](){}<LSEP>[](symbol){runTests}<LSEP>[](symbol){x}<LSEP>[](symbol){test}<LSEP>[](symbol){alpha}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){dodiff}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 12; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){d}<LEND>[assign](){<-}<LSEP>[](symbol){nsdiffs}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){alpha}<LSEP>[](symbol){m}<LSEP>[](symbol){test}<LSEP>[](symbol){max.D}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){test}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){D}<LSEP>[litteral](real){0.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){alpha}<LSEP>[argument 1; litteral](real){0.010000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Specified alpha value is less ...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){alpha}<LSEP>[litteral](real){0.010000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){alpha}<LSEP>[argument 1; litteral](real){0.100000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Specified alpha value is large...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){alpha}<LSEP>[litteral](real){0.100000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){test}<LSEP>[argument 1; litteral](str){ocsb}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){alpha}<LSEP>[argument 1; litteral](real){0.050000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Significance levels other than...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){alpha}<LSEP>[litteral](real){0.050000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){hegy}<LSEP>[argument 1; litteral](str){ch}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){requireNamespace}<LSEP>[argument 0; litteral](str){uroot}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){Using a }<LSEP>[](symbol){test}<LSEP>[argument 2; litteral](str){ test requires the uroot packa...}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.constant}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){D}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){m}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){argument m is deprecated; plea...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){x}<LSEP>[](symbol){m}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Non seasonal data}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){I can't handle data with frequ...}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>=}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){runTests}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){test}<LSEP>[](symbol){alpha}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){tryCatch}<LEND>[argument 0; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){diff}<LEND>[call](){}<LSEP>[](symbol){switch}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){seas.heuristic}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[argument 1; litteral](real){0.640000}<LEND>[argument 2; call](){}<LSEP>[](symbol){with}<LEND>[argument 0; call](){}<LSEP>[](symbol){ocsb.test}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](str){AIC}<LSEP>[](symbol){...}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){statistics}<LSEP>[](symbol){critical}<LEND>[argument 3; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tail}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){uroot}<LSEP>[](symbol){hegy.test}<LEND>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[argument 2; litteral](real){3.000000}<LSEP>[argument 3; litteral](str){AIC}<LSEP>[](symbol){...}<LEND>[](symbol){pvalues}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[](symbol){alpha}<LEND>[argument 4; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){uroot}<LSEP>[](symbol){ch.test}<LEND>[](symbol){x}<LSEP>[argument 1; litteral](str){trig}<LSEP>[](symbol){...}<LEND>[](symbol){pvalues}<LEND>[argument 1; litteral](str){joint}<LEND>[](symbol){alpha}<LEND>[statement 1; call](){}<LSEP>[](symbol){stopifnot}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){diff}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){diff}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){e}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){The chosen seasonal unit root ...}<LEND>[argument 1; call](){}<LSEP>[](symbol){switch}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){D}<LEND>[argument 1; litteral](str){first}<LSEP>[argument 2; litteral](str){second}<LSEP>[argument 3; litteral](str){third}<LEND>[argument 4; call](){}<LSEP>[](symbol){paste0}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){D}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){th}<LEND>[argument 2; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){call}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){message}<LEND>[](symbol){D}<LEND>[statement 1; litteral](real){0.000000}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){dodiff}<LEND>[call](){}<LSEP>[](symbol){runTests}<LSEP>[](symbol){x}<LSEP>[](symbol){test}<LSEP>[](symbol){alpha}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LSEP>[](symbol){dodiff}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){%%}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){The time series frequency has ...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 12; control flow](){while}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LSEP>[](symbol){dodiff}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){D}<LSEP>[](symbol){max.D}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){D}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){D}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.constant}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){D}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){D}<LSEP>[](symbol){max.D}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){dodiff}<LEND>[call](){}<LSEP>[](symbol){runTests}<LSEP>[](symbol){x}<LSEP>[](symbol){test}<LSEP>[](symbol){alpha}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){dodiff}<LSEP>[litteral](logical){FALSE}<LEND>[statement 13; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){D}<LEND>[assign](){<-}<LSEP>[](symbol){seas.heuristic}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){msts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){msts}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){x}<LEND>[](symbol){msts}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){nperiods}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){msts}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){ts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){msts}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){nperiods}<LEND>[call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){msts}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){season}<LSEP>[litteral](real){0.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){The object provided must be a ...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){season}<LSEP>[litteral](logical){NA}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){stlfit}<LEND>[call](){}<LSEP>[](symbol){mstl}<LSEP>[](symbol){x}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){remainder}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){stlfit}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](str){Remainder}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){seasonal}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){stlfit}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){Season}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){stlfit}<LEND>[argument 3; litteral](logical){FALSE}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){vare}<LEND>[call](){}<LSEP>[](symbol){var}<LSEP>[](symbol){remainder}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){nseas}<LEND>[call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){seasonal}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){nseas}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){season}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){nseas}<LEND>[statement 1; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){seq}<LSEP>[](symbol){nseas}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){season}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){max}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){min}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){vare}<LEND>[argument 1; call](){}<LSEP>[](symbol){var}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){remainder}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 8; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){season}<LEND>[assign](){<-}<LSEP>[](symbol){ocsb.test}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){lag.method}<LSEP>[](symbol){maxlag}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lag.method}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){lag.method}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){sname}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){period}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){period}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Data must be seasonal to use `...}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){genLags}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){maxlag}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){maxlag}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){start}<LSEP>[](symbol){y}<LEND>[argument 2; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){y}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){do.call}<LSEP>[](symbol){cbind}<LEND>[argument 1; call](){}<LSEP>[](symbol){lapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq_len}<LSEP>[](symbol){maxlag}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){k}<LEND>[body; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){lag}<LEND>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){k}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){out}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){lag_}<LEND>[argument 1; call](){}<LSEP>[](symbol){seq_len}<LSEP>[](symbol){maxlag}<LEND>[statement 3; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){out}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){fitOCSB}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){lag}<LSEP>[](symbol){maxlag}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){period}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){diff}<LEND>[argument 0; call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){x}<LSEP>[](symbol){period}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){ylag}<LEND>[call](){}<LSEP>[](symbol){genLags}<LSEP>[](symbol){y}<LSEP>[](symbol){lag}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){maxlag}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){tail}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){maxlag}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){mf}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){y}<LSEP>[](symbol){ylag}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){ar.fit}<LEND>[call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){.}<LEND>[](symbol){mf}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){Z4_frame}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){x}<LSEP>[](symbol){period}<LEND>[argument 1; call](){}<LSEP>[](symbol){genLags}<LEND>[argument 0; call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){x}<LSEP>[](symbol){period}<LEND>[](symbol){lag}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){Z4}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Z4_frame}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](str){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){ar.fit}<LSEP>[](symbol){Z4_frame}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){Z5_frame}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){genLags}<LEND>[argument 0; call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){x}<LEND>[](symbol){lag}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){Z5}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Z5_frame}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](str){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){ar.fit}<LSEP>[](symbol){Z5_frame}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){mf}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){lag}<LEND>[](symbol){Z4}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){lag}<LEND>[](symbol){Z5}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){period}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 13; call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){xreg}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){maxlag}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){lag.method}<LSEP>[argument 1; litteral](str){fixed}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tmp}<LEND>[call](){}<LSEP>[](symbol){vector}<LSEP>[argument 0; litteral](str){list}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){maxlag}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){lapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq_len}<LSEP>[](symbol){maxlag}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){lag}<LEND>[body; call](){}<LSEP>[](symbol){fitOCSB}<LSEP>[](symbol){x}<LSEP>[](symbol){lag}<LSEP>[](symbol){maxlag}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){icvals}<LEND>[call](){}<LSEP>[](symbol){unlist}<LEND>[argument 0; call](){}<LSEP>[](symbol){switch}<LSEP>[](symbol){lag.method}<LEND>[argument 1; call](){}<LSEP>[](symbol){lapply}<LSEP>[](symbol){fits}<LSEP>[](symbol){AIC}<LEND>[argument 2; call](){}<LSEP>[](symbol){lapply}<LSEP>[](symbol){fits}<LSEP>[](symbol){BIC}<LEND>[argument 3; call](){}<LSEP>[](symbol){lapply}<LSEP>[](symbol){fits}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){rank}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){logLik}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){k}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){k}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){x}<LEND>[](symbol){k}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){id}<LEND>[call](){}<LSEP>[](symbol){which.min}<LSEP>[](symbol){icvals}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){maxlag}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){id}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){regression}<LEND>[call](){}<LSEP>[](symbol){fitOCSB}<LSEP>[](symbol){x}<LSEP>[](symbol){maxlag}<LSEP>[](symbol){maxlag}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){stat}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){regression}<LEND>[](symbol){coefficients}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){xregZ4}<LSEP>[argument 1; litteral](str){xregZ5}<LEND>[argument 2; litteral](str){t value}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){stat}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Model did not reach a solution...}<LEND>[statement 10; call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){stat}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){calcOCSBCritVal}<LSEP>[](symbol){period}<LEND>[argument 2; litteral](str){OCSB test}<LSEP>[](symbol){lag.method}<LSEP>[](symbol){maxlag}<LSEP>[](symbol){regression}<LSEP>[](symbol){sname}<LEND>[argument 1; litteral](str){OCSBtest}<LEND>[assign](){<-}<LSEP>[](symbol){calcOCSBCritVal}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){seasonal.period}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){log.m}<LEND>[call](){}<LSEP>[](symbol){log}<LSEP>[](symbol){seasonal.period}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.293741}<LEND>[argument 1; call](){}<LSEP>[](symbol){exp}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.285085}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){log.m}<LSEP>[argument 1; litteral](real){0.765645}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.059836}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){log.m}<LSEP>[argument 1; litteral](real){0.765645}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){1.652202}<LEND>[assign](){<-}<LSEP>[](symbol){print.OCSBtest}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n}<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){strwrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){method}<LEND>[argument 1; litteral](str){\t}<LEND>[argument 1; litteral](str){\n}<LEND>[statement 2; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n}<LEND>[statement 3; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){data: }<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){data.name}<LEND>[argument 2; litteral](str){\n\n}<LSEP>[argument 3; litteral](str){}<LEND>[statement 4; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){Test statistic: }<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){statistics}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 2; litteral](str){, 5% critical value: }<LEND>[argument 3; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){critical}<LEND>[argument 1; litteral](real){4.000000}<LEND>[statement 5; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n}<LEND>[statement 6; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){alternative hypothesis: statio...}<LEND>[statement 7; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n\n}<LEND>[statement 8; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){Lag order }<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lag.order}<LEND>[argument 2; litteral](str){ was selected using }<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lag.method} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){checkAdmissibility}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[](symbol){tau}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){box.cox}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){bc.lower}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>=}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){bc.upper}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){small.phi}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){small.phi}<LSEP>[argument 1; litteral](real){0.800000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){small.phi}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ar.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){arlags}<LEND>[call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){ar.coefs}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){arlags}<LEND>[argument 1; litteral](integer){0}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){arlags}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){Mod}<LEND>[argument 0; call](){}<LSEP>[](symbol){polyroot}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ar.coefs}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](integer){1}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){0.010000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ma.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){malags}<LEND>[call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){ma.coefs}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){malags}<LEND>[argument 1; litteral](integer){0}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){malags}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){Mod}<LEND>[argument 0; call](){}<LSEP>[](symbol){polyroot}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ma.coefs}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](integer){1}<LSEP>[](symbol){q}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){0.010000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){D.eigen.values}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){eigen}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){D}<LEND>[argument 1; litteral](logical){FALSE}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[](symbol){values}<LEND>[statement 5; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){D.eigen.values}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){0.010000} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){monthdays}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.ts}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Not a time series}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){f}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){f}<LSEP>[argument 1; litteral](real){12.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){days}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){31.000000}<LSEP>[argument 1; litteral](real){28.000000}<LSEP>[argument 2; litteral](real){31.000000}<LSEP>[argument 3; litteral](real){30.000000}<LSEP>[argument 4; litteral](real){31.000000}<LSEP>[argument 5; litteral](real){30.000000}<LSEP>[argument 6; litteral](real){31.000000}<LSEP>[argument 7; litteral](real){31.000000}<LSEP>[argument 8; litteral](real){30.000000}<LSEP>[argument 9; litteral](real){31.000000}<LSEP>[argument 10; litteral](real){30.000000}<LSEP>[argument 11; litteral](real){31.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){f}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){days}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){90.000000}<LSEP>[argument 1; litteral](real){91.000000}<LSEP>[argument 2; litteral](real){92.000000}<LSEP>[argument 3; litteral](real){92.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Not monthly or quarterly data}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){nyears}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[](symbol){f}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){years}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nyears}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){start}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){leap.years}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){%%}<LSEP>[](symbol){years}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){%%}<LSEP>[](symbol){years}<LSEP>[argument 1; litteral](real){100.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){%%}<LSEP>[](symbol){years}<LSEP>[argument 1; litteral](real){400.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nyears}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){dummy}<LEND>[call](){}<LSEP>[](symbol){t}<LEND>[argument 0; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){days}<LSEP>[](symbol){nyears}<LEND>[](symbol){f}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){f}<LSEP>[argument 1; litteral](real){12.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dummy}<LSEP>[](symbol){leap.years}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[litteral](real){29.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dummy}<LSEP>[](symbol){leap.years}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[litteral](real){91.000000}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){dummy}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){start}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 9; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){start}<LSEP>[](symbol){x}<LEND>[](symbol){f}<LEND>[assign](){<-}<LSEP>[](symbol){sindexf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){stl}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ss}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){time.series}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){ss}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){ss}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ss}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ss}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){tsp.x}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){time.series}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){decomposed.ts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ss}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){figure}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){seasonal}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){trend}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){ss}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){ss}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){n}<LSEP>[](symbol){m}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){ss}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ss}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){tsp.x}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){seasonal}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Object of unknown class}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){ss}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){h}<LSEP>[](symbol){m}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[](symbol){m}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp.x}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){m}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){out}<LEND>[assign](){<-}<LSEP>[](symbol){seasonaldummy}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){h}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.ts}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Not a time series}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fr.x}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){h}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){fr.x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Non-seasonal time series}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){dummy}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){cycle}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){dummy.mat}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){nrow}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 4; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[body; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dummy.mat}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){dummy}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){i}<LEND>[](symbol){i}<LEND>[litteral](real){1.000000}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){dummy.mat}<LEND>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){fr.x}<LSEP>[argument 1; litteral](real){12.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){month.abb}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){11.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){fr.x}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Q1}<LSEP>[argument 1; litteral](str){Q2}<LSEP>[argument 2; litteral](str){Q3}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){S}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){fr.x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](str){}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){dummy.mat}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){seasonaldummy}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){h}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){fr.x}<LEND>[](symbol){fr.x}<LEND>[assign](){<-}<LSEP>[](symbol){seasonaldummyf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){h}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){seasonaldummyf() is deprecated...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.ts}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Not a time series}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){f}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 3; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){seasonaldummy}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){h}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){f}<LEND>[](symbol){f}<LEND>[assign](){<-}<LSEP>[](symbol){fourier}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){K}<LSEP>[](symbol){h}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){h}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){...fourier}<LSEP>[](symbol){x}<LSEP>[](symbol){K}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){x}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){...fourier}<LSEP>[](symbol){x}<LSEP>[](symbol){K}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[assign](){<-}<LSEP>[](symbol){fourierf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){K}<LSEP>[](symbol){h}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){fourierf() is deprecated, plea...}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){...fourier}<LSEP>[](symbol){x}<LSEP>[](symbol){K}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[assign](){<-}<LSEP>[](symbol){...fourier}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){K}<LSEP>[](symbol){times}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](str){msts}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){period}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){msts}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){period}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){exists}<LSEP>[argument 0; litteral](str){sinpi}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){sinpi}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){pi}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){cospi}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cos}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){pi}<LSEP>[](symbol){x}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){period}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){K}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Number of periods does not mat...}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){K}<LEND>[](symbol){period}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){K must be not be greater than ...}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){labels}<LEND>[call](){}<LSEP>[](symbol){character}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[statement 6; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){seq_along}<LSEP>[](symbol){period}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){K}<LSEP>[](symbol){j}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){K}<LSEP>[](symbol){j}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){period}<LSEP>[](symbol){j}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){labels}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){labels}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){S}<LSEP>[argument 1; litteral](str){C}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){K}<LSEP>[](symbol){j}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){K}<LSEP>[](symbol){j}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){period}<LSEP>[](symbol){j}<LEND>[argument 2; litteral](str){-}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){duplicated}<LSEP>[](symbol){p}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){k}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){labels}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){labels}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){k}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){k}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){.Machine}<LSEP>[](symbol){double.eps}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){X}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){nan}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){times}<LEND>[argument 2; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](integer){2}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){p}<LEND>[statement 12; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){seq_along}<LSEP>[](symbol){p}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k}<LSEP>[](symbol){j}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){X}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](integer){2}<LSEP>[](symbol){j}<LEND>[argument 1; litteral](integer){1}<LEND>[call](){}<LSEP>[](symbol){sinpi}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){p}<LSEP>[](symbol){j}<LEND>[](symbol){times}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){X}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](integer){2}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){cospi}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){p}<LSEP>[](symbol){j}<LEND>[](symbol){times}<LEND>[statement 13; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){X}<LEND>[](symbol){labels}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){X}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){X}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){colSums}<LSEP>[](symbol){X}<LEND>[argument 3; litteral](logical){FALSE}<LEND>[statement 15; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){X}<LEND>[assign](){<-}<LSEP>[](symbol){ma}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){order}<LSEP>[](symbol){centre}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){order}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LSEP>[](symbol){order}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){order must be an integer}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){%%}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){centre}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){w}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](real){0.500000}<LEND>[](symbol){order}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){w}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){order}<LEND>[](symbol){order}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){filter}<LSEP>[](symbol){x}<LSEP>[](symbol){w} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){forecast.tbats}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[argument 1; litteral](str){bats}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast.bats}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](str){ts}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ts.frequency}<LEND>[call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ts.frequency}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 1; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){h}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){h}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){ts.frequency}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){10.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){ts.frequency}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){h}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){seasonal.periods}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Forecast horizon out of bounds}<LEND>[statement 3; control flow](){if}<LSEP>[](symbol){fan}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){51.000000}<LSEP>[argument 1; litteral](real){99.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){100.000000}<LSEP>[](symbol){level}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){99.990000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Confidence limit out of range}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){k.vector}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tau}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){k.vector}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tau}<LSEP>[litteral](real){0.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[](symbol){h}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){y.forecast}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){h}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){adj.beta}<LSEP>[litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){adj.beta}<LSEP>[litteral](real){0.000000}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){w}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){makeTBATSWMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){damping.parameter}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){k.vector}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ar.coefficients}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ma.coefficients}<LEND>[argument 4; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){tau}<LEND>[argument 5; litteral](str){forecast}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma.bold}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){tau}<LEND>[statement 1; call](){.Call}<LSEP>[call name; litteral](str){updateTBATSGammaBold}<LSEP>[](symbol){gamma.bold}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){k.vector}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){gamma.one.values}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){gamma.two.values}<LEND>[argument 4; litteral](str){forecast}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma.bold}<LSEP>[litteral](NULL){NULL}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){g}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){tau}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){adj.beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){q}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){g}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){adj.beta}<LEND>[](symbol){tau}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](real){1.000000}<LEND>[litteral](real){1.000000}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){q}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){g}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){adj.beta}<LEND>[](symbol){tau}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](real){1.000000}<LEND>[litteral](real){1.000000}<LEND>[statement 13; call](){.Call}<LSEP>[call name; litteral](str){updateTBATSGMatrix}<LSEP>[](symbol){g}<LSEP>[](symbol){gamma.bold}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){alpha}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){beta.v}<LEND>[argument 4; litteral](str){forecast}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){makeTBATSFMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){beta}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){damping.parameter}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 4; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){k.vector}<LEND>[](symbol){gamma.bold}<LEND>[argument 6; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ar.coefficients}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ma.coefficients}<LEND>[statement 15; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y.forecast}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){w}<LSEP>[](symbol){w.transpose}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){ncol}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[statement 16; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){F}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){ncol}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[statement 17; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){t}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){h}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){}<LSEP>[](symbol){t}<LEND>[call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){F}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){t}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y.forecast}<LSEP>[](symbol){t}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){w}<LSEP>[](symbol){w.transpose}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){t}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 18; assign](){<-}<LSEP>[](symbol){lower.bounds}<LEND>[assign](){<-}<LSEP>[](symbol){upper.bounds}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){level}<LEND>[](symbol){h}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){variance.multiplier}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){h}<LEND>[statement 20; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){variance.multiplier}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[litteral](real){1.000000}<LEND>[statement 21; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){j}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){f.running}<LEND>[call](){}<LSEP>[](symbol){diag}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){F}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){f.running}<LEND>[call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){f.running}<LSEP>[](symbol){F}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){c.j}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){w}<LSEP>[](symbol){w.transpose}<LEND>[](symbol){f.running}<LEND>[](symbol){g}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){variance.multiplier}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){j}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){variance.multiplier}<LSEP>[](symbol){j}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){c.j}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 22; assign](){<-}<LSEP>[](symbol){variance}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){variance}<LEND>[](symbol){variance.multiplier}<LEND>[statement 23; assign](){<-}<LSEP>[](symbol){st.dev}<LEND>[call](){}<LSEP>[](symbol){sqrt}<LSEP>[](symbol){variance}<LEND>[statement 24; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){level}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){marg.error}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){st.dev}<LEND>[argument 1; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){qnorm}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){100.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){level}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){200.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower.bounds}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){y.forecast}<LSEP>[](symbol){marg.error}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper.bounds}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){y.forecast}<LSEP>[](symbol){marg.error}<LEND>[statement 25; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y.forecast}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){y.forecast}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[](symbol){biasadj}<LEND>[argument 3; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){level}<LSEP>[](symbol){upper.bounds}<LSEP>[](symbol){lower.bounds}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lower.bounds}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){lower.bounds}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lower.bounds}<LEND>[call](){}<LSEP>[](symbol){pmax}<LSEP>[](symbol){lower.bounds}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){upper.bounds}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){upper.bounds}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[statement 26; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){upper.bounds}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){lower.bounds}<LEND>[call](){}<LSEP>[](symbol){paste0}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](str){%}<LEND>[statement 27; assign](){<-}<LSEP>[](symbol){forecast.object}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){future_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[](symbol){y.forecast}<LEND>[](symbol){level}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[argument 5; call](){}<LSEP>[](symbol){future_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[](symbol){upper.bounds}<LEND>[argument 6; call](){}<LSEP>[](symbol){future_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[](symbol){lower.bounds}<LEND>[argument 7; call](){}<LSEP>[](symbol){copy_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted.values}<LEND>[argument 8; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){object}<LEND>[argument 9; call](){}<LSEP>[](symbol){copy_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){errors}<LEND>[statement 28; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){forecast.object}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){call}<LEND>[](symbol){y}<LEND>[statement 29; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){forecast.object}<LEND>[litteral](str){forecast}<LEND>[statement 30; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){forecast.object}<LEND>[assign](){<-}<LSEP>[](symbol){as.character.tbats}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LSEP>[litteral](str){TBATS(}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 2; litteral](str){}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){1}<LSEP>[argument 2; litteral](str){}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){, {}<LSEP>[argument 2; litteral](str){}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){ar.coefficients}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){ar.coefficients}<LEND>[argument 2; litteral](str){}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){0}<LSEP>[argument 2; litteral](str){}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){,}<LSEP>[argument 2; litteral](str){}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){ma.coefficients}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){ma.coefficients}<LEND>[argument 2; litteral](str){}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){0}<LSEP>[argument 2; litteral](str){}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){}, }<LSEP>[argument 2; litteral](str){}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){damping.parameter}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){damping.parameter}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 2; litteral](str){,}<LSEP>[argument 3; litteral](str){}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){-,}<LSEP>[argument 2; litteral](str){}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){ {}<LSEP>[argument 2; litteral](str){}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){M}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){seasonal.periods}<LEND>[statement 2; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){M}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){<}<LEND>[argument 2; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){seasonal.periods}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 3; litteral](str){,}<LEND>[argument 4; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){k.vector}<LEND>[](symbol){i}<LEND>[argument 5; litteral](str){>}<LSEP>[argument 6; litteral](str){}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){i}<LSEP>[](symbol){M}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){, }<LSEP>[argument 2; litteral](str){}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){})}<LSEP>[argument 2; litteral](str){}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){{-})}<LSEP>[argument 2; litteral](str){}<LEND>[statement 9; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){name} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){simulate.ets}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){nsim}<LSEP>[](symbol){seed}<LSEP>[](symbol){future}<LSEP>[](symbol){bootstrap}<LSEP>[](symbol){innov}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){innov}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){exists}<LSEP>[argument 0; litteral](str){.Random.seed}<LSEP>[](symbol){.GlobalEnv}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){runif}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seed}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){RNGstate}<LEND>[call](){}<LSEP>[](symbol){get}<LSEP>[argument 0; litteral](str){.Random.seed}<LSEP>[](symbol){.GlobalEnv}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){R.seed}<LEND>[call](){}<LSEP>[](symbol){get}<LSEP>[argument 0; litteral](str){.Random.seed}<LSEP>[](symbol){.GlobalEnv}<LEND>[statement 1; call](){}<LSEP>[](symbol){set.seed}<LSEP>[](symbol){seed}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){RNGstate}<LEND>[call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){seed}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.list}<LEND>[argument 0; call](){}<LSEP>[](symbol){RNGkind}<LEND>[statement 3; call](){}<LSEP>[](symbol){on.exit}<LEND>[argument 0; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){.Random.seed}<LSEP>[](symbol){R.seed}<LSEP>[](symbol){.GlobalEnv}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nsim}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){innov}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){nsim}<LSEP>[argument 1; litteral](integer){0}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nsim}<LSEP>[litteral](real){100.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){m}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){m}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){future}<LSEP>[litteral](logical){FALSE}<LEND>[statement 2; control flow](){if}<LSEP>[](symbol){future}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){initstate}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){states}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){initstate}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){states}<LEND>[argument 1; call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){}<LEND>[statement 3; control flow](){if}<LSEP>[](symbol){bootstrap}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){residuals}<LEND>[argument 1; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){residuals}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){sample}<LSEP>[](symbol){res}<LSEP>[](symbol){nsim}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){innov}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){rnorm}<LSEP>[](symbol){nsim}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){sigma2}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){innov}<LEND>[](symbol){nsim}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){e}<LSEP>[](symbol){innov}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Length of innov must be equal ...}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){M}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){pmax}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[](symbol){e}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){tmp}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){.C}<LSEP>[argument 0; litteral](str){etssimulate}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.double}<LSEP>[](symbol){initstate}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){m}<LEND>[argument 3; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){switch}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){switch}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){2.000000}<LEND>[argument 5; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){switch}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){2.000000}<LEND>[argument 6; call](){}<LSEP>[](symbol){as.double}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){par}<LEND>[argument 1; litteral](str){alpha}<LEND>[argument 7; call](){}<LSEP>[](symbol){as.double}<LEND>[argument 0; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](str){N}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){par}<LEND>[argument 1; litteral](str){beta}<LEND>[argument 8; call](){}<LSEP>[](symbol){as.double}<LEND>[argument 0; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](str){N}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){par}<LEND>[argument 1; litteral](str){gamma}<LEND>[argument 9; call](){}<LSEP>[](symbol){as.double}<LEND>[argument 0; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](str){FALSE}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){par}<LEND>[argument 1; litteral](str){phi}<LEND>[argument 10; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){nsim}<LEND>[argument 11; call](){}<LSEP>[](symbol){as.double}<LEND>[argument 0; call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){nsim}<LEND>[argument 12; call](){}<LSEP>[](symbol){as.double}<LSEP>[](symbol){e}<LEND>[argument 13; litteral](str){forecast}<LEND>[argument 1; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){m}<LEND>[argument 2; call](){}<LSEP>[](symbol){ifelse}<LSEP>[](symbol){future}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tmp}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Problem with multiplicative da...}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tmp}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){tmp}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[statement 8; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){tmp}<LEND>[assign](){<-}<LSEP>[](symbol){myarima.sim}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){model}<LSEP>[](symbol){n}<LSEP>[](symbol){x}<LSEP>[](symbol){e}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){start.innov}<LEND>[call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){model}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){innov}<LSEP>[](symbol){e}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){data}<LSEP>[](symbol){x}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){first.nonmiss}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){first.nonmiss}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tsp.x}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){start.x}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp.x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){first.nonmiss}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp.x}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){window}<LSEP>[](symbol){x}<LSEP>[](symbol){start.x}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){start.innov}<LEND>[call](){}<LSEP>[](symbol){window}<LSEP>[](symbol){start.innov}<LSEP>[](symbol){start.x}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){x}<LEND>[](symbol){x}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){n.start}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){start.innov}<LSEP>[](symbol){innov}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n.start}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){seasonal.period}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){flag.noadjust}<LSEP>[litteral](logical){FALSE}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){data}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){data}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.list}<LSEP>[](symbol){model}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){'model' must be list}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](integer){0}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){'n' must be strictly positive}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){ar}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){ma}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){d}<LSEP>[litteral](real){0.000000}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){D}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){seasonal.difference}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){seasonal.period}<LEND>[statement 17; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){ord}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){order}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ord}<LEND>[argument 1; litteral](integer){3}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){'model$order' must be of length 3}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord}<LSEP>[argument 1; litteral](integer){1}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){inconsistent specification of ...}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){q}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord}<LSEP>[argument 1; litteral](integer){3}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){inconsistent specification of ...}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){d}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord}<LSEP>[argument 1; litteral](integer){2}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){d}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LSEP>[](symbol){d}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){number of differences must be ...}<LEND>[statement 18; control flow](){if}<LSEP>[](symbol){p}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){minroots}<LEND>[call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){Mod}<LEND>[argument 0; call](){}<LSEP>[](symbol){polyroot}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){ar}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){minroots}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){'ar' part of model is not stat...}<LEND>[statement 19; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){ma}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){filter}<LEND>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){ma}<LEND>[argument 2; litteral](str){convolution}<LSEP>[argument 3; litteral](integer){1}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){seq_along}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){ma}<LEND>[litteral](real){0.000000}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){len.ar}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){ar}<LEND>[statement 21; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){ar}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){len.ar}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){data}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){D}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){diff.data}<LEND>[call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){data}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){d}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){diff.data}<LEND>[call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){diff.data}<LSEP>[](symbol){m}<LSEP>[](symbol){D}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){D}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){diff.data}<LEND>[call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){seasonal.period}<LEND>[](symbol){D}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){D}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){diff.data}<LEND>[call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){data}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){d}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){diff.data}<LSEP>[](symbol){data}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x.new.innovations}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){start.innov}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){x.with.data}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){diff.data}<LSEP>[](symbol){x.new.innovations}<LEND>[statement 3; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){diff.data}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x.with.data}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lagged.x.values}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x.with.data}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[](symbol){len.ar}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ar.coefficients}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){ar}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){ar}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){sum.multiplied.x}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){lagged.x.values}<LSEP>[](symbol){ar.coefficients}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){ar.coefficients}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){.Machine}<LSEP>[](symbol){double.eps}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x.with.data}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x.with.data}<LSEP>[](symbol){i}<LEND>[](symbol){sum.multiplied.x}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){x.end}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x.with.data}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){diff.data}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x.with.data}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){x.end}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){seasonal.period}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){flag.noadjust}<LSEP>[litteral](logical){TRUE}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){ar}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){filter}<LEND>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){ar}<LEND>[argument 2; litteral](str){recursive}<LEND>[statement 22; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){D}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){flag.noadjust}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>=}<LSEP>[](symbol){n.start}<LSEP>[argument 1; litteral](real){20.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xdiff}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){19.000000}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xdiff}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n.start}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){sign}<LSEP>[](symbol){xdiff}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){sign}<LSEP>[](symbol){xdiff}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xdiff}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xdiff}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){xdiff}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xdiff}<LEND>[call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){xdiff}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){x}<LSEP>[](symbol){xdiff}<LEND>[statement 23; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){n.start}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){flag.noadjust}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n.start}<LEND>[statement 24; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){D}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){D}<LSEP>[](symbol){m}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){seasonal.xi}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){data}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){length.s.xi}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){seasonal.xi}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){diffinv}<LSEP>[](symbol){x}<LSEP>[](symbol){m}<LSEP>[](symbol){D}<LSEP>[](symbol){seasonal.xi}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){length.s.xi}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){D}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){diffinv}<LSEP>[](symbol){x}<LSEP>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){d}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){D}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){delta.four}<LEND>[call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){data}<LSEP>[](symbol){m}<LSEP>[](symbol){D}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){regular.xi}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){delta.four}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){delta.four}<LEND>[](symbol){D}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){delta.four}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){diffinv}<LSEP>[](symbol){x}<LSEP>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){regular.xi}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){regular.xi}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){d}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){D}<LSEP>[](symbol){m}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){seasonal.xi}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){data}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){length.s.xi}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){seasonal.xi}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){diffinv}<LSEP>[](symbol){x}<LSEP>[](symbol){m}<LSEP>[](symbol){D}<LSEP>[](symbol){seasonal.xi}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){length.s.xi}<LEND>[statement 25; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){data}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){data}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){data}<LEND>[argument 1; litteral](real){3.000000}<LEND>[statement 26; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){simulate.Arima}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){nsim}<LSEP>[](symbol){seed}<LSEP>[](symbol){xreg}<LSEP>[](symbol){future}<LSEP>[](symbol){bootstrap}<LSEP>[](symbol){innov}<LSEP>[](symbol){lambda}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){7.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Value for seasonal difference ...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){7.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){5.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Invalid value for seasonal period}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){object}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){n}<LSEP>[litteral](real){0.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){future}<LSEP>[litteral](logical){FALSE}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){nsim}<LSEP>[argument 1; litteral](integer){0}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nsim}<LSEP>[litteral](real){100.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){xreg}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){nsim}<LEND>[call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){xreg}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){use.drift}<LEND>[call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){drift}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coef}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){usexreg}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[](symbol){use.drift}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){xreg}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){xm}<LEND>[assign](){<-}<LSEP>[](symbol){oldxm}<LSEP>[litteral](real){0.000000}<LEND>[statement 7; control flow](){if}<LSEP>[](symbol){use.drift}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){xreg}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){xreg}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xreg}<LSEP>[litteral](NULL){NULL}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xreg}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){xreg}<LEND>[argument 1; litteral](str){drift}<LEND>[argument 3; litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq}<LSEP>[](symbol){nsim}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){n}<LSEP>[](symbol){future}<LEND>[](symbol){xreg}<LEND>[statement 8; control flow](){if}<LSEP>[](symbol){usexreg}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){xreg argument missing}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){xreg not required}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){xreg has incorrect dimension.}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){innov}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){exists}<LSEP>[argument 0; litteral](str){.Random.seed}<LSEP>[](symbol){.GlobalEnv}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){runif}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seed}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){RNGstate}<LSEP>[](symbol){.Random.seed}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){R.seed}<LSEP>[](symbol){.Random.seed}<LEND>[statement 1; call](){}<LSEP>[](symbol){set.seed}<LSEP>[](symbol){seed}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){RNGstate}<LEND>[call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){seed}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.list}<LEND>[argument 0; call](){}<LSEP>[](symbol){RNGkind}<LEND>[statement 3; call](){}<LSEP>[](symbol){on.exit}<LEND>[argument 0; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){.Random.seed}<LSEP>[](symbol){R.seed}<LSEP>[](symbol){.GlobalEnv}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nsim}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){innov}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){flag.s.arma}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){7.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){phi}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar}<LSEP>[litteral](NULL){NULL}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar}<LEND>[call](){}<LSEP>[](symbol){as.double}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){phi}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){theta}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma}<LSEP>[litteral](NULL){NULL}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma}<LEND>[call](){}<LSEP>[](symbol){as.double}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){theta}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){order}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ar}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){6.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ma}<LEND>[statement 3; control flow](){if}<LSEP>[](symbol){future}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){order}<LSEP>[](symbol){ar}<LSEP>[](symbol){ma}<LEND>[argument 3; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){sigma2}<LEND>[argument 4; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){object}<LEND>[argument 5; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){7.000000}<LEND>[argument 6; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){5.000000}<LEND>[](symbol){flag.s.arma}<LEND>[argument 8; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[argument 1; litteral](real){7.000000}<LSEP>[argument 2; litteral](real){4.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){order}<LSEP>[](symbol){ar}<LSEP>[](symbol){ma}<LEND>[argument 3; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){sigma2}<LEND>[argument 4; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){object}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){flag.seasonal.diff}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){7.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){order}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){6.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){theta}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma}<LSEP>[litteral](NULL){NULL}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ma}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){MA length wrong}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ar}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){AR length wrong}<LEND>[statement 4; control flow](){if}<LSEP>[](symbol){future}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){6.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[](symbol){ar}<LSEP>[](symbol){ma}<LEND>[argument 3; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){sigma2}<LEND>[argument 4; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){object}<LEND>[argument 5; litteral](real){0.000000}<LSEP>[](symbol){flag.s.arma}<LEND>[argument 7; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[argument 8; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){6.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[](symbol){ar}<LSEP>[](symbol){ma}<LEND>[argument 3; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){sigma2}<LEND>[argument 4; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){object}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){flag.seasonal.diff}<LSEP>[litteral](logical){FALSE}<LEND>[statement 12; control flow](){if}<LSEP>[](symbol){bootstrap}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){residuals}<LEND>[argument 1; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){residuals}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){sample}<LSEP>[](symbol){res}<LSEP>[](symbol){nsim}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){innov}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){rnorm}<LSEP>[](symbol){nsim}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){sd}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){innov}<LEND>[](symbol){nsim}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){e}<LSEP>[](symbol){innov}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Length of innov must be equal ...}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){narma}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](integer){1}<LSEP>[argument 1; litteral](integer){4}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coef}<LEND>[](symbol){narma}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coef}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){narma}<LSEP>[argument 1; litteral](integer){1}<LEND>[argument 1; litteral](str){intercept}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nsim}<LEND>[](symbol){xreg}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){future}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){xreg}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xm}<LEND>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){narma}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){drop}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coef}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){drop}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coef}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](integer){1}<LSEP>[](symbol){narma}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){future}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){oldxm}<LEND>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){narma}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){drop}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coef}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){drop}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coef}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](integer){1}<LSEP>[](symbol){narma}<LEND>[statement 15; control flow](){if}<LSEP>[](symbol){future}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){sim}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){myarima.sim}<LSEP>[](symbol){model}<LSEP>[](symbol){nsim}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){x}<LSEP>[](symbol){oldxm}<LEND>[](symbol){e}<LEND>[](symbol){xm}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){flag.seasonal.diff}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){zeros}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){5.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){7.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){sim}<LEND>[call](){}<LSEP>[](symbol){arima.sim}<LSEP>[](symbol){model}<LSEP>[](symbol){nsim}<LSEP>[](symbol){e}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){sim}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){diffinv}<LSEP>[](symbol){sim}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){5.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){7.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){zeros}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){sim}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){tail}<LSEP>[](symbol){sim}<LSEP>[](symbol){nsim}<LEND>[](symbol){xm}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){sim}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){tail}<LEND>[argument 0; call](){}<LSEP>[](symbol){arima.sim}<LSEP>[](symbol){model}<LSEP>[](symbol){nsim}<LSEP>[](symbol){e}<LEND>[](symbol){nsim}<LEND>[](symbol){xm}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){sim}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){sim}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){sim}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){sim}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){frequency}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){order}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){flag.seasonal.diff}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){sim}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){sim}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sim}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){sim}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){sim}<LSEP>[](symbol){lambda}<LEND>[statement 17; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){sim}<LEND>[assign](){<-}<LSEP>[](symbol){simulate.ar}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){nsim}<LSEP>[](symbol){seed}<LSEP>[](symbol){future}<LSEP>[](symbol){bootstrap}<LSEP>[](symbol){innov}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){innov}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){exists}<LSEP>[argument 0; litteral](str){.Random.seed}<LSEP>[](symbol){.GlobalEnv}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){runif}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seed}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){RNGstate}<LSEP>[](symbol){.Random.seed}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){R.seed}<LSEP>[](symbol){.Random.seed}<LEND>[statement 1; call](){}<LSEP>[](symbol){set.seed}<LSEP>[](symbol){seed}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){RNGstate}<LEND>[call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){seed}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.list}<LEND>[argument 0; call](){}<LSEP>[](symbol){RNGkind}<LEND>[statement 3; call](){}<LSEP>[](symbol){on.exit}<LEND>[argument 0; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){.Random.seed}<LSEP>[](symbol){R.seed}<LSEP>[](symbol){.GlobalEnv}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nsim}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){innov}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){object}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){future}<LSEP>[litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x.mean}<LSEP>[litteral](real){0.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){nsim}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nsim}<LSEP>[litteral](real){100.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x.mean}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x.mean}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[](symbol){x.mean}<LEND>[statement 3; control flow](){if}<LSEP>[](symbol){future}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ar}<LEND>[argument 1; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){var.pred}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){resid}<LEND>[argument 3; litteral](real){0.000000}<LSEP>[argument 4; litteral](real){1.000000}<LSEP>[argument 5; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ar}<LEND>[argument 1; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){var.pred}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){resid}<LEND>[statement 4; control flow](){if}<LSEP>[](symbol){bootstrap}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){residuals}<LEND>[argument 1; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){residuals}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){sample}<LSEP>[](symbol){res}<LSEP>[](symbol){nsim}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){innov}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){rnorm}<LSEP>[](symbol){nsim}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){sd}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){innov}<LEND>[](symbol){nsim}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){e}<LSEP>[](symbol){innov}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Length of innov must be equal ...}<LEND>[statement 5; control flow](){if}<LSEP>[](symbol){future}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){myarima.sim}<LSEP>[](symbol){model}<LSEP>[](symbol){nsim}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[](symbol){e}<LEND>[](symbol){x.mean}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){arima.sim}<LSEP>[](symbol){model}<LSEP>[](symbol){nsim}<LSEP>[](symbol){e}<LEND>[](symbol){x.mean}<LEND>[assign](){<-}<LSEP>[](symbol){simulate.lagwalk}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){nsim}<LSEP>[](symbol){seed}<LSEP>[](symbol){future}<LSEP>[](symbol){bootstrap}<LSEP>[](symbol){innov}<LSEP>[](symbol){lambda}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){innov}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){exists}<LSEP>[argument 0; litteral](str){.Random.seed}<LSEP>[](symbol){.GlobalEnv}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){runif}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seed}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){RNGstate}<LSEP>[](symbol){.Random.seed}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){R.seed}<LSEP>[](symbol){.Random.seed}<LEND>[statement 1; call](){}<LSEP>[](symbol){set.seed}<LSEP>[](symbol){seed}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){RNGstate}<LEND>[call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){seed}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.list}<LEND>[argument 0; call](){}<LSEP>[](symbol){RNGkind}<LEND>[statement 3; call](){}<LSEP>[](symbol){on.exit}<LEND>[argument 0; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){.Random.seed}<LSEP>[](symbol){R.seed}<LSEP>[](symbol){.GlobalEnv}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nsim}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){innov}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){bootstrap}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){residuals}<LEND>[argument 1; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){residuals}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){sample}<LSEP>[](symbol){res}<LSEP>[](symbol){nsim}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){innov}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){se}<LEND>[call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){sigma2}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){rnorm}<LSEP>[](symbol){nsim}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[](symbol){se}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){e}<LSEP>[](symbol){innov}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){lag_grp}<LEND>[call](){}<LSEP>[](symbol){rep_len}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq_len}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){par}<LEND>[](symbol){lag}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){e}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){split}<LSEP>[](symbol){e}<LSEP>[](symbol){lag_grp}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){cumulative_e}<LEND>[call](){}<LSEP>[](symbol){unsplit}<LEND>[argument 0; call](){}<LSEP>[](symbol){lapply}<LSEP>[](symbol){e}<LSEP>[](symbol){cumsum}<LEND>[](symbol){lag_grp}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){future}<LSEP>[litteral](logical){FALSE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){nsim}<LSEP>[argument 1; litteral](integer){0}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nsim}<LSEP>[litteral](real){100.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){x}<LSEP>[litteral](real){1.000000}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 8; control flow](){if}<LSEP>[](symbol){future}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){start}<LEND>[call](){}<LSEP>[](symbol){tail}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){par}<LEND>[](symbol){lag}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){start}<LEND>[call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){par}<LEND>[](symbol){lag}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){na_pos}<LEND>[call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){start}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){innov}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Missing values encountered at ...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lag_grp}<LEND>[call](){}<LSEP>[](symbol){rep_len}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq_len}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){par}<LEND>[](symbol){lag}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){start}<LSEP>[](symbol){na_pos}<LEND>[call](){}<LSEP>[](symbol){vapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){split}<LSEP>[](symbol){x}<LSEP>[](symbol){lag_grp}<LEND>[](symbol){na_pos}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){future}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){rev}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){pos}<LEND>[call](){}<LSEP>[](symbol){which.min}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[statement 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){pos}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){pos}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){sigma2}<LEND>[argument 2; call](){}<LSEP>[](symbol){numeric}<LSEP>[argument 0; litteral](integer){1}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){simdrift}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){par}<LEND>[](symbol){drift}<LEND>[argument 1; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){par}<LEND>[](symbol){drift.se}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){sim}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep_len}<LSEP>[](symbol){start}<LSEP>[](symbol){nsim}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq_len}<LSEP>[](symbol){nsim}<LEND>[](symbol){simdrift}<LEND>[](symbol){cumulative_e}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){sim}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){sim}<LSEP>[](symbol){lambda}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 14; call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){sim}<LEND>[argument 1; call](){}<LSEP>[](symbol){ifelse}<LSEP>[](symbol){future}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[assign](){<-}<LSEP>[](symbol){simulate.fracdiff}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){nsim}<LSEP>[](symbol){seed}<LSEP>[](symbol){future}<LSEP>[](symbol){bootstrap}<LSEP>[](symbol){innov}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){object}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){future}<LSEP>[litteral](logical){FALSE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){nsim}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nsim}<LSEP>[litteral](real){100.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){x}<LSEP>[litteral](real){0.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){na.ends}<LSEP>[](symbol){x}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){xx}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){meanx}<LEND>[call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){xx}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){xx}<LSEP>[](symbol){meanx}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){undo.na.ends}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){diffseries}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){d}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){arma}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ar}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ma}<LEND>[argument 2; litteral](logical){FALSE}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ar}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ma}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){ysim}<LEND>[call](){}<LSEP>[](symbol){simulate}<LSEP>[](symbol){arma}<LSEP>[](symbol){nsim}<LSEP>[](symbol){seed}<LSEP>[](symbol){future}<LSEP>[](symbol){bootstrap}<LSEP>[](symbol){innov}<LEND>[statement 9; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){unfracdiff}<LSEP>[](symbol){xx}<LSEP>[](symbol){ysim}<LSEP>[](symbol){n}<LSEP>[](symbol){nsim}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){d}<LEND>[](symbol){meanx}<LEND>[assign](){<-}<LSEP>[](symbol){simulate.nnetar}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){nsim}<LSEP>[](symbol){seed}<LSEP>[](symbol){xreg}<LSEP>[](symbol){future}<LSEP>[](symbol){bootstrap}<LSEP>[](symbol){innov}<LSEP>[](symbol){lambda}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){innov}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){exists}<LSEP>[argument 0; litteral](str){.Random.seed}<LSEP>[](symbol){.GlobalEnv}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){runif}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seed}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){RNGstate}<LEND>[call](){}<LSEP>[](symbol){get}<LSEP>[argument 0; litteral](str){.Random.seed}<LSEP>[](symbol){.GlobalEnv}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){R.seed}<LEND>[call](){}<LSEP>[](symbol){get}<LSEP>[argument 0; litteral](str){.Random.seed}<LSEP>[](symbol){.GlobalEnv}<LEND>[statement 1; call](){}<LSEP>[](symbol){set.seed}<LSEP>[](symbol){seed}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){RNGstate}<LEND>[call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){seed}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.list}<LEND>[argument 0; call](){}<LSEP>[](symbol){RNGkind}<LEND>[statement 3; call](){}<LSEP>[](symbol){on.exit}<LEND>[argument 0; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){.Random.seed}<LSEP>[](symbol){R.seed}<LSEP>[](symbol){.GlobalEnv}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nsim}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){innov}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){future}<LSEP>[litteral](logical){FALSE}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){future}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){simulate.nnetar() currently on...}<LEND>[statement 3; control flow](){if}<LSEP>[](symbol){bootstrap}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](str){innovation}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){res}<LEND>[argument 1; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){res}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){scale}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){res}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){scale}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){sample}<LSEP>[](symbol){res}<LSEP>[](symbol){nsim}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){innov}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](str){innovation}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){scale}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){res}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){scale}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){rnorm}<LSEP>[](symbol){nsim}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){sd}<LSEP>[](symbol){res}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){innov}<LEND>[](symbol){nsim}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){e}<LSEP>[](symbol){innov}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){scale}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){e}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){scale}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){isTRUE}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){innov}<LSEP>[argument 1; litteral](integer){0}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){innov}<LSEP>[](symbol){nsim}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Length of innov must be equal ...}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){External regressors were not u...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xreg}<LSEP>[litteral](NULL){NULL}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){No external regressors provided}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){xreg}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Number of external regressors ...}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){xreg}<LEND>[](symbol){nsim}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Number of rows in xreg does no...}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){xx}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){xx}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){scale}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){center}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){scale}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){scale}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalexreg}<LEND>[](symbol){center}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalexreg}<LEND>[](symbol){scale}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){lags}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lags}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){maxlag}<LEND>[call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){lags}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){flag}<LEND>[call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){tail}<LSEP>[](symbol){xx}<LSEP>[](symbol){maxlag}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){path}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){nsim}<LEND>[statement 13; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nsim}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){newdata}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){flag}<LSEP>[](symbol){lags}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xreg}<LSEP>[](symbol){i}<LSEP>[](symbol){}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){newdata}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){I can't simulate when there ar...}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){path}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){predict}<LSEP>[](symbol){newdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){e}<LSEP>[](symbol){i}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){flag}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){path}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){flag}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){maxlag}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){path}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){path}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){scale}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){center}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){path}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){path}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){path}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){path}<LSEP>[](symbol){lambda}<LEND>[statement 17; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){path}<LEND>[assign](){<-}<LSEP>[](symbol){simulate.modelAR}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){nsim}<LSEP>[](symbol){seed}<LSEP>[](symbol){xreg}<LSEP>[](symbol){future}<LSEP>[](symbol){bootstrap}<LSEP>[](symbol){innov}<LSEP>[](symbol){lambda}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){innov}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){exists}<LSEP>[argument 0; litteral](str){.Random.seed}<LSEP>[](symbol){.GlobalEnv}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){runif}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seed}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){RNGstate}<LEND>[call](){}<LSEP>[](symbol){get}<LSEP>[argument 0; litteral](str){.Random.seed}<LSEP>[](symbol){.GlobalEnv}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){R.seed}<LEND>[call](){}<LSEP>[](symbol){get}<LSEP>[argument 0; litteral](str){.Random.seed}<LSEP>[](symbol){.GlobalEnv}<LEND>[statement 1; call](){}<LSEP>[](symbol){set.seed}<LSEP>[](symbol){seed}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){RNGstate}<LEND>[call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){seed}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.list}<LEND>[argument 0; call](){}<LSEP>[](symbol){RNGkind}<LEND>[statement 3; call](){}<LSEP>[](symbol){on.exit}<LEND>[argument 0; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){.Random.seed}<LSEP>[](symbol){R.seed}<LSEP>[](symbol){.GlobalEnv}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nsim}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){innov}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){future}<LSEP>[litteral](logical){FALSE}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){future}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){simulate.nnetar() currently on...}<LEND>[statement 3; control flow](){if}<LSEP>[](symbol){bootstrap}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](str){innovation}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){res}<LEND>[argument 1; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){res}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){scale}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){res}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){scale}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){sample}<LSEP>[](symbol){res}<LSEP>[](symbol){nsim}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){innov}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](str){innovation}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){scale}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){res}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){scale}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){rnorm}<LSEP>[](symbol){nsim}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){sd}<LSEP>[](symbol){res}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){innov}<LEND>[](symbol){nsim}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){e}<LSEP>[](symbol){innov}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){scale}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){e}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){scale}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){isTRUE}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){innov}<LSEP>[argument 1; litteral](integer){0}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){innov}<LSEP>[](symbol){nsim}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Length of innov must be equal ...}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){External regressors were not u...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xreg}<LSEP>[litteral](NULL){NULL}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){No external regressors provided}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){xreg}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Number of external regressors ...}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){xreg}<LEND>[](symbol){nsim}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Number of rows in xreg does no...}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){xx}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){xx}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){scale}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){center}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){scale}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){scale}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalexreg}<LEND>[](symbol){center}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalexreg}<LEND>[](symbol){scale}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){lags}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lags}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){maxlag}<LEND>[call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){lags}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){flag}<LEND>[call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){tail}<LSEP>[](symbol){xx}<LSEP>[](symbol){maxlag}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){path}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){nsim}<LEND>[statement 13; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nsim}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){newdata}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){flag}<LSEP>[](symbol){lags}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xreg}<LSEP>[](symbol){i}<LSEP>[](symbol){}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){newdata}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){I can't simulate when there ar...}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){path}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){predict.FUN}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){newdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){e}<LSEP>[](symbol){i}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){flag}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){path}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){flag}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){maxlag}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){path}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){path}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){scale}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){center}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){path}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){path}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){path}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){path}<LSEP>[](symbol){lambda}<LEND>[statement 17; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){path} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){guer.cv}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){lam}<LSEP>[](symbol){x}<LSEP>[](symbol){nonseasonal.length}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){period}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){nonseasonal.length}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){nobsf}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){nyr}<LEND>[call](){}<LSEP>[](symbol){floor}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){nobsf}<LSEP>[](symbol){period}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){nobst}<LEND>[call](){}<LSEP>[](symbol){floor}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){nyr}<LSEP>[](symbol){period}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){x.mat}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){nobsf}<LSEP>[](symbol){nobst}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){nobsf}<LEND>[](symbol){period}<LSEP>[](symbol){nyr}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){x.mean}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){x.mat}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){mean}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){x.sd}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){x.mat}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){sd}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){x.rat}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){x.sd}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){x.mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){lam}<LEND>[statement 8; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sd}<LSEP>[](symbol){x.rat}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 1; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){x.rat}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){guerrero}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LSEP>[](symbol){upper}<LSEP>[](symbol){nonseasonal.length}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[true branch; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Guerrero's method for selectin...}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){optimize}<LSEP>[](symbol){guer.cv}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){lower}<LSEP>[](symbol){upper}<LEND>[](symbol){x}<LSEP>[](symbol){nonseasonal.length}<LEND>[](symbol){minimum}<LEND>[assign](){<-}<LSEP>[](symbol){bcloglik}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LSEP>[](symbol){upper}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){x must be positive}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){logx}<LEND>[call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){na.omit}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){x}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){xdot}<LEND>[call](){}<LSEP>[](symbol){exp}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){logx}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](str){ts}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){x}<LEND>[](symbol){na.exclude}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){season}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){x}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){x}<LSEP>[](symbol){trend}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){x}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){xqr}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){qr}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[](symbol){lower}<LSEP>[](symbol){upper}<LSEP>[argument 2; litteral](real){0.050000}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){xl}<LEND>[assign](){<-}<LSEP>[](symbol){loglik}<LEND>[call](){}<LSEP>[](symbol){as.vector}<LSEP>[](symbol){lambda}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){xl}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){x}<LEND>[statement 10; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](integer){1}<LSEP>[](symbol){m}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){la}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xl}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){0.020000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xt}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){x}<LSEP>[](symbol){la}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){la}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xt}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){logx}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){la}<LSEP>[](symbol){logx}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){la}<LSEP>[](symbol){logx}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){la}<LSEP>[](symbol){logx}<LEND>[argument 1; litteral](real){4.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){loglik}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){qr.resid}<LSEP>[](symbol){xqr}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){xt}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){xdot}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){la}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 11; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xl}<LEND>[argument 1; call](){}<LSEP>[](symbol){which.max}<LSEP>[](symbol){loglik}<LEND>[assign](){<-}<LSEP>[](symbol){BoxCox.lambda}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){method}<LSEP>[](symbol){lower}<LSEP>[](symbol){upper}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){lower}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){method}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){method}<LSEP>[argument 1; litteral](str){loglik}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){bcloglik}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LSEP>[](symbol){upper}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){guerrero}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LSEP>[](symbol){upper} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){unParameteriseTBATS}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){control}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){use.box.cox}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){use.beta}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){use.damping}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){small.phi}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){gamma.start}<LSEP>[litteral](real){5.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){small.phi}<LSEP>[litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){gamma.start}<LSEP>[litteral](real){4.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){small.phi}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){gamma.start}<LSEP>[litteral](real){3.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){length.gamma}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma.one.vector}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){gamma.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){gamma.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){length.gamma}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){gamma.two.vector}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){gamma.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){length.gamma}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){gamma.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){length.gamma}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){final.gamma.pos}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){gamma.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){length.gamma}<LEND>[argument 1; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma.one.vector}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){gamma.two.vector}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){final.gamma.pos}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){gamma.start}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){final.gamma.pos}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){final.gamma.pos}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){p}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){q}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){final.gamma.pos}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){param.vector}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lambda}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){use.beta}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){use.damping}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){small.phi}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){gamma.start}<LSEP>[litteral](real){4.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){small.phi}<LSEP>[litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){gamma.start}<LSEP>[litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){small.phi}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){gamma.start}<LSEP>[litteral](real){2.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){length.gamma}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma.one.vector}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){gamma.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){gamma.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){length.gamma}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){gamma.two.vector}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){gamma.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){length.gamma}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){gamma.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){length.gamma}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){final.gamma.pos}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){gamma.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){length.gamma}<LEND>[argument 1; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma.one.vector}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){gamma.two.vector}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){final.gamma.pos}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){gamma.start}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){final.gamma.pos}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){final.gamma.pos}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){p}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){q}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){final.gamma.pos}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){param.vector}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){lambda}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){gamma.one.vector}<LSEP>[](symbol){gamma.two.vector}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LEND>[assign](){<-}<LSEP>[](symbol){makeParscale}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){control}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){use.box.cox}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){parscale}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.001000}<LSEP>[argument 1; litteral](real){0.010000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){parscale}<LSEP>[litteral](real){0.010000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){use.beta}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){use.damping}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){parscale}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){parscale}<LSEP>[argument 1; litteral](real){0.010000}<LSEP>[argument 2; litteral](real){0.010000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){parscale}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){parscale}<LSEP>[argument 1; litteral](real){0.010000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){length.gamma}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){parscale}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){parscale}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000010}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){length.gamma}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){q}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){parscale}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){parscale}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.100000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){q}<LEND>[statement 4; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){parscale}<LEND>[assign](){<-}<LSEP>[](symbol){makeParscaleBATS}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){control}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){use.box.cox}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){parscale}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.001000}<LSEP>[argument 1; litteral](real){0.100000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){parscale}<LSEP>[litteral](real){0.100000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){use.beta}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){use.damping}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){parscale}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){parscale}<LSEP>[argument 1; litteral](real){0.010000}<LSEP>[argument 2; litteral](real){0.010000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){parscale}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){parscale}<LSEP>[argument 1; litteral](real){0.010000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){length.gamma}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){parscale}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){parscale}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.010000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){length.gamma}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){q}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){parscale}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){parscale}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.100000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){q}<LEND>[statement 4; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){parscale}<LEND>[assign](){<-}<LSEP>[](symbol){parameterise}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){gamma.v}<LSEP>[](symbol){lambda}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){param.vector}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){lambda}<LSEP>[](symbol){alpha}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){use.box.cox}<LSEP>[litteral](logical){TRUE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){alpha}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){use.box.cox}<LSEP>[litteral](logical){FALSE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){beta.v}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){use.beta}<LSEP>[litteral](logical){TRUE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){small.phi}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){use.damping}<LSEP>[litteral](logical){FALSE}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){small.phi}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){param.vector}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){small.phi}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){use.damping}<LSEP>[litteral](logical){TRUE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){use.damping}<LSEP>[litteral](logical){FALSE}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){param.vector}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){beta.v}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){use.beta}<LSEP>[litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){use.damping}<LSEP>[litteral](logical){FALSE}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){gamma.v}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma.v}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){gamma.v}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){gamma.v}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){param.vector}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){gamma.v}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){length.gamma}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){gamma.v}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){length.gamma}<LSEP>[litteral](real){0.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ar.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){ar.coefs}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ar.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){param.vector}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){ar.coefs}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ar.coefs}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LSEP>[litteral](real){0.000000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ma.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){ma.coefs}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ma.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){param.vector}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){ma.coefs}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ma.coefs}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){q}<LSEP>[litteral](real){0.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){control}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){use.beta}<LSEP>[](symbol){use.box.cox}<LSEP>[](symbol){use.damping}<LSEP>[](symbol){length.gamma}<LSEP>[](symbol){p}<LSEP>[](symbol){q}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){param.vector}<LEND>[](symbol){control}<LEND>[assign](){<-}<LSEP>[](symbol){unParameterise}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){control}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){use.box.cox}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){use.beta}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){use.damping}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){small.phi}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){gamma.start}<LSEP>[litteral](real){5.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){small.phi}<LSEP>[litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){gamma.start}<LSEP>[litteral](real){4.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){small.phi}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){gamma.start}<LSEP>[litteral](real){3.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){length.gamma}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma.vector}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){gamma.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){gamma.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){length.gamma}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){final.gamma.pos}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){gamma.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){length.gamma}<LEND>[argument 1; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma.vector}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){final.gamma.pos}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){gamma.start}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){final.gamma.pos}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){final.gamma.pos}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){p}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){q}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){final.gamma.pos}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){param.vector}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lambda}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){use.beta}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){use.damping}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){small.phi}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){gamma.start}<LSEP>[litteral](real){4.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){small.phi}<LSEP>[litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){gamma.start}<LSEP>[litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){small.phi}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){gamma.start}<LSEP>[litteral](real){2.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){length.gamma}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma.vector}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){gamma.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){gamma.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){length.gamma}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){final.gamma.pos}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){gamma.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){length.gamma}<LEND>[argument 1; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma.vector}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){final.gamma.pos}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){gamma.start}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){final.gamma.pos}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){final.gamma.pos}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){p}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){q}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){final.gamma.pos}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){control}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){param.vector}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){lambda}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){gamma.vector}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){testaccuracy}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){f}<LSEP>[](symbol){x}<LSEP>[](symbol){test}<LSEP>[](symbol){d}<LSEP>[](symbol){D}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){dx}<LEND>[call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){f}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.data.frame}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){responsevar}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){formula}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){f}<LSEP>[](symbol){model}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[](symbol){responsevar}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){}<LSEP>[](symbol){responsevar}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){I can't figure out what data t...}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.list}<LSEP>[](symbol){f}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){f}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){f}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){f}<LSEP>[](symbol){mean}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Unknown list structure}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.ts}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.ts}<LSEP>[](symbol){f}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tspf}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){f}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){start}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspf}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){end}<LEND>[call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspf}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){start}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){start}<LSEP>[](symbol){end}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){end}<LEND>[call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){start}<LSEP>[](symbol){end}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){f}<LEND>[call](){}<LSEP>[](symbol){window}<LSEP>[](symbol){f}<LSEP>[](symbol){start}<LSEP>[](symbol){end}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){window}<LSEP>[](symbol){x}<LSEP>[](symbol){start}<LSEP>[](symbol){end}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){test}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){test}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){test}<LEND>[](symbol){n}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){test elements must be within s...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>=}<LSEP>[](symbol){test}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){test}<LSEP>[](symbol){n}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){ff}<LSEP>[](symbol){f}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){xx}<LSEP>[](symbol){x}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){f}<LEND>[](symbol){n}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Not enough forecasts. Check th...}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){error}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ff}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[](symbol){test}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){pe}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){error}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xx}<LSEP>[](symbol){test}<LEND>[argument 1; litteral](real){100.000000}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){me}<LEND>[call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){error}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){mse}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){error}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){mae}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){error}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){mape}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){pe}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){mpe}<LEND>[call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){pe}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){me}<LEND>[argument 1; call](){}<LSEP>[](symbol){sqrt}<LSEP>[](symbol){mse}<LEND>[](symbol){mae}<LSEP>[](symbol){mpe}<LSEP>[](symbol){mape}<LEND>[statement 17; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){ME}<LSEP>[argument 1; litteral](str){RMSE}<LSEP>[argument 2; litteral](str){MAE}<LSEP>[argument 3; litteral](str){MPE}<LSEP>[argument 4; litteral](str){MAPE}<LEND>[statement 18; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){dx}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tspdx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){dx}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){tspdx}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){D}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nsd}<LEND>[call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){dx}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspdx}<LSEP>[argument 1; litteral](integer){3}<LEND>[](symbol){D}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nsd}<LSEP>[](symbol){dx}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nd}<LEND>[call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){nsd}<LSEP>[](symbol){d}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nd}<LSEP>[](symbol){nsd}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){scale}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){nd}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){scale}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){dx}<LEND>[argument 1; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){dx}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){mase}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){error}<LSEP>[](symbol){scale}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){out}<LSEP>[](symbol){mase}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){out}<LEND>[litteral](str){MASE}<LEND>[statement 19; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fpe}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ff}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){test}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ape}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){test}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){theil}<LEND>[call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){fpe}<LSEP>[](symbol){ape}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){ape}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){error}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){r1}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){acf}<LSEP>[](symbol){error}<LSEP>[argument 1; litteral](logical){FALSE}<LSEP>[argument 2; litteral](real){2.000000}<LSEP>[](symbol){na.pass}<LEND>[](symbol){acf}<LEND>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){r1}<LSEP>[litteral](logical){NA}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){nj}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){out}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){out}<LSEP>[](symbol){r1}<LSEP>[](symbol){theil}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){nj}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){ACF1}<LSEP>[argument 1; litteral](str){Theil's U}<LEND>[statement 20; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){out}<LEND>[assign](){<-}<LSEP>[](symbol){trainingaccuracy}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){f}<LSEP>[](symbol){test}<LSEP>[](symbol){d}<LSEP>[](symbol){D}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){dx}<LEND>[call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){f}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){splineforecast}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){f}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){f}<LSEP>[](symbol){onestepf}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){f}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){dx}<LSEP>[](symbol){fits}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){res}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){test}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){test}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){test}<LEND>[](symbol){n}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){test elements must be within s...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>=}<LSEP>[](symbol){test}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){test}<LSEP>[](symbol){n}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){tspdx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){dx}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){res}<LSEP>[](symbol){test}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){dx}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dx}<LSEP>[](symbol){test}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){pe}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){res}<LSEP>[](symbol){dx}<LEND>[argument 1; litteral](real){100.000000}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){me}<LEND>[call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){res}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){mse}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){res}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){mae}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){res}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){mape}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){pe}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){mpe}<LEND>[call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){pe}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){me}<LEND>[argument 1; call](){}<LSEP>[](symbol){sqrt}<LSEP>[](symbol){mse}<LEND>[](symbol){mae}<LSEP>[](symbol){mpe}<LSEP>[](symbol){mape}<LEND>[statement 16; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){ME}<LSEP>[argument 1; litteral](str){RMSE}<LSEP>[argument 2; litteral](str){MAE}<LSEP>[argument 3; litteral](str){MPE}<LSEP>[argument 4; litteral](str){MAPE}<LEND>[statement 17; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){dx}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){tspdx}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){D}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nsd}<LEND>[call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){dx}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspdx}<LSEP>[argument 1; litteral](integer){3}<LEND>[](symbol){D}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nsd}<LSEP>[](symbol){dx}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nd}<LEND>[call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){nsd}<LSEP>[](symbol){d}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nd}<LSEP>[](symbol){nsd}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){scale}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){nd}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){scale}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){dx}<LEND>[argument 1; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){dx}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){mase}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){res}<LSEP>[](symbol){scale}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){out}<LSEP>[](symbol){mase}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){out}<LEND>[litteral](str){MASE}<LEND>[statement 18; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){tspdx}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){res}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){r1}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){acf}<LSEP>[](symbol){res}<LSEP>[argument 1; litteral](logical){FALSE}<LSEP>[argument 2; litteral](real){2.000000}<LSEP>[](symbol){na.pass}<LEND>[](symbol){acf}<LEND>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){r1}<LSEP>[litteral](logical){NA}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){nj}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){out}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){out}<LSEP>[](symbol){r1}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){nj}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){ACF1}<LEND>[statement 19; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){out}<LEND>[assign](){<-}<LSEP>[](symbol){accuracy}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){UseMethod}<LSEP>[argument 0; litteral](str){accuracy}<LEND>[assign](){<-}<LSEP>[](symbol){accuracy.default}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LSEP>[](symbol){test}<LSEP>[](symbol){d}<LSEP>[](symbol){D}<LSEP>[](symbol){f}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){f}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Using `f` as the argument for ...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){object}<LSEP>[](symbol){f}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){ARFIMA}<LSEP>[argument 1; litteral](str){mforecast}<LSEP>[argument 2; litteral](str){forecast}<LSEP>[argument 3; litteral](str){ts}<LSEP>[argument 4; litteral](str){integer}<LSEP>[argument 5; litteral](str){numeric}<LSEP>[argument 6; litteral](str){Arima}<LSEP>[argument 7; litteral](str){ets}<LSEP>[argument 8; litteral](str){lm}<LSEP>[argument 9; litteral](str){bats}<LSEP>[argument 10; litteral](str){tbats}<LSEP>[argument 11; litteral](str){nnetar}<LSEP>[argument 12; litteral](str){stlm}<LSEP>[argument 13; litteral](str){baggedModel}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){First argument should be a for...}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){mforecast}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy.mforecast}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LSEP>[](symbol){test}<LSEP>[](symbol){d}<LSEP>[](symbol){D}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){trainset}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.list}<LSEP>[](symbol){object}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){testset}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){x}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LSEP>[](symbol){testset}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){test}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){trainset}<LSEP>[litteral](logical){FALSE}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){trainset}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){testset}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Unable to compute forecast acc...}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){D}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){d}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){testset}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){d}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){D}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[false branch; control flow](){if}<LSEP>[](symbol){trainset}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){mean}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){d}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){mean}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){D}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){mean}<LEND>[argument 1; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){d}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](str){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){D}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](str){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){d}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){object}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){D}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){object}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 8; control flow](){if}<LSEP>[](symbol){trainset}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){trainout}<LEND>[call](){}<LSEP>[](symbol){trainingaccuracy}<LSEP>[](symbol){object}<LSEP>[](symbol){test}<LSEP>[](symbol){d}<LSEP>[](symbol){D}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){trainnames}<LEND>[call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){trainout}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){trainnames}<LSEP>[litteral](NULL){NULL}<LEND>[statement 9; control flow](){if}<LSEP>[](symbol){testset}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){testout}<LEND>[call](){}<LSEP>[](symbol){testaccuracy}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LSEP>[](symbol){test}<LSEP>[](symbol){d}<LSEP>[](symbol){D}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){testnames}<LEND>[call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){testout}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){testnames}<LSEP>[litteral](NULL){NULL}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){outnames}<LEND>[call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){trainnames}<LSEP>[](symbol){testnames}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){outnames}<LEND>[statement 12; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){out}<LEND>[](symbol){outnames}<LEND>[statement 13; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Training set}<LSEP>[argument 1; litteral](str){Test set}<LEND>[statement 14; control flow](){if}<LSEP>[](symbol){trainset}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){out}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){trainout}<LEND>[](symbol){trainout}<LEND>[statement 15; control flow](){if}<LSEP>[](symbol){testset}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){out}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){testout}<LEND>[](symbol){testout}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){testset}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){out}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[statement 17; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){trainset}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){out}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[statement 18; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){out}<LEND>[assign](){<-}<LSEP>[](symbol){accuracy.mforecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LSEP>[](symbol){test}<LSEP>[](symbol){d}<LSEP>[](symbol){D}<LSEP>[](symbol){f}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){f}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Using `f` as the argument for ...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){object}<LSEP>[](symbol){f}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){out}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){nox}<LEND>[call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){x}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){i}<LSEP>[litteral](real){1.000000}<LEND>[statement 4; control flow](){for}<LSEP>[](symbol){fcast}<LEND>[range; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){forecast}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){nox}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out1}<LEND>[call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){fcast}<LSEP>[](symbol){test}<LSEP>[](symbol){d}<LSEP>[](symbol){D}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out1}<LEND>[call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){fcast}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[](symbol){test}<LSEP>[](symbol){d}<LSEP>[](symbol){D}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){out1}<LEND>[call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){series}<LEND>[argument 1; call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){out1}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){out}<LSEP>[](symbol){out1}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 5; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){out} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){checkresiduals}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){lag}<LSEP>[](symbol){df}<LSEP>[](symbol){test}<LSEP>[](symbol){plot}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){showtest}<LSEP>[litteral](logical){TRUE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){test}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){lm}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){test}<LSEP>[litteral](str){BG}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){test}<LSEP>[litteral](str){LB}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){showtest}<LSEP>[litteral](logical){TRUE}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){test}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){LB}<LSEP>[argument 1; litteral](str){BG}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){showtest}<LSEP>[litteral](logical){TRUE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){showtest}<LSEP>[litteral](logical){FALSE}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){ts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){numeric}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){residuals}<LSEP>[](symbol){object}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](str){Missing}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){residuals}<LEND>[call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){object}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){residuals}<LEND>[argument 1; litteral](integer){0}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){No residuals found}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){ar}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){AR(}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){order}<LEND>[argument 2; litteral](str){)}<LSEP>[argument 3; litteral](str){}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){method}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){method}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){HoltWinters}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){method}<LSEP>[litteral](str){HoltWinters}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){StructTS}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){method}<LSEP>[litteral](str){StructTS}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){object}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){method}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){method}<LSEP>[litteral](str){Missing}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){method}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){base}<LSEP>[](symbol){nchar}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){method}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){50.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){method}<LSEP>[litteral](str){Missing}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){method}<LSEP>[argument 1; litteral](str){Missing}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){main}<LSEP>[litteral](str){Residuals}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){main}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Residuals from}<LSEP>[](symbol){method}<LEND>[statement 6; control flow](){if}<LSEP>[](symbol){plot}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggtsdisplay}<LSEP>[](symbol){residuals}<LSEP>[argument 1; litteral](str){histogram}<LSEP>[](symbol){main}<LSEP>[](symbol){...}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){forecast}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){showtest}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){invisible}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){residuals}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){STL \\+ }<LSEP>[](symbol){method}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){The fitted degrees of freedom ...}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){df}<LEND>[call](){}<LSEP>[](symbol){modeldf}<LSEP>[](symbol){object}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){lag}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lag}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){freq}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){freq}<LEND>[argument 2; litteral](real){10.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lag}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){lag}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){residuals}<LEND>[argument 1; litteral](real){5.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){lag}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){df}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[](symbol){lag}<LEND>[statement 13; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){df}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){test}<LSEP>[argument 1; litteral](str){BG}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){BGtest}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){lmtest}<LSEP>[](symbol){bgtest}<LEND>[](symbol){object}<LSEP>[](symbol){lag}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){BGtest}<LSEP>[](symbol){data.name}<LEND>[](symbol){main}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){BGtest}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){LBtest}<LEND>[call](){}<LSEP>[](symbol){Box.test}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){zoo}<LSEP>[](symbol){na.approx}<LEND>[](symbol){residuals}<LEND>[](symbol){df}<LSEP>[](symbol){lag}<LSEP>[argument 3; litteral](str){Ljung}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){LBtest}<LSEP>[](symbol){method}<LEND>[litteral](str){Ljung-Box test}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){LBtest}<LSEP>[](symbol){data.name}<LEND>[](symbol){main}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){LBtest}<LSEP>[](symbol){statistic}<LEND>[litteral](str){Q*}<LEND>[statement 4; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){LBtest}<LEND>[statement 5; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Model df: }<LSEP>[](symbol){df}<LSEP>[argument 2; litteral](str){. Total lags used: }<LSEP>[](symbol){lag}<LSEP>[argument 4; litteral](str){\n\n}<LSEP>[argument 5; litteral](str){}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){invisible}<LSEP>[](symbol){LBtest}<LEND>[assign](){<-}<LSEP>[](symbol){modeldf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){UseMethod}<LSEP>[argument 0; litteral](str){modeldf}<LEND>[assign](){<-}<LSEP>[](symbol){modeldf.default}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Could not find appropriate deg...}<LEND>[statement 1; litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[](symbol){modeldf.ets}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){par}<LEND>[assign](){<-}<LSEP>[](symbol){modeldf.Arima}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coef}<LEND>[assign](){<-}<LSEP>[](symbol){modeldf.bats}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){parameters}<LEND>[](symbol){vect}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){seed.states}<LEND>[assign](){<-}<LSEP>[](symbol){modeldf.lm}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coefficients}<LEND>[assign](){<-}<LSEP>[](symbol){modeldf.lagwalk}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){par}<LEND>[](symbol){includedrift}<LEND>[assign](){<-}<LSEP>[](symbol){modeldf.meanf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; litteral](real){1.000000} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){make.Sigma}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){n}<LSEP>[](symbol){n0}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nn}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){n}<LSEP>[](symbol){n0}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){Sigma}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){nn}<LSEP>[](symbol){nn}<LEND>[statement 2; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nn}<LEND>[body; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Sigma}<LSEP>[](symbol){i}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){i}<LSEP>[](symbol){nn}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Sigma}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){i}<LSEP>[](symbol){nn}<LEND>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){i}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){i}<LSEP>[](symbol){nn}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){6.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){Sigma}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[assign](){<-}<LSEP>[](symbol){spline.matrices}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){n}<LSEP>[](symbol){beta}<LSEP>[](symbol){cc}<LSEP>[](symbol){n0}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nn}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){n}<LSEP>[](symbol){n0}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){Sigma}<LEND>[call](){}<LSEP>[](symbol){make.Sigma}<LSEP>[](symbol){n}<LSEP>[](symbol){n0}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){s}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nn}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nn}<LEND>[](symbol){n}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){Omega}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){cc}<LEND>[argument 1; call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){s}<LEND>[argument 1; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){s}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){Sigma}<LSEP>[](symbol){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){diag}<LSEP>[](symbol){nn}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){max.Omega}<LEND>[call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){Omega}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){inv.Omega}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){solve}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){Omega}<LSEP>[](symbol){max.Omega}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){max.Omega}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){P}<LEND>[call](){}<LSEP>[](symbol){chol}<LSEP>[](symbol){inv.Omega}<LEND>[statement 7; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){s}<LSEP>[](symbol){Sigma}<LSEP>[](symbol){Omega}<LSEP>[](symbol){inv.Omega}<LSEP>[](symbol){P}<LEND>[assign](){<-}<LSEP>[](symbol){spline.loglik}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){beta}<LSEP>[](symbol){y}<LSEP>[](symbol){cc}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){mat}<LEND>[call](){}<LSEP>[](symbol){spline.matrices}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){beta}<LSEP>[argument 1; litteral](real){1000000.000000}<LEND>[](symbol){cc}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){y.star}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){mat}<LSEP>[](symbol){P}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){y}<LEND>[statement 3; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){det}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){mat}<LSEP>[](symbol){P}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.500000}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){y.star}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){splinef}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){method}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){method}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.ts}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){origx}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){method}<LSEP>[argument 1; litteral](str){mle}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){100.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){99.000000}<LEND>[](symbol){n}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta.est}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){optimize}<LSEP>[](symbol){spline.loglik}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000001}<LSEP>[argument 1; litteral](real){10000000.000000}<LEND>[](symbol){xx}<LEND>[](symbol){minimum}<LEND>[argument 1; litteral](real){1000000.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){r}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){256.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){smooth.spline}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[](symbol){x}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[](symbol){lambda}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){lss}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){beta.est}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){3.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){spar}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){lss}<LSEP>[](symbol){r}<LEND>[argument 1; call](){}<LSEP>[](symbol){log}<LSEP>[argument 0; litteral](real){256.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){3.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){splinefit}<LEND>[call](){}<LSEP>[](symbol){smooth.spline}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[](symbol){x}<LSEP>[](symbol){spar}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){sfits}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){splinefit}<LSEP>[](symbol){y}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){splinefit}<LEND>[call](){}<LSEP>[](symbol){smooth.spline}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[](symbol){x}<LSEP>[argument 2; litteral](logical){FALSE}<LSEP>[argument 3; litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){sfits}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){splinefit}<LSEP>[](symbol){y}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){beta.est}<LEND>[call](){}<LSEP>[](symbol){pmax}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){splinefit}<LSEP>[](symbol){lambda}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){mat}<LEND>[call](){}<LSEP>[](symbol){spline.matrices}<LSEP>[](symbol){n}<LSEP>[](symbol){beta.est}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){newmat}<LEND>[call](){}<LSEP>[](symbol){spline.matrices}<LSEP>[](symbol){n}<LSEP>[](symbol){beta.est}<LSEP>[](symbol){h}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){yfit}<LEND>[assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){n}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1000.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Series too long to compute tra...}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){U}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){mat}<LSEP>[](symbol){Omega}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){i}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){Oinv}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){solve}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){mat}<LSEP>[](symbol){Omega}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){i}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1000000.000000}<LEND>[argument 1; litteral](real){1000000.000000}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){yfit}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){U}<LEND>[](symbol){Oinv}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){i}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){sd}<LEND>[call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){mat}<LSEP>[](symbol){Omega}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){U}<LEND>[](symbol){Oinv}<LEND>[](symbol){U}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){e}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){yfit}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){sd}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){sigma2}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){e}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){U}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){newmat}<LSEP>[](symbol){Omega}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){Omega0}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){newmat}<LSEP>[](symbol){Omega}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){Yhat}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){U}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){mat}<LSEP>[](symbol){inv.Omega}<LEND>[](symbol){x}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){sd}<LEND>[call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){sigma2}<LEND>[argument 1; call](){}<LSEP>[](symbol){diag}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){Omega0}<LEND>[argument 1; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){U}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){mat}<LSEP>[](symbol){inv.Omega}<LEND>[](symbol){U}<LEND>[statement 15; control flow](){if}<LSEP>[](symbol){fan}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){51.000000}<LSEP>[argument 1; litteral](real){99.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){100.000000}<LSEP>[](symbol){level}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){99.990000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Confidence limit out of range}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){nconf}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){level}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){lower}<LEND>[assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){h}<LSEP>[](symbol){nconf}<LEND>[statement 18; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nconf}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){conf.factor}<LEND>[call](){}<LSEP>[](symbol){qnorm}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.005000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){level}<LSEP>[](symbol){i}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Yhat}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){conf.factor}<LSEP>[](symbol){sd}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){Yhat}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){conf.factor}<LSEP>[](symbol){sd}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){lower}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){freq}<LEND>[](symbol){freq}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){upper}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){freq}<LEND>[](symbol){freq}<LEND>[statement 21; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){x}<LSEP>[](symbol){yfit}<LEND>[argument 1; call](){}<LSEP>[](symbol){start}<LSEP>[](symbol){x}<LEND>[](symbol){freq}<LEND>[statement 22; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){Yhat}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){Yhat}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[argument 3; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){level}<LSEP>[](symbol){upper}<LSEP>[](symbol){lower}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){upper}<LSEP>[](symbol){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){lower}<LSEP>[](symbol){lambda}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){yfit}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){yfit}<LSEP>[](symbol){lambda}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){sfits}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){sfits}<LSEP>[](symbol){lambda}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){x}<LSEP>[](symbol){origx}<LEND>[statement 23; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](str){Cubic Smoothing Spline}<LSEP>[](symbol){level}<LSEP>[](symbol){x}<LEND>[argument 3; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[argument 4; call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){Yhat}<LSEP>[](symbol){freq}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){freq}<LEND>[argument 5; call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){upper}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){freq}<LEND>[](symbol){freq}<LEND>[argument 6; call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){lower}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){freq}<LEND>[](symbol){freq}<LEND>[argument 7; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){beta.est}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){match.call}<LEND>[argument 8; call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){sfits}<LEND>[argument 1; call](){}<LSEP>[](symbol){start}<LSEP>[](symbol){x}<LEND>[](symbol){freq}<LEND>[](symbol){res}<LEND>[argument 10; call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){e}<LEND>[argument 1; call](){}<LSEP>[](symbol){start}<LSEP>[](symbol){x}<LEND>[](symbol){freq}<LEND>[argument 11; call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){yfit}<LEND>[argument 1; call](){}<LSEP>[](symbol){start}<LSEP>[](symbol){x}<LEND>[](symbol){freq}<LEND>[](symbol){lambda}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){splineforecast}<LSEP>[argument 1; litteral](str){forecast}<LEND>[assign](){<-}<LSEP>[](symbol){plot.splineforecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){fitcol}<LSEP>[](symbol){type}<LSEP>[](symbol){pch}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){plot.forecast}<LSEP>[](symbol){x}<LSEP>[](symbol){type}<LSEP>[](symbol){pch}<LSEP>[](symbol){...}<LEND>[statement 1; call](){}<LSEP>[](symbol){lines}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){fitted}<LEND>[](symbol){fitcol}<LEND>[assign](){<-}<LSEP>[](symbol){is.splineforecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){splineforecast} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){mstl}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LSEP>[](symbol){iterate}<LSEP>[](symbol){s.window}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){origx}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){msts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){msts}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){x}<LEND>[](symbol){msts}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){>=}<LSEP>[](symbol){msts}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Dropping seasonal components w...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){msts}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){msts}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){msts}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){msts}<LSEP>[](symbol){x}<LSEP>[](symbol){msts}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){msts}<LEND>[call](){}<LSEP>[](symbol){sort}<LSEP>[](symbol){msts}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){ts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){msts}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){iterate}<LSEP>[litteral](integer){1}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){msts}<LSEP>[litteral](integer){1}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){1}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){anyNA}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){na.interp}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){tt}<LEND>[call](){}<LSEP>[](symbol){seq_len}<LSEP>[](symbol){n}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){msts}<LSEP>[argument 1; litteral](integer){1}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seas}<LEND>[call](){}<LSEP>[](symbol){as.list}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){msts}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){deseas}<LSEP>[](symbol){x}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){s.window}<LEND>[argument 1; litteral](integer){1}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){s.window}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){s.window}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){msts}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){iterate}<LEND>[call](){}<LSEP>[](symbol){pmax}<LSEP>[argument 0; litteral](integer){1}<LSEP>[](symbol){iterate}<LEND>[statement 4; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){seq_len}<LSEP>[](symbol){iterate}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){seq_along}<LSEP>[](symbol){msts}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){deseas}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){deseas}<LEND>[argument 1; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){seas}<LSEP>[](symbol){i}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){stl}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){deseas}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){msts}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){s.window}<LSEP>[](symbol){i}<LEND>[](symbol){...}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){seas}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){fit}<LEND>[](symbol){msts}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attributes}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){seas}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){x}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){deseas}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){deseas}<LEND>[argument 1; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){seas}<LSEP>[](symbol){i}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){trend}<LEND>[call](){}<LSEP>[](symbol){msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){trendcycle}<LSEP>[](symbol){fit}<LEND>[](symbol){msts}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){msts}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){deseas}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){trend}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){supsmu}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq_len}<LSEP>[](symbol){n}<LEND>[](symbol){x}<LEND>[](symbol){y}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){trend}<LEND>[call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){x}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){deseas}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){origx}<LEND>[litteral](logical){NA}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){remainder}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){deseas}<LSEP>[](symbol){trend}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){output}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){origx}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){trend}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){msts}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){seq_along}<LSEP>[](symbol){msts}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){output}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){output}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){seas}<LSEP>[](symbol){i}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){output}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){output}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){remainder}<LEND>[statement 14; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){output}<LEND>[call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){V}<LEND>[argument 1; call](){}<LSEP>[](symbol){seq}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){output}<LEND>[statement 15; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){output}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](integer){1}<LSEP>[argument 1; litteral](integer){2}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Data}<LSEP>[argument 1; litteral](str){Trend}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){msts}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){output}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](integer){2}<LEND>[argument 1; call](){}<LSEP>[](symbol){seq_along}<LSEP>[](symbol){msts}<LEND>[call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){Seasonal}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LSEP>[](symbol){msts}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 17; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){output}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){output}<LEND>[litteral](str){Remainder}<LEND>[statement 18; assign](){<-}<LSEP>[](symbol){output}<LEND>[call](){}<LSEP>[](symbol){copy_msts}<LSEP>[](symbol){origx}<LSEP>[](symbol){output}<LEND>[statement 19; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){output}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){mstl}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){output}<LEND>[statement 20; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){output}<LEND>[assign](){<-}<LSEP>[](symbol){autoplot.mstl}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){autoplot.mts}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](str){}<LSEP>[](symbol){...}<LEND>[assign](){<-}<LSEP>[](symbol){forecast.stl}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){method}<LSEP>[](symbol){etsmodel}<LSEP>[](symbol){forecastfunction}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){xreg}<LSEP>[](symbol){newxreg}<LSEP>[](symbol){allow.multiplicative.trend}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){method}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){forecastfunction}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){method}<LSEP>[argument 1; litteral](str){arima}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){newxreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){xreg and newxreg arguments can...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){method}<LSEP>[argument 1; litteral](str){ets}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){substr}<LSEP>[](symbol){etsmodel}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){The ETS model must be non-seas...}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){substr}<LSEP>[](symbol){etsmodel}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[litteral](str){N}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){forecastfunction}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){ets}<LEND>[argument 0; call](){}<LSEP>[](symbol){na.interp}<LSEP>[](symbol){x}<LEND>[](symbol){etsmodel}<LSEP>[](symbol){allow.multiplicative.trend}<LSEP>[](symbol){...}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){method}<LSEP>[argument 1; litteral](str){arima}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){forecastfunction}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){auto.arima}<LSEP>[](symbol){x}<LSEP>[](symbol){xreg}<LSEP>[argument 2; litteral](logical){FALSE}<LSEP>[](symbol){...}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){newxreg}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){method}<LSEP>[argument 1; litteral](str){naive}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){forecastfunction}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){rwf}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){FALSE}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){method}<LSEP>[argument 1; litteral](str){rwdrift}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){forecastfunction}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){rwf}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){TRUE}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){...}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){newxreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){xreg and newxreg arguments mus...}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){newxreg}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){newxreg}<LEND>[](symbol){h}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){newxreg should have the same n...}<LEND>[statement 4; control flow](){if}<LSEP>[](symbol){fan}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){51.000000}<LSEP>[argument 1; litteral](real){99.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){mstl}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasoncolumns}<LEND>[call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){Season}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){object}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){nseasons}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){seasoncolumns}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){seascomp}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){nseasons}<LSEP>[](symbol){h}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){sub}<LSEP>[argument 0; litteral](str){Seasonal}<LSEP>[argument 1; litteral](str){}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){object}<LEND>[](symbol){seasoncolumns}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){object}<LEND>[statement 5; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){seq}<LSEP>[](symbol){nseasons}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){mp}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){i}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){colname}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasoncolumns}<LSEP>[](symbol){i}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seascomp}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq_len}<LSEP>[](symbol){mp}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){colname}<LEND>[argument 1; call](){}<LSEP>[](symbol){trunc}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){mp}<LEND>[argument 1; call](){}<LSEP>[](symbol){seq_len}<LSEP>[](symbol){h}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){lastseas}<LEND>[call](){}<LSEP>[](symbol){rowSums}<LSEP>[](symbol){seascomp}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){xdata}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){object}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](str){Data}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){seascols}<LEND>[call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){Seasonal}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){object}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){allseas}<LEND>[call](){}<LSEP>[](symbol){rowSumsTS}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){object}<LSEP>[](symbol){}<LSEP>[](symbol){seascols}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){series}<LSEP>[litteral](NULL){NULL}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){stl}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){time.series}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){NROW}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){time.series}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){lastseas}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){trunc}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){m}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){xdata}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rowSums}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){time.series}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){xdata}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){time.series}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){allseas}<LEND>[call](){}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){object}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){call}<LEND>[](symbol){x}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Unknown object class}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){x.sa}<LEND>[call](){}<LSEP>[](symbol){seasadj}<LSEP>[](symbol){object}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecastfunction}<LSEP>[](symbol){x.sa}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){...}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){mean}<LEND>[call](){}<LSEP>[](symbol){future_msts}<LSEP>[](symbol){xdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){mean}<LEND>[](symbol){lastseas}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){future_msts}<LSEP>[](symbol){xdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){upper}<LEND>[](symbol){lastseas}<LEND>[statement 10; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){future_msts}<LSEP>[](symbol){xdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lower}<LEND>[](symbol){lastseas}<LEND>[statement 11; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){x}<LEND>[](symbol){xdata}<LEND>[statement 12; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){STL + }<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){method}<LEND>[statement 13; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){series}<LEND>[](symbol){series}<LEND>[statement 14; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){copy_msts}<LSEP>[](symbol){xdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){fcast}<LEND>[](symbol){allseas}<LEND>[statement 15; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){residuals}<LEND>[call](){}<LSEP>[](symbol){copy_msts}<LSEP>[](symbol){xdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){fitted}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){x}<LEND>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){fitted}<LEND>[](symbol){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){mean}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){mean}<LEND>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){fcast}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lower}<LEND>[](symbol){lambda}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){upper}<LEND>[](symbol){lambda}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](str){biasadj}<LEND>[](symbol){biasadj}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lambda}<LEND>[](symbol){lambda}<LEND>[statement 17; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fcast}<LEND>[assign](){<-}<LSEP>[](symbol){forecast.mstl}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){method}<LSEP>[](symbol){etsmodel}<LSEP>[](symbol){forecastfunction}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){xreg}<LSEP>[](symbol){newxreg}<LSEP>[](symbol){allow.multiplicative.trend}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){forecast.stl}<LSEP>[](symbol){object}<LSEP>[](symbol){method}<LSEP>[](symbol){etsmodel}<LSEP>[](symbol){forecastfunction}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){xreg}<LSEP>[](symbol){newxreg}<LSEP>[](symbol){allow.multiplicative.trend}<LSEP>[](symbol){...}<LEND>[assign](){<-}<LSEP>[](symbol){rowSumsTS}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){mts}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){the_tsp}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){mts}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ret}<LEND>[call](){}<LSEP>[](symbol){rowSums}<LSEP>[](symbol){mts}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){the_tsp}<LEND>[true branch; block](){}<LSEP>[](symbol){ret}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){ret}<LEND>[](symbol){the_tsp}<LEND>[statement 1; call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){ret}<LEND>[assign](){<-}<LSEP>[](symbol){stlm}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){s.window}<LSEP>[](symbol){robust}<LSEP>[](symbol){method}<LSEP>[](symbol){modelfunction}<LSEP>[](symbol){model}<LSEP>[](symbol){etsmodel}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){xreg}<LSEP>[](symbol){allow.multiplicative.trend}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){method}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){1}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){y must be a univariate time se...}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){1}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](integer){1}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){tspx}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){y is not a seasonal ts object}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](integer){1}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){y is not a seasonal ts object}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){origx}<LSEP>[](symbol){x}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){stld}<LEND>[call](){}<LSEP>[](symbol){mstl}<LSEP>[](symbol){x}<LSEP>[](symbol){s.window}<LSEP>[](symbol){robust}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){model}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){inherits}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){model}<LEND>[argument 1; litteral](str){ets}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){modelfunction}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){model}<LEND>[argument 2; litteral](logical){TRUE}<LSEP>[](symbol){...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){inherits}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){model}<LEND>[argument 1; litteral](str){Arima}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){modelfunction}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){model}<LEND>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){modelfunction}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){model}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){formals}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){modelfunction}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){modelfunction}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){modelfunction}<LEND>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){model}<LEND>[](symbol){...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){modelfunction}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Unknown model type}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){modelfunction}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){method}<LSEP>[argument 1; litteral](str){arima}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){xreg arguments can only be use...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){method}<LSEP>[argument 1; litteral](str){ets}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){substr}<LSEP>[](symbol){etsmodel}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){The ETS model must be non-seas...}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){substr}<LSEP>[](symbol){etsmodel}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[litteral](str){N}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){modelfunction}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){x}<LSEP>[](symbol){etsmodel}<LSEP>[](symbol){allow.multiplicative.trend}<LSEP>[](symbol){...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){method}<LSEP>[argument 1; litteral](str){arima}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){modelfunction}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){auto.arima}<LSEP>[](symbol){x}<LSEP>[](symbol){xreg}<LSEP>[argument 2; litteral](logical){FALSE}<LSEP>[](symbol){...}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){x.sa}<LEND>[call](){}<LSEP>[](symbol){seasadj}<LSEP>[](symbol){stld}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){modelfunction}<LSEP>[](symbol){x.sa}<LSEP>[](symbol){...}<LEND>[statement 10; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[](symbol){x.sa}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){seascols}<LEND>[call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){Seasonal}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){stld}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){allseas}<LEND>[call](){}<LSEP>[](symbol){rowSumsTS}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){stld}<LSEP>[](symbol){}<LSEP>[](symbol){seascols}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){fit}<LEND>[](symbol){allseas}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){fit}<LEND>[statement 15; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){fits}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[argument 3; call](){}<LSEP>[](symbol){var}<LSEP>[](symbol){res}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](str){biasadj}<LEND>[](symbol){biasadj}<LEND>[statement 16; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){stld}<LSEP>[](symbol){fit}<LSEP>[](symbol){modelfunction}<LSEP>[](symbol){lambda}<LSEP>[](symbol){origx}<LEND>[argument 5; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[argument 6; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){origx}<LEND>[](symbol){fits}<LSEP>[](symbol){res}<LEND>[argument 1; litteral](str){stlm}<LEND>[assign](){<-}<LSEP>[](symbol){forecast.stlm}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){newxreg}<LSEP>[](symbol){allow.multiplicative.trend}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){newxreg}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){nrow}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){newxreg}<LEND>[](symbol){h}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){newxreg should have the same n...}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){fan}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){51.000000}<LSEP>[argument 1; litteral](real){99.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){Arima}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){newxreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){newxreg}<LSEP>[](symbol){...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){ets}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){allow.multiplicative.trend}<LSEP>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){...}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){h}<LEND>[call](){}<LSEP>[](symbol){NROW}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){mean}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){attributes}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){stl}<LEND>[](symbol){msts}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LEND>[call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){stl}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){seascomp}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){seasonal.periods}<LEND>[](symbol){h}<LEND>[statement 7; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){seq_along}<LSEP>[](symbol){seasonal.periods}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){mp}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){i}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){NROW}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){stl}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){colname}<LEND>[call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){Seasonal}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LSEP>[](symbol){mp}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seascomp}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){stl}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq_len}<LSEP>[](symbol){mp}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){colname}<LEND>[argument 1; call](){}<LSEP>[](symbol){trunc}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){mp}<LEND>[argument 1; call](){}<LSEP>[](symbol){seq_len}<LSEP>[](symbol){h}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){lastseas}<LEND>[call](){}<LSEP>[](symbol){rowSums}<LSEP>[](symbol){seascomp}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){xdata}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){stl}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){Data}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){seascols}<LEND>[call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){Seasonal}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){stl}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){allseas}<LEND>[call](){}<LSEP>[](symbol){rowSumsTS}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){stl}<LEND>[](symbol){}<LSEP>[](symbol){seascols}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){series}<LSEP>[litteral](NULL){NULL}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){xdata}<LEND>[statement 14; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){mean}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){mean}<LEND>[](symbol){lastseas}<LEND>[statement 15; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){upper}<LEND>[](symbol){lastseas}<LEND>[statement 16; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lower}<LEND>[](symbol){lastseas}<LEND>[statement 17; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){STL + }<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){method}<LEND>[statement 18; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[statement 19; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){fcast}<LEND>[](symbol){allseas}<LEND>[statement 20; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){residuals}<LEND>[call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){fcast}<LEND>[statement 21; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){fitted}<LEND>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){mean}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){mean}<LEND>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){fcast}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lower}<LEND>[](symbol){lambda}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){upper}<LEND>[](symbol){lambda}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](str){biasadj}<LEND>[](symbol){biasadj}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lambda}<LEND>[](symbol){lambda}<LEND>[statement 22; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[statement 23; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fcast}<LEND>[assign](){<-}<LSEP>[](symbol){stlf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){h}<LSEP>[](symbol){s.window}<LSEP>[](symbol){t.window}<LSEP>[](symbol){robust}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seriesname}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){1}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){y must be a univariate time se...}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){1}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](integer){1}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){tspx}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){y is not a seasonal ts object}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](integer){1}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){y is not a seasonal ts object}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){mstl}<LSEP>[](symbol){x}<LSEP>[](symbol){s.window}<LSEP>[](symbol){t.window}<LSEP>[](symbol){robust}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LSEP>[](symbol){h}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){series}<LEND>[](symbol){seriesname}<LEND>[statement 8; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fcast}<LEND>[assign](){<-}<LSEP>[](symbol){is.stlm}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){stlm} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){lagwalk}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){lag}<LSEP>[](symbol){drift}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.ts}<LSEP>[](symbol){y}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){y}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){origy}<LSEP>[](symbol){y}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){y}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){y}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){y_na}<LEND>[call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){y}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){y_na}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y_na}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){y_na}<LSEP>[](symbol){lag}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){lag}<LEND>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){lag}<LEND>[statement 7; control flow](){for}<LSEP>[](symbol){i}<LSEP>[](symbol){y_na}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){fits}<LEND>[](symbol){i}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fits}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fits}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[](symbol){lag}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){lag}<LEND>[argument 1; call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){fits}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){lag}<LEND>[argument 1; call](){}<LSEP>[](symbol){start}<LSEP>[](symbol){y}<LEND>[](symbol){m}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){copy_msts}<LSEP>[](symbol){y}<LSEP>[](symbol){fitted}<LEND>[statement 10; control flow](){if}<LSEP>[](symbol){drift}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){summary}<LEND>[argument 0; call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){y}<LSEP>[](symbol){fitted}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){na.exclude}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){b}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){coefficients}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){b.se}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){coefficients}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){sigma}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){sigma}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){fitted}<LSEP>[](symbol){b}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){y}<LSEP>[](symbol){fitted}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){method}<LSEP>[litteral](str){Lag walk with drift}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){y}<LSEP>[](symbol){fitted}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){b}<LEND>[assign](){<-}<LSEP>[](symbol){b.se}<LSEP>[litteral](real){0.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){sigma}<LEND>[call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){res}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){method}<LSEP>[litteral](str){Lag walk}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){fitted}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[argument 3; call](){}<LSEP>[](symbol){var}<LSEP>[](symbol){res}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](str){biasadj}<LEND>[](symbol){biasadj}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){origy}<LSEP>[](symbol){fitted}<LEND>[argument 2; call](){}<LSEP>[](symbol){tail}<LSEP>[](symbol){fits}<LSEP>[](symbol){lag}<LEND>[](symbol){res}<LSEP>[](symbol){method}<LEND>[argument 5; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[argument 6; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){sigma}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 7; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){drift}<LSEP>[](symbol){b}<LSEP>[](symbol){b.se}<LSEP>[](symbol){lag}<LEND>[](symbol){lambda}<LEND>[argument 9; call](){}<LSEP>[](symbol){match.call}<LEND>[argument 1; litteral](str){lagwalk}<LEND>[assign](){<-}<LSEP>[](symbol){forecast.lagwalk}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){lambda}<LSEP>[](symbol){simulate}<LSEP>[](symbol){bootstrap}<LSEP>[](symbol){npaths}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lag}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){par}<LEND>[](symbol){lag}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fullperiods}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){lag}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){steps}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){fullperiods}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){lag}<LSEP>[](symbol){fullperiods}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){fc}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){future}<LEND>[](symbol){fullperiods}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){steps}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){par}<LEND>[](symbol){drift}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){mse}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){residuals}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){se}<LEND>[call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){mse}<LSEP>[](symbol){steps}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){steps}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){par}<LEND>[](symbol){drift.se}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 6; control flow](){if}<LSEP>[](symbol){fan}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){51.000000}<LSEP>[argument 1; litteral](real){99.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){100.000000}<LSEP>[](symbol){level}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){99.990000}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Confidence limit out of range}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){nconf}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){level}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LSEP>[](symbol){simulate}<LSEP>[](symbol){bootstrap}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){sim}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){npaths}<LSEP>[](symbol){h}<LEND>[statement 1; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){npaths}<LEND>[body; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sim}<LSEP>[](symbol){i}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){simulate}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){bootstrap}<LSEP>[](symbol){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){sim}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){quantile}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](real){200.000000}<LEND>[argument 4; litteral](real){8.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){sim}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){quantile}<LEND>[argument 3; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](real){200.000000}<LEND>[argument 4; litteral](real){8.000000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){nconf}<LSEP>[argument 1; litteral](integer){1}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){lower}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){upper}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){lower}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){upper}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){z}<LEND>[call](){}<LSEP>[](symbol){qnorm}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](real){200.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lower}<LEND>[assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){h}<LSEP>[](symbol){nconf}<LEND>[statement 2; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nconf}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){fc}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){z}<LSEP>[](symbol){i}<LEND>[](symbol){se}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){fc}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){z}<LSEP>[](symbol){i}<LEND>[](symbol){se}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fc}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){fc}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[argument 3; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){se}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){bootstrap}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){upper}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){lower}<LSEP>[](symbol){lambda}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){fc}<LEND>[call](){}<LSEP>[](symbol){future_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[](symbol){fc}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){future_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[](symbol){lower}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){future_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[](symbol){upper}<LEND>[statement 13; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){lower}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](str){%}<LSEP>[argument 2; litteral](str){}<LEND>[statement 14; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){method}<LEND>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[argument 4; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){object}<LEND>[argument 5; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){object}<LEND>[argument 6; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[](symbol){fc}<LSEP>[](symbol){level}<LSEP>[](symbol){lower}<LSEP>[](symbol){upper}<LEND>[argument 1; litteral](str){forecast}<LEND>[assign](){<-}<LSEP>[](symbol){print.lagwalk}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Call:}<LEND>[argument 1; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){call}<LEND>[argument 2; litteral](str){\n\n}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){par}<LEND>[](symbol){includedrift}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Drift: }<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){par}<LEND>[](symbol){drift}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 2; litteral](str){ (se }<LEND>[argument 3; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){par}<LEND>[](symbol){drift.se}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 4; litteral](str){)\n}<LSEP>[argument 5; litteral](str){}<LEND>[statement 2; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Residual sd:}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){sigma2}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 2; litteral](str){\n}<LEND>[assign](){<-}<LSEP>[](symbol){fitted.lagwalk}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted}<LEND>[assign](){<-}<LSEP>[](symbol){rwf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){h}<LSEP>[](symbol){drift}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){lagwalk}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){drift}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fc}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){lambda}<LEND>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fc}<LSEP>[](symbol){model}<LEND>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fc}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 4; control flow](){if}<LSEP>[](symbol){drift}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fc}<LSEP>[](symbol){method}<LEND>[litteral](str){Random walk with drift}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fc}<LSEP>[](symbol){method}<LEND>[litteral](str){Random walk}<LEND>[statement 5; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fc}<LEND>[assign](){<-}<LSEP>[](symbol){naive}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fc}<LEND>[call](){}<LSEP>[](symbol){rwf}<LSEP>[](symbol){x}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){lambda}<LSEP>[argument 5; litteral](logical){FALSE}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fc}<LSEP>[](symbol){model}<LEND>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fc}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fc}<LSEP>[](symbol){method}<LEND>[litteral](str){Naive method}<LEND>[statement 4; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fc}<LEND>[assign](){<-}<LSEP>[](symbol){snaive}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){lagwalk}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[argument 2; litteral](logical){FALSE}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fc}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){lambda}<LEND>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fc}<LSEP>[](symbol){model}<LEND>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fc}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fc}<LSEP>[](symbol){method}<LEND>[litteral](str){Seasonal naive method}<LEND>[statement 5; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fc} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){forecast.bats}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](str){ts}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ts.frequency}<LEND>[call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ts.frequency}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 1; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){h}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){h}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){ts.frequency}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){10.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){ts.frequency}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){h}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){seasonal.periods}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Forecast horizon out of bounds}<LEND>[statement 2; control flow](){if}<LSEP>[](symbol){fan}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){51.000000}<LSEP>[argument 1; litteral](real){99.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){100.000000}<LSEP>[](symbol){level}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){99.990000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Confidence limit out of range}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[](symbol){h}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){y.forecast}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){h}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){w}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){makeBATSWMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){damping.parameter}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ar.coefficients}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ma.coefficients}<LEND>[argument 4; litteral](str){forecast}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){g}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){makeBATSGMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){beta}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){gamma.values}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 4; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ar.coefficients}<LEND>[argument 5; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ma.coefficients}<LEND>[argument 6; litteral](str){forecast}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){makeFMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){beta}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){damping.parameter}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){g}<LSEP>[](symbol){gamma.bold.matrix}<LEND>[argument 5; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ar.coefficients}<LEND>[argument 6; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ma.coefficients}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y.forecast}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){w}<LSEP>[](symbol){w.transpose}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){ncol}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){F}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){ncol}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){t}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){h}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){}<LSEP>[](symbol){t}<LEND>[call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){F}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){t}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y.forecast}<LSEP>[](symbol){t}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){w}<LSEP>[](symbol){w.transpose}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){t}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){lower.bounds}<LEND>[assign](){<-}<LSEP>[](symbol){upper.bounds}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){level}<LEND>[](symbol){h}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){variance.multiplier}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){h}<LEND>[statement 13; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){variance.multiplier}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[litteral](real){1.000000}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){j}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){f.running}<LEND>[call](){}<LSEP>[](symbol){diag}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){F}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){f.running}<LEND>[call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){f.running}<LSEP>[](symbol){F}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){c.j}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){w}<LSEP>[](symbol){w.transpose}<LEND>[](symbol){f.running}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){g}<LSEP>[](symbol){g}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){variance.multiplier}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){j}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){variance.multiplier}<LSEP>[](symbol){j}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){c.j}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){variance}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){variance}<LEND>[](symbol){variance.multiplier}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){st.dev}<LEND>[call](){}<LSEP>[](symbol){sqrt}<LSEP>[](symbol){variance}<LEND>[statement 17; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){level}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){marg.error}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){st.dev}<LEND>[argument 1; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){qnorm}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){100.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){level}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){200.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower.bounds}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){y.forecast}<LSEP>[](symbol){marg.error}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper.bounds}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){y.forecast}<LSEP>[](symbol){marg.error}<LEND>[statement 18; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y.forecast}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){y.forecast}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[](symbol){biasadj}<LEND>[argument 3; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){level}<LSEP>[](symbol){upper.bounds}<LSEP>[](symbol){lower.bounds}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lower.bounds}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){lower.bounds}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lower.bounds}<LEND>[call](){}<LSEP>[](symbol){pmax}<LSEP>[](symbol){lower.bounds}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){upper.bounds}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){upper.bounds}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[statement 19; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){upper.bounds}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){lower.bounds}<LEND>[call](){}<LSEP>[](symbol){paste0}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](str){%}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){forecast.object}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){future_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[](symbol){y.forecast}<LEND>[](symbol){level}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[argument 5; call](){}<LSEP>[](symbol){future_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[](symbol){upper.bounds}<LEND>[argument 6; call](){}<LSEP>[](symbol){future_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[](symbol){lower.bounds}<LEND>[argument 7; call](){}<LSEP>[](symbol){copy_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted.values}<LEND>[argument 8; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){object}<LEND>[argument 9; call](){}<LSEP>[](symbol){copy_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){errors}<LEND>[statement 21; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){forecast.object}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){call}<LEND>[](symbol){y}<LEND>[statement 22; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){forecast.object}<LEND>[litteral](str){forecast}<LEND>[statement 23; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){forecast.object}<LEND>[assign](){<-}<LSEP>[](symbol){as.character.bats}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LSEP>[litteral](str){BATS(}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 2; litteral](str){}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){1}<LSEP>[argument 2; litteral](str){}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){, {}<LSEP>[argument 2; litteral](str){}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){ar.coefficients}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){ar.coefficients}<LEND>[argument 2; litteral](str){}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){0}<LSEP>[argument 2; litteral](str){}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){,}<LSEP>[argument 2; litteral](str){}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){ma.coefficients}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){ma.coefficients}<LEND>[argument 2; litteral](str){}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){0}<LSEP>[argument 2; litteral](str){}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){}, }<LSEP>[argument 2; litteral](str){}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){damping.parameter}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){damping.parameter}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 2; litteral](str){}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){-}<LSEP>[argument 2; litteral](str){}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){, }<LSEP>[argument 2; litteral](str){}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){{}<LSEP>[argument 2; litteral](str){}<LEND>[statement 1; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){seasonal.periods}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[](symbol){i}<LSEP>[argument 2; litteral](str){}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){,}<LSEP>[argument 2; litteral](str){}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){})}<LSEP>[argument 2; litteral](str){}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](str){-)}<LSEP>[argument 2; litteral](str){}<LEND>[statement 10; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){name} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){tbats}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){use.box.cox}<LSEP>[](symbol){use.trend}<LSEP>[](symbol){use.damped.trend}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){use.arma.errors}<LSEP>[](symbol){use.parallel}<LSEP>[](symbol){num.cores}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){model}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.numeric}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){y should be a univariate time ...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){seriesname}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){origy}<LSEP>[](symbol){y}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){attr_y}<LEND>[call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){origy}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](str){msts}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LEND>[call](){}<LSEP>[](symbol){sort}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](str){msts}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](str){ts}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){y}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){y}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LSEP>[litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](str){ts}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){msts}<LSEP>[](symbol){y}<LSEP>[](symbol){seasonal.periods}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LEND>[call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){pmax}<LSEP>[](symbol){seasonal.periods}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasonal.periods}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LSEP>[litteral](NULL){NULL}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){ny}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){na.contiguous}<LSEP>[](symbol){y}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){ny}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Missing values encountered. Us...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attr_y}<LSEP>[](symbol){tsp}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attr_y}<LSEP>[](symbol){tsp}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){range}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){y}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){model}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){tbats}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){refitModel}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitPreviousTBATSModel}<LSEP>[](symbol){y}<LSEP>[](symbol){model}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){bats}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){refitModel}<LEND>[call](){}<LSEP>[](symbol){bats}<LSEP>[](symbol){origy}<LSEP>[](symbol){model}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){refitModel}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.constant}<LSEP>[](symbol){y}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){ny}<LEND>[argument 2; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[](symbol){y}<LEND>[argument 4; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 5; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 6; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 7; litteral](real){0.000000}<LSEP>[argument 8; litteral](real){0.999900}<LSEP>[argument 9; litteral](str){TBATS}<LEND>[argument 10; call](){}<LSEP>[](symbol){match.call}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){fit}<LSEP>[argument 1; litteral](str){bats}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){use.box.cox}<LSEP>[litteral](logical){FALSE}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){non.seasonal.model}<LEND>[call](){}<LSEP>[](symbol){bats}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){y}<LEND>[](symbol){use.box.cox}<LSEP>[](symbol){use.trend}<LSEP>[](symbol){use.damped.trend}<LSEP>[](symbol){use.arma.errors}<LSEP>[](symbol){use.parallel}<LSEP>[](symbol){num.cores}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){non.seasonal.model}<LSEP>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attributes}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){non.seasonal.model}<LSEP>[](symbol){fitted.values}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attributes}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){non.seasonal.model}<LSEP>[](symbol){errors}<LEND>[call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){origy}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){non.seasonal.model}<LSEP>[](symbol){y}<LEND>[](symbol){origy}<LEND>[statement 3; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){non.seasonal.model}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal.mask}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasonal.periods}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){seasonal.mask}<LEND>[statement 15; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){use.box.cox}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){use.box.cox}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](logical){FALSE}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LSEP>[](symbol){use.box.cox}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){init.box.cox}<LEND>[call](){}<LSEP>[](symbol){BoxCox.lambda}<LSEP>[](symbol){y}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){init.box.cox}<LSEP>[litteral](NULL){NULL}<LEND>[statement 17; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){use.trend}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){use.trend}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](logical){FALSE}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){use.trend}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){use.damped.trend}<LSEP>[litteral](logical){FALSE}<LEND>[statement 18; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){use.damped.trend}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){use.damped.trend}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](logical){FALSE}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){model.params}<LEND>[call](){}<LSEP>[](symbol){logical}<LSEP>[argument 0; litteral](real){3.000000}<LEND>[statement 20; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){any}<LSEP>[](symbol){use.box.cox}<LEND>[statement 21; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){any}<LSEP>[](symbol){use.trend}<LEND>[statement 22; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[call](){}<LSEP>[](symbol){any}<LSEP>[](symbol){use.damped.trend}<LEND>[statement 23; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){y}<LEND>[statement 24; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[statement 25; assign](){<-}<LSEP>[](symbol){k.vector}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){seasonal.periods}<LEND>[statement 26; control flow](){if}<LSEP>[](symbol){use.parallel}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){num.cores}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){num.cores}<LEND>[call](){}<LSEP>[](symbol){detectCores}<LSEP>[argument 0; litteral](logical){FALSE}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){clus}<LEND>[call](){}<LSEP>[](symbol){makeCluster}<LSEP>[](symbol){num.cores}<LEND>[statement 27; assign](){<-}<LSEP>[](symbol){best.model}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitSpecificTBATS}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[](symbol){seasonal.periods}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 28; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){best.model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){best.model}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](real){inf}<LEND>[statement 29; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){seasonal.periods}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){2.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){next}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){max.k}<LEND>[call](){}<LSEP>[](symbol){floor}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){current.k}<LSEP>[litteral](real){2.000000}<LEND>[statement 1; control flow](){while}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){current.k}<LSEP>[](symbol){max.k}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){%%}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){i}<LEND>[](symbol){current.k}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){current.k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){current.k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){next}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){latter}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){i}<LEND>[](symbol){current.k}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%%}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){latter}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){max.k}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){current.k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){break}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){current.k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){current.k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){max.k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){next}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){max.k}<LSEP>[argument 1; litteral](real){6.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[](symbol){max.k}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){best.model}<LSEP>[](symbol){AIC}<LEND>[litteral](real){inf}<LEND>[statement 2; control flow](){repeat}<LSEP>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){new.model}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitSpecificTBATS}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[](symbol){seasonal.periods}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){new.model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){new.model}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](real){inf}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){new.model}<LSEP>[](symbol){AIC}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){best.model}<LSEP>[](symbol){AIC}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){break}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){break}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){best.model}<LSEP>[](symbol){new.model}<LEND>[statement 3; call](){}<LSEP>[](symbol){next}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){step.up.k}<LSEP>[](symbol){k.vector}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){step.down.k}<LSEP>[](symbol){k.vector}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){step.up.k}<LSEP>[](symbol){i}<LEND>[litteral](real){7.000000}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){step.down.k}<LSEP>[](symbol){i}<LEND>[litteral](real){5.000000}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[litteral](real){6.000000}<LEND>[statement 5; control flow](){if}<LSEP>[](symbol){use.parallel}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k.control.array}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){step.up.k}<LSEP>[](symbol){step.down.k}<LSEP>[](symbol){k.vector}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){models.list}<LEND>[call](){}<LSEP>[](symbol){clusterApplyLB}<LSEP>[](symbol){clus}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[](symbol){parFitSpecificTBATS}<LSEP>[](symbol){y}<LEND>[argument 4; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 5; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 6; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[](symbol){seasonal.periods}<LSEP>[](symbol){k.control.array}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){up.model}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){models.list}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){level.model}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){models.list}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){down.model}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){models.list}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){up.model}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitSpecificTBATS}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[](symbol){seasonal.periods}<LSEP>[](symbol){step.up.k}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){up.model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){up.model}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](real){inf}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){level.model}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitSpecificTBATS}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[](symbol){seasonal.periods}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){level.model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level.model}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](real){inf}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){down.model}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitSpecificTBATS}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[](symbol){seasonal.periods}<LSEP>[](symbol){step.down.k}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){down.model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){down.model}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](real){inf}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){aic.vector}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){up.model}<LSEP>[](symbol){AIC}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){level.model}<LSEP>[](symbol){AIC}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){down.model}<LSEP>[](symbol){AIC}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){aic.vector}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){down.model}<LSEP>[](symbol){AIC}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){best.model}<LSEP>[](symbol){down.model}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[litteral](real){5.000000}<LEND>[statement 2; control flow](){repeat}<LSEP>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){down.model}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitSpecificTBATS}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[](symbol){seasonal.periods}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){down.model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){down.model}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](real){inf}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){down.model}<LSEP>[](symbol){AIC}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){best.model}<LSEP>[](symbol){AIC}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){break}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){best.model}<LSEP>[](symbol){down.model}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){break}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){aic.vector}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){level.model}<LSEP>[](symbol){AIC}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){best.model}<LSEP>[](symbol){level.model}<LEND>[statement 1; call](){}<LSEP>[](symbol){next}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){best.model}<LSEP>[](symbol){up.model}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[litteral](real){7.000000}<LEND>[statement 2; control flow](){repeat}<LSEP>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){up.model}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitSpecificTBATS}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){model.params}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[](symbol){seasonal.periods}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){up.model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){up.model}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](real){inf}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){up.model}<LSEP>[](symbol){AIC}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){best.model}<LSEP>[](symbol){AIC}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){break}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){best.model}<LSEP>[](symbol){up.model}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){i}<LEND>[](symbol){max.k}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){break}<LEND>[statement 30; assign](){<-}<LSEP>[](symbol){aux.model}<LSEP>[](symbol){best.model}<LEND>[statement 31; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){non.seasonal.model}<LSEP>[](symbol){AIC}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){best.model}<LSEP>[](symbol){AIC}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){best.model}<LSEP>[](symbol){non.seasonal.model}<LEND>[statement 32; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){use.box.cox}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){use.trend}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){use.trend}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){use.damped.trend}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LSEP>[](symbol){use.parallel}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){use.parallel}<LSEP>[litteral](logical){FALSE}<LEND>[statement 1; call](){}<LSEP>[](symbol){stopCluster}<LSEP>[](symbol){clus}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){use.box.cox}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){use.trend}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){use.trend}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LSEP>[](symbol){use.parallel}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){use.parallel}<LSEP>[litteral](logical){FALSE}<LEND>[statement 1; call](){}<LSEP>[](symbol){stopCluster}<LSEP>[](symbol){clus}<LEND>[statement 33; control flow](){if}<LSEP>[](symbol){use.parallel}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){control.array}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; control flow](){for}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){use.box.cox}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){trend}<LSEP>[](symbol){use.trend}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){damping}<LSEP>[](symbol){use.damped.trend}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){trend}<LEND>[](symbol){damping}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){next}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){control.line}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){trend}<LSEP>[](symbol){damping}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){control.array}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){control.array}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){control.array}<LSEP>[](symbol){control.line}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){control.array}<LSEP>[](symbol){control.line}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){models.list}<LEND>[call](){}<LSEP>[](symbol){clusterApplyLB}<LSEP>[](symbol){clus}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){control.array}<LEND>[](symbol){parFilterTBATSSpecifics}<LSEP>[](symbol){y}<LSEP>[](symbol){control.array}<LSEP>[](symbol){model.params}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){use.arma.errors}<LSEP>[](symbol){aux.model}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[statement 3; call](){}<LSEP>[](symbol){stopCluster}<LSEP>[](symbol){clus}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){aics}<LEND>[call](){}<LSEP>[](symbol){numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){control.array}<LEND>[statement 5; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){control.array}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){aics}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){models.list}<LSEP>[](symbol){i}<LEND>[](symbol){AIC}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){best.number}<LEND>[call](){}<LSEP>[](symbol){which.min}<LSEP>[](symbol){aics}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){best.seasonal.model}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){models.list}<LSEP>[](symbol){best.number}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){best.seasonal.model}<LSEP>[](symbol){AIC}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){best.model}<LSEP>[](symbol){AIC}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){best.model}<LSEP>[](symbol){best.seasonal.model}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){use.box.cox}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){trend}<LSEP>[](symbol){use.trend}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){damping}<LSEP>[](symbol){use.damped.trend}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){model.params}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){trend}<LSEP>[](symbol){damping}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){new.model}<LEND>[call](){}<LSEP>[](symbol){filterTBATSSpecifics}<LSEP>[](symbol){y}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){trend}<LSEP>[](symbol){damping}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){use.arma.errors}<LSEP>[](symbol){aux.model}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LSEP>[](symbol){trend}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){damping}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){new.model}<LEND>[call](){}<LSEP>[](symbol){filterTBATSSpecifics}<LSEP>[](symbol){y}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){trend}<LSEP>[](symbol){damping}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){use.arma.errors}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){new.model}<LSEP>[](symbol){AIC}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){best.model}<LSEP>[](symbol){AIC}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){best.model}<LSEP>[](symbol){new.model}<LEND>[statement 34; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){best.model}<LSEP>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 35; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attributes}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){best.model}<LSEP>[](symbol){fitted.values}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attributes}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){best.model}<LSEP>[](symbol){errors}<LEND>[](symbol){attr_y}<LEND>[statement 36; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){best.model}<LSEP>[](symbol){y}<LEND>[](symbol){origy}<LEND>[statement 37; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){best.model}<LSEP>[](symbol){series}<LEND>[](symbol){seriesname}<LEND>[statement 38; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){best.model}<LSEP>[](symbol){method}<LEND>[litteral](str){TBATS}<LEND>[statement 39; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){best.model}<LEND>[assign](){<-}<LSEP>[](symbol){parFilterTBATSSpecifics}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){control.number}<LSEP>[](symbol){y}<LSEP>[](symbol){control.array}<LSEP>[](symbol){model.params}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){use.arma.errors}<LSEP>[](symbol){aux.model}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){box.cox}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){control.array}<LSEP>[](symbol){control.number}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){trend}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){control.array}<LSEP>[](symbol){control.number}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){damping}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){control.array}<LSEP>[](symbol){control.number}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){model.params}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){trend}<LSEP>[](symbol){damping}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){first.model}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitSpecificTBATS}<LSEP>[](symbol){y}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){trend}<LSEP>[](symbol){damping}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){first.model}<LSEP>[](symbol){aux.model}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){first.model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){first.model}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](real){inf}<LEND>[statement 5; control flow](){if}<LSEP>[](symbol){use.arma.errors}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){arma}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){auto.arima}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){first.model}<LSEP>[](symbol){errors}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[](symbol){...}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){arma}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){arma}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){arma}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){p}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){q}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){starting.params}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){first.model}<LSEP>[](symbol){parameters}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){second.model}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitSpecificTBATS}<LSEP>[](symbol){y}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){trend}<LSEP>[](symbol){damping}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){second.model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){second.model}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](real){inf}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){second.model}<LSEP>[](symbol){AIC}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){first.model}<LSEP>[](symbol){AIC}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){second.model}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){first.model}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){first.model}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){first.model}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){first.model}<LEND>[assign](){<-}<LSEP>[](symbol){parFitSpecificTBATS}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){control.number}<LSEP>[](symbol){y}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){trend}<LSEP>[](symbol){damping}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){k.control.matrix}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k.vector}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){k.control.matrix}<LSEP>[](symbol){control.number}<LSEP>[](symbol){}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitSpecificTBATS}<LSEP>[](symbol){y}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){trend}<LSEP>[](symbol){damping}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](real){inf}<LEND>[statement 3; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){model}<LEND>[assign](){<-}<LSEP>[](symbol){filterTBATSSpecifics}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){trend}<LSEP>[](symbol){damping}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){use.arma.errors}<LSEP>[](symbol){aux.model}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){aux.model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){first.model}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitSpecificTBATS}<LSEP>[](symbol){y}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){trend}<LSEP>[](symbol){damping}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){first.model}<LSEP>[](symbol){aux.model}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){first.model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){first.model}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](real){inf}<LEND>[statement 2; control flow](){if}<LSEP>[](symbol){use.arma.errors}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){arma}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){auto.arima}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){first.model}<LSEP>[](symbol){errors}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[](symbol){...}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){arma}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){arma}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){arma}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){p}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){q}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){starting.params}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){first.model}<LSEP>[](symbol){parameters}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){second.model}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitSpecificTBATS}<LSEP>[](symbol){y}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){trend}<LSEP>[](symbol){damping}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){second.model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){second.model}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](real){inf}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){second.model}<LSEP>[](symbol){AIC}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){first.model}<LSEP>[](symbol){AIC}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){second.model}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){first.model}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){first.model}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){first.model}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){first.model}<LEND>[assign](){<-}<LSEP>[](symbol){makeSingleFourier}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){j}<LSEP>[](symbol){m}<LSEP>[](symbol){T}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){frier}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){T}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[statement 1; control flow](){for}<LSEP>[](symbol){t}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){T}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){frier}<LSEP>[](symbol){t}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){cos}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[](symbol){j}<LEND>[](symbol){m}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){frier}<LSEP>[](symbol){t}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[](symbol){j}<LEND>[](symbol){m}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){frier}<LEND>[assign](){<-}<LSEP>[](symbol){calcFTest}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){r.sse}<LSEP>[](symbol){ur.sse}<LSEP>[](symbol){num.restrictions}<LSEP>[](symbol){num.u.params}<LSEP>[](symbol){num.observations}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){f.stat}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){r.sse}<LSEP>[](symbol){ur.sse}<LEND>[](symbol){num.restrictions}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){r.sse}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){num.observations}<LSEP>[](symbol){num.u.params}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p.value}<LEND>[call](){}<LSEP>[](symbol){pf}<LSEP>[](symbol){f.stat}<LSEP>[](symbol){num.restrictions}<LEND>[argument 2; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){num.observations}<LSEP>[](symbol){num.u.params}<LEND>[argument 3; litteral](logical){FALSE}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){p.value}<LEND>[assign](){<-}<LSEP>[](symbol){fitted.tbats}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted.values}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){hfitted}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[argument 2; litteral](str){tbats}<LSEP>[](symbol){...}<LEND>[assign](){<-}<LSEP>[](symbol){print.tbats}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){x}<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n}<LEND>[statement 2; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\nCall: }<LEND>[statement 3; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){call}<LEND>[statement 4; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\nParameters}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n Lambda: }<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[argument 1; litteral](real){6.000000}<LEND>[statement 6; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n Alpha: }<LEND>[statement 7; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){alpha}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n Beta: }<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){beta}<LEND>[statement 2; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n Damping Parameter: }<LEND>[statement 3; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){damping.parameter}<LEND>[argument 1; litteral](real){6.000000}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){gamma.one.values}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n Gamma-1 Values: }<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){gamma.one.values}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){gamma.two.values}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n Gamma-2 Values: }<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){gamma.two.values}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){ar.coefficients}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n AR coefficients: }<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){ar.coefficients}<LEND>[argument 1; litteral](real){6.000000}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){ma.coefficients}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n MA coefficients: }<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){ma.coefficients}<LEND>[argument 1; litteral](real){6.000000}<LEND>[statement 13; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n}<LEND>[statement 14; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\nSeed States:\n}<LEND>[statement 15; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){seed.states}<LEND>[statement 16; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\nSigma: }<LEND>[statement 17; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){variance}<LEND>[statement 18; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\nAIC: }<LEND>[statement 19; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){AIC}<LEND>[statement 20; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n}<LEND>[assign](){<-}<LSEP>[](symbol){plot.tbats}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){main}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){tbats.components}<LSEP>[](symbol){x}<LEND>[statement 1; call](){}<LSEP>[](symbol){plot.ts}<LSEP>[](symbol){out}<LSEP>[](symbol){main}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[](symbol){...}<LEND>[assign](){<-}<LSEP>[](symbol){tbats.components}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](str){lambda}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){y}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){tau}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){k.vector}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){k.vector}<LEND>[argument 2; litteral](real){0.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){w}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){makeTBATSWMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){damping.parameter}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){k.vector}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){ar.coefficients}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){ma.coefficients}<LEND>[argument 4; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){tau}<LEND>[argument 5; litteral](str){forecast}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){tau}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nonseas}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){beta}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){nseas}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){seasonal.periods}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){seas.states}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){seed.states}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){beta}<LEND>[](symbol){}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){seas.states}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seas.states}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){seas.states}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){w}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){w}<LSEP>[](symbol){w.transpose}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){beta}<LEND>[argument 3; litteral](logical){FALSE}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){w}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){w}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){tau}<LEND>[argument 3; litteral](logical){FALSE}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){cumsum}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){k.vector}<LEND>[statement 7; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nseas}<LEND>[body; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){w}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){j}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){j}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 3; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seas.states}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){j}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){j}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){nseas}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){nonseas}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nseas}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){season}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nseas}<LEND>[argument 2; litteral](str){}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){out}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){y}<LEND>[statement 8; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){out} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){meanf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){bootstrap}<LSEP>[](symbol){npaths}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){origx}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){meanx}<LEND>[call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){meanx}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){x}<LSEP>[](symbol){fits}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){f}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){meanx}<LSEP>[](symbol){h}<LEND>[statement 6; control flow](){if}<LSEP>[](symbol){fan}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){51.000000}<LSEP>[argument 1; litteral](real){99.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){100.000000}<LSEP>[](symbol){level}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){99.990000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Confidence limit out of range}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){nconf}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){level}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){s}<LEND>[call](){}<LSEP>[](symbol){sd}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 9; control flow](){if}<LSEP>[](symbol){bootstrap}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){na.omit}<LSEP>[](symbol){res}<LEND>[argument 1; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){res}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){sim}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){sample}<LSEP>[](symbol){e}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){npaths}<LSEP>[](symbol){h}<LEND>[argument 2; litteral](logical){TRUE}<LEND>[](symbol){npaths}<LSEP>[](symbol){h}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){sim}<LEND>[call](){}<LSEP>[](symbol){sweep}<LSEP>[](symbol){sim}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){f}<LSEP>[argument 3; litteral](str){+}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){t}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){sim}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){quantile}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](real){200.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){t}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){sim}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){quantile}<LEND>[argument 3; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](real){200.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lower}<LEND>[assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){h}<LSEP>[](symbol){nconf}<LEND>[statement 1; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nconf}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tfrac}<LEND>[call](){}<LSEP>[](symbol){qt}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){level}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){200.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tfrac}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){w}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){tfrac}<LEND>[](symbol){s}<LEND>[argument 1; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){f}<LSEP>[](symbol){w}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){f}<LSEP>[](symbol){w}<LEND>[statement 10; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){lower}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](str){%}<LSEP>[argument 2; litteral](str){}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.ts}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){copy_msts}<LSEP>[](symbol){x}<LSEP>[](symbol){fits}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){copy_msts}<LSEP>[](symbol){x}<LSEP>[](symbol){res}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){f}<LEND>[call](){}<LSEP>[](symbol){future_msts}<LSEP>[](symbol){x}<LSEP>[](symbol){f}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){future_msts}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){future_msts}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){fits}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x}<LSEP>[](symbol){origx}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){f}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){f}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[argument 3; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){level}<LSEP>[](symbol){upper}<LSEP>[](symbol){lower}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){lower}<LSEP>[](symbol){lambda}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){upper}<LSEP>[](symbol){lambda}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](str){Mean}<LSEP>[](symbol){level}<LSEP>[](symbol){x}<LEND>[argument 3; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[](symbol){f}<LSEP>[](symbol){lower}<LSEP>[](symbol){upper}<LEND>[argument 7; call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){f}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){s}<LEND>[argument 1; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[](symbol){s}<LSEP>[](symbol){bootstrap}<LEND>[argument 1; litteral](str){meanf}<LEND>[](symbol){lambda}<LSEP>[](symbol){fits}<LSEP>[](symbol){res}<LEND>[statement 14; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){model}<LEND>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 15; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){out}<LSEP>[argument 1; litteral](str){forecast}<LEND>[assign](){<-}<LSEP>[](symbol){BoxCox}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](str){auto}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){BoxCox.lambda}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.900000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[litteral](logical){NA}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){log}<LSEP>[](symbol){x}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){sign}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){x}<LEND>[](symbol){lambda}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){lambda}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){x}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){out}<LSEP>[argument 1; litteral](str){lambda}<LEND>[](symbol){lambda}<LEND>[statement 5; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){out}<LEND>[assign](){<-}<LSEP>[](symbol){InvBoxCox}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){fvar}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[](symbol){lambda}<LEND>[litteral](logical){NA}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){exp}<LSEP>[](symbol){x}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){sign}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){lambda}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){x}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){biasadj}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){biasadj}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](str){biasadj}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.logical}<LSEP>[](symbol){biasadj}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){biasadj information not found,...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){biasadj}<LSEP>[litteral](logical){FALSE}<LEND>[statement 5; control flow](){if}<LSEP>[](symbol){biasadj}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){fvar}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){fvar must be provided when bia...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.list}<LSEP>[](symbol){fvar}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fvar}<LSEP>[](symbol){level}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fvar}<LSEP>[](symbol){upper}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fvar}<LSEP>[](symbol){lower}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){match}<LSEP>[](symbol){level}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fvar}<LSEP>[](symbol){level}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fvar}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fvar}<LSEP>[](symbol){upper}<LEND>[](symbol){}<LSEP>[](symbol){i}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fvar}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fvar}<LSEP>[](symbol){lower}<LEND>[](symbol){}<LSEP>[](symbol){i}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](real){100.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fvar}<LEND>[call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fvar}<LSEP>[](symbol){upper}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fvar}<LSEP>[](symbol){lower}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){qnorm}<LEND>[](symbol){level}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){fvar}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fvar}<LEND>[call](){}<LSEP>[](symbol){diag}<LSEP>[](symbol){fvar}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){fvar}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){lambda}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){lambda}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){out}<LEND>[assign](){<-}<LSEP>[](symbol){InvBoxCoxf}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){fvar}<LSEP>[](symbol){lambda}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){message}<LSEP>[argument 0; litteral](str){Deprecated, use InvBoxCox instead}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Must specify lambda using lamb...}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){fvar}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){level}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){match}<LSEP>[](symbol){level}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){level}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[](symbol){}<LSEP>[](symbol){i}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[](symbol){}<LSEP>[](symbol){i}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](real){100.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fvar}<LEND>[call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){qnorm}<LEND>[](symbol){level}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){x}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){matrix}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){fvar}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fvar}<LEND>[call](){}<LSEP>[](symbol){diag}<LSEP>[](symbol){fvar}<LEND>[statement 4; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.500000}<LSEP>[](symbol){fvar}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){lambda}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){lambda}<LEND>[assign](){<-}<LSEP>[](symbol){forecast.StructTS}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){data}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LEND>[statement 2; control flow](){if}<LSEP>[](symbol){fan}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){51.000000}<LSEP>[argument 1; litteral](real){99.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){100.000000}<LSEP>[](symbol){level}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){99.990000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Confidence limit out of range}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){nint}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){level}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){upper}<LEND>[assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){nint}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){pred}<LEND>[statement 5; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nint}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){qq}<LEND>[call](){}<LSEP>[](symbol){qnorm}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){level}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){100.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){qq}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){se}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){qq}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){se}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){lower}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](str){%}<LSEP>[argument 2; litteral](str){}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){seas}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coef}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){method}<LSEP>[litteral](str){Basic structural model}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){slope}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coef}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){method}<LSEP>[litteral](str){Local linear structural model}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){method}<LSEP>[litteral](str){Local level structural model}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){sigma2}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){se}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){object}<LEND>[](symbol){sigma2}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){x}<LSEP>[](symbol){res}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){fits}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){pred}<LEND>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[argument 3; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){level}<LSEP>[](symbol){upper}<LSEP>[](symbol){lower}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){lower}<LSEP>[](symbol){lambda}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){upper}<LSEP>[](symbol){lambda}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){mean}<LEND>[call](){}<LSEP>[](symbol){future_msts}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){pred}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){future_msts}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){future_msts}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){copy_msts}<LSEP>[](symbol){x}<LSEP>[](symbol){fits}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){copy_msts}<LSEP>[](symbol){x}<LSEP>[](symbol){res}<LEND>[statement 17; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){method}<LSEP>[](symbol){object}<LSEP>[](symbol){level}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){pred}<LEND>[](symbol){lower}<LSEP>[](symbol){upper}<LSEP>[](symbol){x}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[](symbol){fits}<LSEP>[](symbol){res}<LEND>[argument 1; litteral](str){forecast}<LEND>[assign](){<-}<LSEP>[](symbol){forecast.HoltWinters}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){exponential}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){exponential}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Forecasting for exponential tr...}<LEND>[statement 2; control flow](){if}<LSEP>[](symbol){fan}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){51.000000}<LSEP>[argument 1; litteral](real){99.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){100.000000}<LSEP>[](symbol){level}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){99.990000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Confidence limit out of range}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){nint}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){level}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[argument 3; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){100.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){pmean}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pred}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){upper}<LEND>[assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){nint}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pred}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){se}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pred}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pred}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){qnorm}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){100.000000}<LEND>[statement 8; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nint}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){qq}<LEND>[call](){}<LSEP>[](symbol){qnorm}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){level}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){100.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){pmean}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){qq}<LSEP>[](symbol){se}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){pmean}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){qq}<LSEP>[](symbol){se}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){lower}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](str){%}<LSEP>[argument 2; litteral](str){}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){pmean}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){pmean}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[argument 3; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){level}<LSEP>[](symbol){upper}<LSEP>[](symbol){lower}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){lower}<LSEP>[](symbol){lambda}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){upper}<LSEP>[](symbol){lambda}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){nf}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){fitted}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[](symbol){nf}<LEND>[](symbol){fitted}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){copy_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[](symbol){fitted}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){pmean}<LEND>[call](){}<LSEP>[](symbol){future_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[](symbol){pmean}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){future_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[](symbol){lower}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){future_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[](symbol){upper}<LEND>[statement 18; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](str){HoltWinters}<LSEP>[](symbol){object}<LSEP>[](symbol){level}<LSEP>[](symbol){pmean}<LSEP>[](symbol){lower}<LSEP>[](symbol){upper}<LSEP>[](symbol){x}<LEND>[argument 7; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){call}<LEND>[](symbol){x}<LEND>[](symbol){fitted}<LEND>[argument 9; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){x}<LSEP>[](symbol){fitted}<LEND>[argument 1; litteral](str){forecast}<LEND>[assign](){<-}<LSEP>[](symbol){croston}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){h}<LSEP>[](symbol){alpha}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Series should not contain nega...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){croston2}<LSEP>[](symbol){x}<LSEP>[](symbol){h}<LSEP>[](symbol){alpha}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){x}<LEND>[](symbol){x}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){fitted}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){residuals}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){fitted}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[litteral](str){Croston's method}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){out}<LSEP>[argument 1; litteral](str){forecast}<LEND>[assign](){<-}<LSEP>[](symbol){croston2}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){h}<LSEP>[](symbol){alpha}<LSEP>[](symbol){nofits}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){tsp.x}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){freq.x}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp.x}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){start.f}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp.x}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){freq.x}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fc}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){h}<LEND>[](symbol){start.f}<LSEP>[](symbol){freq.x}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){nofits}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fc}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){fc}<LEND>[argument 1; call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp.x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){freq.x}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){tt}<LEND>[call](){}<LSEP>[](symbol){diff}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){tt}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y.f}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){y}<LSEP>[](symbol){h}<LEND>[](symbol){start.f}<LSEP>[](symbol){freq.x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p.f}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){tt}<LSEP>[](symbol){h}<LEND>[](symbol){start.f}<LSEP>[](symbol){freq.x}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){tt}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){h}<LEND>[](symbol){start.f}<LSEP>[](symbol){freq.x}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y.f}<LEND>[call](){}<LSEP>[](symbol){ses}<LSEP>[](symbol){y}<LSEP>[](symbol){alpha}<LSEP>[argument 2; litteral](str){simple}<LSEP>[](symbol){h}<LSEP>[argument 4; litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p.f}<LEND>[call](){}<LSEP>[](symbol){ses}<LSEP>[](symbol){tt}<LSEP>[](symbol){alpha}<LSEP>[argument 2; litteral](str){simple}<LSEP>[](symbol){h}<LSEP>[argument 4; litteral](logical){FALSE}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){ratio}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){y.f}<LSEP>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){p.f}<LSEP>[](symbol){mean}<LEND>[](symbol){start.f}<LSEP>[](symbol){freq.x}<LEND>[statement 9; control flow](){if}<LSEP>[](symbol){nofits}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){ratio}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){NA}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[body; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fits}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){croston2}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){alpha}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){ratio}<LEND>[call](){}<LSEP>[](symbol){future_msts}<LSEP>[](symbol){x}<LSEP>[](symbol){ratio}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){copy_msts}<LSEP>[](symbol){x}<LSEP>[](symbol){fits}<LEND>[statement 5; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){ratio}<LSEP>[](symbol){fits}<LEND>[argument 2; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){y.f}<LSEP>[](symbol){p.f} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){dm.test}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){e1}<LSEP>[](symbol){e2}<LSEP>[](symbol){alternative}<LSEP>[](symbol){h}<LSEP>[](symbol){power}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){alternative}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){alternative}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){d}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){e1}<LEND>[](symbol){power}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){e2}<LEND>[](symbol){power}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){d.cov}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){acf}<LSEP>[](symbol){d}<LSEP>[](symbol){na.omit}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 3; litteral](str){covariance}<LSEP>[argument 4; litteral](logical){FALSE}<LEND>[](symbol){acf}<LEND>[](symbol){}<LSEP>[](symbol){}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){d.var}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){d.cov}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){d.cov}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){d}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){dv}<LSEP>[](symbol){d.var}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){dv}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){STATISTIC}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 1; call](){}<LSEP>[](symbol){sqrt}<LSEP>[](symbol){dv}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Variance of DM statistic is zero}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Variance is negative, using ho...}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){dm.test}<LSEP>[](symbol){e1}<LSEP>[](symbol){e2}<LSEP>[](symbol){alternative}<LSEP>[argument 3; litteral](real){1.000000}<LSEP>[](symbol){power}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){d}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){h}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){h}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){STATISTIC}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){STATISTIC}<LSEP>[](symbol){k}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){STATISTIC}<LEND>[litteral](str){DM}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){alternative}<LSEP>[argument 1; litteral](str){two.sided}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){PVAL}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){pt}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){STATISTIC}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){alternative}<LSEP>[argument 1; litteral](str){less}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){PVAL}<LEND>[call](){}<LSEP>[](symbol){pt}<LSEP>[](symbol){STATISTIC}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){alternative}<LSEP>[argument 1; litteral](str){greater}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){PVAL}<LEND>[call](){}<LSEP>[](symbol){pt}<LSEP>[](symbol){STATISTIC}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](logical){FALSE}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){PARAMETER}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){h}<LSEP>[](symbol){power}<LEND>[statement 12; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){PARAMETER}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Forecast horizon}<LSEP>[argument 1; litteral](str){Loss function power}<LEND>[statement 13; call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){STATISTIC}<LSEP>[](symbol){PARAMETER}<LSEP>[](symbol){alternative}<LSEP>[](symbol){PVAL}<LSEP>[argument 4; litteral](str){Diebold-Mariano Test}<LEND>[argument 5; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){e1}<LEND>[argument 1; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){e2}<LEND>[argument 1; litteral](str){htest}<LEND>[assign](){<-}<LSEP>[](symbol){is.htest}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){htest} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){toMat}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.matrix}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){x}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){datamat}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){...}<LSEP>[](symbol){flatten}<LSEP>[](symbol){functions}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){vars}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){vars}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){vars}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){vars}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){nzchar}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){vars}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){...}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){nzchar}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){vars}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){vars}<LEND>[call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){...}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 3; control flow](){if}<LSEP>[](symbol){flatten}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){i}<LSEP>[litteral](real){1.000000}<LEND>[statement 1; control flow](){while}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){vars}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){vars}<LSEP>[](symbol){i}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){vars}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){vars}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){vars}<LSEP>[](symbol){i}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){vars}<LSEP>[](symbol){i}<LEND>[litteral](NULL){NULL}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){vars}<LSEP>[](symbol){i}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){vars}<LSEP>[](symbol){i}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){vars}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){vars}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){vars}<LSEP>[](symbol){i}<LEND>[](symbol){}<LSEP>[](symbol){j}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){vars}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){vars}<LEND>[call](){}<LSEP>[](symbol){make.names}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){vars}<LSEP>[](symbol){i}<LEND>[](symbol){j}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){vars}<LEND>[litteral](str){data.frame}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){row.names}<LSEP>[](symbol){vars}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){vars}<LSEP>[](symbol){NROW}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){vars}<LEND>[assign](){<-}<LSEP>[](symbol){recoverTSP}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){times.x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){sort}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){%%}<LSEP>[](symbol){times.x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){6.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){freq}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){times.x}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){times.x}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){times.x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){freq}<LEND>[](symbol){freq} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){forecast.varest}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){vector}<LSEP>[argument 0; litteral](str){list}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){K}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){vres}<LEND>[call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){object}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){vfits}<LEND>[call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){object}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){VAR(}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){p}<LEND>[argument 2; litteral](str){)}<LEND>[statement 5; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){seq_along}<LSEP>[](symbol){level}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){pr}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){level}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){100.000000}<LEND>[](symbol){...}<LEND>[statement 1; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){K}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){forecast}<LEND>[](symbol){j}<LEND>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){forecast}<LEND>[](symbol){j}<LEND>[](symbol){lower}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pr}<LSEP>[](symbol){fcst}<LEND>[](symbol){j}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){lower}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){forecast}<LEND>[](symbol){j}<LEND>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){forecast}<LEND>[](symbol){j}<LEND>[](symbol){upper}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pr}<LSEP>[](symbol){fcst}<LEND>[](symbol){j}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){upper}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){j}<LSEP>[litteral](real){1.000000}<LEND>[statement 7; control flow](){for}<LSEP>[](symbol){fcast}<LEND>[range; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){forecast}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){mean}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pr}<LSEP>[](symbol){fcst}<LEND>[](symbol){j}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){fcst}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lower}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){upper}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lower}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){paste0}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](str){%}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){residuals}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){residuals}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){vres}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){residuals}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){vres}<LSEP>[](symbol){}<LSEP>[](symbol){j}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){vfits}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){vfits}<LSEP>[](symbol){}<LSEP>[](symbol){j}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){method}<LEND>[](symbol){method}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){level}<LEND>[](symbol){level}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[](symbol){}<LSEP>[](symbol){j}<LEND>[statement 10; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[](symbol){j}<LEND>[statement 11; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){residuals}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){fitted}<LEND>[](symbol){tspx}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){fcast}<LSEP>[argument 1; litteral](str){forecast}<LEND>[statement 13; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){forecast}<LEND>[](symbol){j}<LEND>[](symbol){fcast}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){j}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){forecast}<LEND>[call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pr}<LSEP>[](symbol){fcst}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){method}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){K}<LEND>[statement 10; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){forecast}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pr}<LSEP>[](symbol){fcst}<LEND>[statement 11; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){out}<LSEP>[argument 1; litteral](str){mforecast} |
[](){expression}<LSEP>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[](symbol){forecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; call](){}<LSEP>[](symbol){UseMethod}<LSEP>[argument 0; litteral](str){forecast}<LEND>[assign](){<-}<LSEP>[](symbol){forecast.default}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; call](){}<LSEP>[](symbol){forecast.ts}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[assign](){<-}<LSEP>[](symbol){findfrequency}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){residuals}<LEND>[argument 0; call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){x}<LSEP>[](symbol){trend}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){n.freq}<LSEP>[litteral](real){500.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){spec}<LEND>[call](){}<LSEP>[](symbol){spec.ar}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){na.contiguous}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](logical){FALSE}<LSEP>[](symbol){n.freq}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){spec}<LSEP>[](symbol){spec}<LEND>[argument 1; litteral](real){10.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){period}<LEND>[call](){}<LSEP>[](symbol){floor}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){spec}<LSEP>[](symbol){freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){which.max}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){spec}<LSEP>[](symbol){spec}<LEND>[argument 1; litteral](real){0.500000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){period}<LSEP>[argument 1; litteral](real){inf}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){diff}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){spec}<LSEP>[](symbol){spec}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){j}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nextmax}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){j}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){which.max}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){spec}<LSEP>[](symbol){spec}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){j}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){n.freq}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){nextmax}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){spec}<LSEP>[](symbol){freq}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){period}<LEND>[call](){}<LSEP>[](symbol){floor}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){spec}<LSEP>[](symbol){freq}<LEND>[](symbol){nextmax}<LEND>[argument 1; litteral](real){0.500000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){period}<LSEP>[litteral](integer){1}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){period}<LSEP>[litteral](integer){1}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){period}<LSEP>[litteral](integer){1}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){period}<LEND>[assign](){<-}<LSEP>[](symbol){forecast.ts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){robust}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){find.frequency}<LSEP>[](symbol){allow.multiplicative.trend}<LSEP>[](symbol){model}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){object}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){find.frequency}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){findfrequency}<LSEP>[](symbol){object}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){obj.freq}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){object}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){obj.freq}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){object}<LEND>[statement 2; control flow](){if}<LSEP>[](symbol){robust}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){tsclean}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](logical){TRUE}<LSEP>[](symbol){lambda}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){model}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){model}<LSEP>[argument 1; litteral](str){forecast}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){model}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){model}<LSEP>[argument 1; litteral](str){ets}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LSEP>[](symbol){...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){model}<LSEP>[argument 1; litteral](str){Arima}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LSEP>[](symbol){...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){model}<LSEP>[argument 1; litteral](str){tbats}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){tbats}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LSEP>[](symbol){...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){model}<LSEP>[argument 1; litteral](str){bats}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){bats}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LSEP>[](symbol){...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){model}<LSEP>[argument 1; litteral](str){nnetar}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){nnetar}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LSEP>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Unknown model class}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){obj.freq}<LSEP>[argument 1; litteral](real){13.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){allow.multiplicative.trend}<LSEP>[](symbol){...}<LEND>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){obj.freq}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){stlf}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){allow.multiplicative.trend}<LSEP>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](str){ZZN}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){allow.multiplicative.trend}<LSEP>[](symbol){...}<LEND>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){meanf}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){object}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){out}<LEND>[assign](){<-}<LSEP>[](symbol){print.forecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.data.frame}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){summary.forecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){summary.forecast}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[](symbol){object}<LEND>[assign](){<-}<LSEP>[](symbol){print.summary.forecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){\nForecast method:}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){method}<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){\n\nModel Information:\n}<LEND>[statement 2; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){model}<LEND>[statement 3; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\nError measures:\n}<LEND>[statement 4; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){x}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){mean}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n No forecasts\n}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\nForecasts:\n}<LEND>[statement 1; call](){}<LSEP>[](symbol){NextMethod}<LEND>[assign](){<-}<LSEP>[](symbol){plotlmforecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){PI}<LSEP>[](symbol){shaded}<LSEP>[](symbol){shadecols}<LSEP>[](symbol){col}<LSEP>[](symbol){fcol}<LSEP>[](symbol){pi.col}<LSEP>[](symbol){pi.lty}<LSEP>[](symbol){xlim}<LSEP>[](symbol){ylim}<LSEP>[](symbol){main}<LSEP>[](symbol){ylab}<LSEP>[](symbol){xlab}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xvar}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){attributes}<LEND>[argument 0; call](){}<LSEP>[](symbol){terms}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){term.labels}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){xvar}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Forecast plot for regression m...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){newdata}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){newdata}<LEND>[](symbol){xvar}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xlim}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xlim}<LEND>[call](){}<LSEP>[](symbol){range}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){newdata}<LEND>[](symbol){}<LSEP>[](symbol){xvar}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){model.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){}<LSEP>[](symbol){xvar}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ylim}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ylim}<LEND>[call](){}<LSEP>[](symbol){range}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){upper}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lower}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[argument 1; call](){}<LSEP>[](symbol){residuals}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[statement 4; call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){formula}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[argument 1; call](){}<LSEP>[](symbol){model.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){xlim}<LSEP>[](symbol){ylim}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){main}<LSEP>[](symbol){col}<LSEP>[](symbol){...}<LEND>[statement 5; call](){}<LSEP>[](symbol){abline}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){nf}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){mean}<LEND>[statement 7; control flow](){if}<LSEP>[](symbol){PI}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nint}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){level}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){idx}<LEND>[call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){level}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){shadecols}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){50.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){shadecols}<LEND>[call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){colorspace}<LSEP>[](symbol){sequential_hcl}<LEND>[argument 0; litteral](real){100.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){level}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){shadecols}<LEND>[call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){colorspace}<LSEP>[](symbol){sequential_hcl}<LEND>[argument 0; litteral](real){52.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){49.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){shadecols}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){shadecols}<LSEP>[argument 1; litteral](str){oldstyle}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){shadecols}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){heat.colors}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){nint}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){switch}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){nint}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){nint}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 4; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nf}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nint}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){shaded}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){lines}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){newdata}<LEND>[](symbol){i}<LSEP>[](symbol){xvar}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lower}<LEND>[](symbol){i}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){idx}<LSEP>[](symbol){j}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){upper}<LEND>[](symbol){i}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){idx}<LSEP>[](symbol){j}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){shadecols}<LSEP>[](symbol){j}<LEND>[argument 3; litteral](real){6.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){lines}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){newdata}<LEND>[](symbol){i}<LSEP>[](symbol){xvar}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lower}<LEND>[](symbol){i}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){idx}<LSEP>[](symbol){j}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){upper}<LEND>[](symbol){i}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){idx}<LSEP>[](symbol){j}<LEND>[](symbol){pi.col}<LSEP>[](symbol){pi.lty}<LEND>[statement 8; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){newdata}<LEND>[](symbol){}<LSEP>[](symbol){xvar}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){mean}<LEND>[argument 2; litteral](real){19.000000}<LSEP>[](symbol){fcol}<LEND>[assign](){<-}<LSEP>[](symbol){plot.forecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){include}<LSEP>[](symbol){PI}<LSEP>[](symbol){showgap}<LSEP>[](symbol){shaded}<LSEP>[](symbol){shadebars}<LSEP>[](symbol){shadecols}<LSEP>[](symbol){col}<LSEP>[](symbol){fcol}<LSEP>[](symbol){pi.col}<LSEP>[](symbol){pi.lty}<LSEP>[](symbol){ylim}<LSEP>[](symbol){main}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){type}<LSEP>[](symbol){flty}<LSEP>[](symbol){flwd}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){x}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){level}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){PI}<LSEP>[litteral](logical){FALSE}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.finite}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){PI}<LSEP>[litteral](logical){FALSE}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){shaded}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){shadebars}<LSEP>[litteral](logical){FALSE}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){main}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){main}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Forecasts from }<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){method}<LEND>[argument 2; litteral](str){}<LEND>[statement 4; control flow](){if}<LSEP>[](symbol){PI}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){lm}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){model}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){ts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){mean}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){plotlmforecast}<LSEP>[](symbol){x}<LSEP>[](symbol){PI}<LSEP>[](symbol){shaded}<LSEP>[](symbol){shadecols}<LSEP>[](symbol){col}<LSEP>[](symbol){fcol}<LSEP>[](symbol){pi.col}<LSEP>[](symbol){pi.lty}<LSEP>[](symbol){ylim}<LSEP>[](symbol){main}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){...}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){PI}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){invisible}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){invisible}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){mean}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){xx}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){include}<LSEP>[litteral](real){0.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){include}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){include}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){xx}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){xx}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){n}<LSEP>[litteral](real){0.000000}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){xx}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){xx}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){strt}<LEND>[call](){}<LSEP>[](symbol){start}<LSEP>[](symbol){xx}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){nx}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){xx}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){xxx}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nx}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){include}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){include}<LSEP>[](symbol){nx}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){showgap}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lastObs}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lastTime}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){mean}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){lastObs}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){mean}<LEND>[](symbol){lastTime}<LSEP>[](symbol){freq}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){lastObs}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[](symbol){lastTime}<LSEP>[](symbol){freq}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){lastObs}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[](symbol){lastTime}<LSEP>[](symbol){freq}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){mean}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){strt}<LEND>[call](){}<LSEP>[](symbol){start}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){mean}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){nx}<LEND>[assign](){<-}<LSEP>[](symbol){include}<LSEP>[litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){xx}<LEND>[assign](){<-}<LSEP>[](symbol){xxx}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){freq}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){mean}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){freq}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){showgap}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Removing the gap requires hist...}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){pred.mean}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){mean}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ylim}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ylim}<LEND>[call](){}<LSEP>[](symbol){range}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[](symbol){include}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){n}<LEND>[](symbol){pred.mean}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){PI}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ylim}<LEND>[call](){}<LSEP>[](symbol){range}<LSEP>[](symbol){ylim}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){npred}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){pred.mean}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){tsx}<LEND>[call](){}<LSEP>[](symbol){is.ts}<LSEP>[](symbol){pred.mean}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){tsx}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){pred.mean}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){pred.mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){nx}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){type}<LSEP>[litteral](str){p}<LEND>[statement 15; call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xxx}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){nx}<LSEP>[](symbol){include}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){nx}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){npred}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){xx}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){nx}<LSEP>[](symbol){n}<LEND>[](symbol){freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){npred}<LSEP>[](symbol){freq}<LEND>[](symbol){freq}<LEND>[](symbol){xlab}<LSEP>[](symbol){ylim}<LSEP>[](symbol){ylab}<LSEP>[](symbol){main}<LSEP>[](symbol){col}<LSEP>[](symbol){type}<LSEP>[](symbol){...}<LEND>[statement 16; control flow](){if}<LSEP>[](symbol){PI}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xxx}<LEND>[call](){}<LSEP>[](symbol){time}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xxx}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){pred.mean}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){npred}<LEND>[](symbol){freq}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){idx}<LEND>[call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){level}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){nint}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){level}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){shadecols}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){50.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){shadecols}<LEND>[call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){colorspace}<LSEP>[](symbol){sequential_hcl}<LEND>[argument 0; litteral](real){100.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){level}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){shadecols}<LEND>[call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){colorspace}<LSEP>[](symbol){sequential_hcl}<LEND>[argument 0; litteral](real){52.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){49.000000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){shadecols}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){shadecols}<LSEP>[argument 1; litteral](str){oldstyle}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){shadecols}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){heat.colors}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){nint}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){switch}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){nint}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){nint}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 5; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nint}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){shadebars}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){npred}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){polygon}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xxx}<LSEP>[](symbol){j}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; litteral](real){0.500000}<LSEP>[argument 2; litteral](real){0.500000}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[](symbol){freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[](symbol){j}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){idx}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[](symbol){j}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){idx}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){shadecols}<LSEP>[](symbol){i}<LEND>[argument 3; litteral](logical){FALSE}<LEND>[false branch; control flow](){if}<LSEP>[](symbol){shaded}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){polygon}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){xxx}<LEND>[argument 1; call](){}<LSEP>[](symbol){rev}<LSEP>[](symbol){xxx}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){idx}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){idx}<LSEP>[](symbol){i}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){shadecols}<LSEP>[](symbol){i}<LEND>[argument 3; litteral](logical){FALSE}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){npred}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){lines}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){xxx}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; litteral](real){0.500000}<LEND>[](symbol){freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){idx}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){2.000000}<LEND>[](symbol){pi.col}<LSEP>[](symbol){pi.lty}<LEND>[statement 1; call](){}<LSEP>[](symbol){lines}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){xxx}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; litteral](real){0.500000}<LEND>[](symbol){freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){idx}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){2.000000}<LEND>[](symbol){pi.col}<LSEP>[](symbol){pi.lty}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){lines}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){idx}<LSEP>[](symbol){i}<LEND>[](symbol){pi.col}<LSEP>[](symbol){pi.lty}<LEND>[statement 1; call](){}<LSEP>[](symbol){lines}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){idx}<LSEP>[](symbol){i}<LEND>[](symbol){pi.col}<LSEP>[](symbol){pi.lty}<LEND>[statement 17; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){npred}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){shadebars}<LEND>[](symbol){tsx}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){lines}<LSEP>[](symbol){pred.mean}<LSEP>[](symbol){flty}<LSEP>[](symbol){flwd}<LSEP>[](symbol){fcol}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){points}<LSEP>[](symbol){pred.mean}<LSEP>[](symbol){fcol}<LSEP>[argument 2; litteral](real){19.000000}<LEND>[statement 18; control flow](){if}<LSEP>[](symbol){PI}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){invisible}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){pred.mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){invisible}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){pred.mean}<LEND>[assign](){<-}<LSEP>[](symbol){predict.default}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[assign](){<-}<LSEP>[](symbol){hfitted}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){FUN}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){object}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){FUN}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){FUN}<LEND>[call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[statement 1; control flow](){for}<LSEP>[](symbol){i}<LSEP>[](symbol){FUN}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){exists}<LSEP>[](symbol){i}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){typeof}<LEND>[argument 0; call](){}<LSEP>[](symbol){eval}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){parse}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){closure}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){FUN}<LSEP>[](symbol){i}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){i}<LSEP>[litteral](str){Y}<LEND>[statement 2; control flow](){break}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](str){Y}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Could not find appropriate fun...}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){object}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){object}<LEND>[argument 1; litteral](logical){NA}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){fits}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){refitarg}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](NULL){NULL}<LSEP>[](symbol){object}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){refitarg}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){formals}<LSEP>[](symbol){FUN}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){fcarg}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){FUN}<LSEP>[argument 1; litteral](str){ets}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refitarg}<LSEP>[](symbol){use.initial.values}<LEND>[litteral](logical){TRUE}<LEND>[statement 10; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[](symbol){h}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){refitarg}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refitarg}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){i}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcarg}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[](symbol){h}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcarg}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; call](){}<LSEP>[](symbol){do.call}<LSEP>[](symbol){FUN}<LSEP>[](symbol){refitarg}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcarg}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){sigma2}<LEND>[true branch; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcarg}<LSEP>[](symbol){object}<LEND>[](symbol){sigma2}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){sigma2}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fits}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[](symbol){h}<LEND>[call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){do.call}<LSEP>[argument 0; litteral](str){forecast}<LSEP>[](symbol){fcarg}<LEND>[](symbol){mean}<LEND>[](symbol){h}<LEND>[statement 11; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fits}<LEND>[assign](){<-}<LSEP>[](symbol){forecast.forecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){input_names}<LEND>[call](){}<LSEP>[](symbol){as.list}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){level}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){input_names}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){...}<LEND>[argument 1; litteral](str){level}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LSEP>[](symbol){level}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){level}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Please set the level argument ...}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){h}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){input_names}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){h}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){...}<LEND>[argument 1; litteral](str){h}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){h}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){mean}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Please select a longer horizon...}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){tspf}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){mean}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){mean}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspf}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspf}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){upper}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){upper}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[](symbol){}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspf}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspf}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lower}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[](symbol){}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspf}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspf}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){object}<LEND>[assign](){<-}<LSEP>[](symbol){subset.forecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){mean}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){mean}<LEND>[call](){}<LSEP>[](symbol){subset}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){mean}<LEND>[](symbol){...}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){subset}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[](symbol){...}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){subset}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[](symbol){...}<LEND>[statement 4; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){is.forecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){forecast}<LEND>[assign](){<-}<LSEP>[](symbol){as.ts.forecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){df}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.data.frame.forecast}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){df}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){mean}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){df}<LEND>[assign](){<-}<LSEP>[](symbol){as.data.frame.mforecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tmp}<LEND>[call](){}<LSEP>[](symbol){lapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){forecast}<LEND>[](symbol){as.data.frame}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){tmp}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){times}<LEND>[call](){}<LSEP>[](symbol){rownames}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tmp}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){h}<LEND>[call](){}<LSEP>[](symbol){NROW}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tmp}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){output}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){times}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){series}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){h}<LEND>[argument 2; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tmp}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){tmp}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){tmp}<LEND>[body; assign](){<-}<LSEP>[](symbol){output}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){output}<LEND>[argument 1; call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){times}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){series}<LSEP>[](symbol){i}<LEND>[](symbol){h}<LEND>[argument 2; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tmp}<LSEP>[](symbol){i}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){output}<LEND>[litteral](NULL){NULL}<LEND>[statement 7; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){output}<LEND>[assign](){<-}<LSEP>[](symbol){as.data.frame.forecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nconf}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){level}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){mean}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){ists}<LEND>[call](){}<LSEP>[](symbol){is.ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){mean}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){fr.x}<LEND>[call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){mean}<LEND>[statement 4; control flow](){if}<LSEP>[](symbol){ists}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){out}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){out}<LEND>[](symbol){tsp}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){attributes}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){mean}<LEND>[](symbol){tsp}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){names}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Point Forecast}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){level}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[statement 2; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nconf}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[](symbol){}<LSEP>[](symbol){i}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[](symbol){}<LSEP>[](symbol){i}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){names}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){names}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Lo}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){level}<LEND>[](symbol){i}<LEND>[argument 2; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Hi}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){level}<LEND>[](symbol){i}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){out}<LEND>[](symbol){names}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){tx}<LEND>[call](){}<LSEP>[](symbol){time}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){mean}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){tx}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LSEP>[](symbol){tx}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nd}<LSEP>[litteral](integer){0}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nd}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){log10}<LSEP>[](symbol){fr.x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](integer){2}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){nd}<LSEP>[argument 1; litteral](integer){0}<LEND>[true branch; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){round}<LSEP>[](symbol){tx}<LEND>[false branch; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){format}<LSEP>[](symbol){tx}<LSEP>[](symbol){nd}<LSEP>[](symbol){nd}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){ists}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.data.frame}<LSEP>[](symbol){out}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){out}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){calendar}<LEND>[call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){fr.x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){4.000000}<LSEP>[argument 1; litteral](real){12.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){start}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){2}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){Tsp}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 15; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){Tsp}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){series is corrupt, with no 'ts...}<LEND>[statement 1; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){unclass}<LSEP>[](symbol){x}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){invisible}<LSEP>[](symbol){x}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){nn}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Tsp}<LSEP>[argument 1; litteral](integer){2}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Tsp}<LSEP>[argument 1; litteral](integer){1}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Tsp}<LSEP>[argument 1; litteral](integer){3}<LEND>[statement 17; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){x}<LEND>[](symbol){nn}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LEND>[argument 0; call](){}<LSEP>[](symbol){gettextf}<LSEP>[argument 0; litteral](str){series is corrupt: length %d w...}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){x}<LEND>[](symbol){nn}<LEND>[argument 1; litteral](logical){NA}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){calendar}<LSEP>[litteral](logical){FALSE}<LEND>[statement 18; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){calendar}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){fr.x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){dn2}<LEND>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){fr.x}<LSEP>[argument 1; litteral](real){12.000000}<LEND>[true branch; block](){}<LSEP>[](symbol){month.abb}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){fr.x}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Qtr1}<LSEP>[argument 1; litteral](str){Qtr2}<LSEP>[argument 2; litteral](str){Qtr3}<LSEP>[argument 3; litteral](str){Qtr4}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](integer){1}<LSEP>[](symbol){fr.x}<LEND>[argument 2; litteral](str){}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){x}<LEND>[](symbol){fr.x}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){start}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){1}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){end}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){1}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){dn1}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){start}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){1}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){dn2}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dn2}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){%%}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){start}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){2}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){seq_along}<LSEP>[](symbol){x}<LEND>[](symbol){fr.x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){format}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[argument 1; litteral](integer){1}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[argument 3; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){dn1}<LSEP>[](symbol){dn2}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){start.pad}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){start}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){2}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){end.pad}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){fr.x}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){end}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){2}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){dn1}<LEND>[call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){start}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){1}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){end}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){1}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep.int}<LSEP>[argument 0; litteral](str){}<LSEP>[](symbol){start.pad}<LEND>[argument 1; call](){}<LSEP>[](symbol){format}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[argument 2; call](){}<LSEP>[](symbol){rep.int}<LSEP>[argument 0; litteral](str){}<LSEP>[](symbol){end.pad}<LEND>[](symbol){fr.x}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[argument 3; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){dn1}<LSEP>[](symbol){dn2}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){x}<LEND>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){x}<LEND>[](symbol){tx}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){class}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){tsp}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){na.action}<LEND>[litteral](NULL){NULL}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LSEP>[](symbol){calendar}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){fr.x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tm}<LEND>[call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){t2}<LEND>[call](){}<LSEP>[](symbol){cycle}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){p1}<LEND>[call](){}<LSEP>[](symbol){format}<LEND>[argument 0; call](){}<LSEP>[](symbol){floor}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){tm}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){x}<LEND>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){fr.x}<LSEP>[argument 1; litteral](real){12.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){month.abb}<LSEP>[](symbol){t2}<LEND>[](symbol){p1}<LSEP>[argument 2; litteral](str){ }<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){p1}<LEND>[argument 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){fr.x}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Q1}<LSEP>[argument 1; litteral](str){Q2}<LSEP>[argument 2; litteral](str){Q3}<LSEP>[argument 3; litteral](str){Q4}<LEND>[](symbol){t2}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){format}<LSEP>[](symbol){t2}<LEND>[argument 2; litteral](str){ }<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){format}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){x}<LEND>[](symbol){nd}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){class}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){tsp}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){na.action}<LEND>[litteral](NULL){NULL}<LEND>[statement 19; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.data.frame}<LSEP>[](symbol){x} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){bats}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){use.box.cox}<LSEP>[](symbol){use.trend}<LSEP>[](symbol){use.damped.trend}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){use.arma.errors}<LSEP>[](symbol){use.parallel}<LSEP>[](symbol){num.cores}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){model}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.numeric}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){y should be a univariate time ...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){seriesname}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){origy}<LSEP>[](symbol){y}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){attr_y}<LEND>[call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){origy}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](str){msts}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](str){msts}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](str){ts}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){y}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){y}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LSEP>[litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 1; litteral](integer){0}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LSEP>[litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](str){ts}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){msts}<LSEP>[](symbol){y}<LSEP>[](symbol){seasonal.periods}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LEND>[call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){pmax}<LSEP>[](symbol){seasonal.periods}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasonal.periods}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LSEP>[litteral](NULL){NULL}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){ny}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){na.contiguous}<LSEP>[](symbol){y}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){ny}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Missing values encountered. Us...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attr_y}<LSEP>[](symbol){tsp}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attr_y}<LSEP>[](symbol){tsp}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){range}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){y}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){refitModel}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitPreviousBATSModel}<LSEP>[](symbol){y}<LSEP>[](symbol){model}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){refitModel}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.constant}<LSEP>[](symbol){y}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){ny}<LEND>[argument 2; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[](symbol){y}<LEND>[argument 4; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 5; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 6; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 7; litteral](real){0.000000}<LSEP>[argument 8; litteral](real){0.999900}<LSEP>[argument 9; litteral](str){BATS}<LEND>[argument 10; call](){}<LSEP>[](symbol){match.call}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){fit}<LSEP>[argument 1; litteral](str){bats}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){use.box.cox}<LSEP>[litteral](logical){FALSE}<LEND>[statement 13; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){use.box.cox}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){use.trend}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LSEP>[](symbol){use.parallel}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LSEP>[](symbol){use.trend}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){use.damped.trend}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){use.parallel}<LSEP>[litteral](logical){FALSE}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){use.trend}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){use.parallel}<LSEP>[litteral](logical){FALSE}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal.mask}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasonal.periods}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){seasonal.mask}<LEND>[statement 15; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){use.box.cox}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){use.trend}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){use.parallel}<LSEP>[litteral](logical){FALSE}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){use.box.cox}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){use.box.cox}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](logical){FALSE}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 17; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LSEP>[](symbol){use.box.cox}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){init.box.cox}<LEND>[call](){}<LSEP>[](symbol){BoxCox.lambda}<LSEP>[](symbol){y}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){init.box.cox}<LSEP>[litteral](NULL){NULL}<LEND>[statement 18; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){use.trend}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){use.trend}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](logical){FALSE}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){use.trend}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){use.damped.trend}<LSEP>[litteral](logical){FALSE}<LEND>[statement 19; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){use.damped.trend}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){use.damped.trend}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](logical){FALSE}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){y}<LEND>[statement 21; control flow](){if}<LSEP>[](symbol){use.parallel}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){control.array}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; control flow](){for}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){use.box.cox}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){trend}<LSEP>[](symbol){use.trend}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){damping}<LSEP>[](symbol){use.damped.trend}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){trend}<LEND>[](symbol){damping}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){next}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){control.line}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){trend}<LSEP>[](symbol){damping}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){control.array}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){control.array}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){control.array}<LSEP>[](symbol){control.line}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){control.array}<LSEP>[](symbol){control.line}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){num.cores}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){num.cores}<LEND>[call](){}<LSEP>[](symbol){detectCores}<LSEP>[argument 0; litteral](logical){FALSE}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){clus}<LEND>[call](){}<LSEP>[](symbol){makeCluster}<LSEP>[](symbol){num.cores}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){models.list}<LEND>[call](){}<LSEP>[](symbol){clusterApplyLB}<LSEP>[](symbol){clus}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){control.array}<LEND>[](symbol){parFilterSpecifics}<LSEP>[](symbol){y}<LSEP>[](symbol){control.array}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){use.arma.errors}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[statement 5; call](){}<LSEP>[](symbol){stopCluster}<LSEP>[](symbol){clus}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){aics}<LEND>[call](){}<LSEP>[](symbol){numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){control.array}<LEND>[statement 7; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){control.array}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){aics}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){models.list}<LSEP>[](symbol){i}<LEND>[](symbol){AIC}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){best.number}<LEND>[call](){}<LSEP>[](symbol){which.min}<LSEP>[](symbol){aics}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){best.model}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){models.list}<LSEP>[](symbol){best.number}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){best.aic}<LSEP>[litteral](real){inf}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){best.model}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; control flow](){for}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){use.box.cox}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){trend}<LSEP>[](symbol){use.trend}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){damping}<LSEP>[](symbol){use.damped.trend}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){current.model}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){filterSpecifics}<LSEP>[](symbol){y}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){trend}<LSEP>[](symbol){damping}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){use.arma.errors}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){current.model}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){current.model}<LSEP>[](symbol){AIC}<LEND>[](symbol){best.aic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){best.aic}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){current.model}<LSEP>[](symbol){AIC}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){best.model}<LSEP>[](symbol){current.model}<LEND>[statement 22; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){best.model}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Unable to fit a model}<LEND>[statement 23; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){best.model}<LSEP>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 24; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){best.model}<LSEP>[](symbol){optim.return.code}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){optim() did not converge.}<LEND>[statement 25; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attributes}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){best.model}<LSEP>[](symbol){fitted.values}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attributes}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){best.model}<LSEP>[](symbol){errors}<LEND>[](symbol){attr_y}<LEND>[statement 26; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){best.model}<LSEP>[](symbol){y}<LEND>[](symbol){origy}<LEND>[statement 27; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){best.model}<LSEP>[](symbol){series}<LEND>[](symbol){seriesname}<LEND>[statement 28; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){best.model}<LSEP>[](symbol){method}<LEND>[litteral](str){BATS}<LEND>[statement 29; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){best.model}<LEND>[assign](){<-}<LSEP>[](symbol){filterSpecifics}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){trend}<LSEP>[](symbol){damping}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){use.arma.errors}<LSEP>[](symbol){force.seasonality}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){trend}<LEND>[](symbol){damping}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](real){inf}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){first.model}<LEND>[call](){}<LSEP>[](symbol){fitSpecificBATS}<LSEP>[](symbol){y}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){trend}<LSEP>[](symbol){damping}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){force.seasonality}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){non.seasonal.model}<LEND>[call](){}<LSEP>[](symbol){fitSpecificBATS}<LSEP>[](symbol){y}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){trend}<LSEP>[](symbol){damping}<LSEP>[argument 4; litteral](NULL){NULL}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){first.model}<LSEP>[](symbol){AIC}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){non.seasonal.model}<LSEP>[](symbol){AIC}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){first.model}<LSEP>[](symbol){non.seasonal.model}<LEND>[statement 3; control flow](){if}<LSEP>[](symbol){use.arma.errors}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){arma}<LEND>[call](){}<LSEP>[](symbol){auto.arima}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){first.model}<LSEP>[](symbol){errors}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[](symbol){...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){arma}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){arma}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){p}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){q}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){starting.params}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){first.model}<LSEP>[](symbol){parameters}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){second.model}<LEND>[call](){}<LSEP>[](symbol){fitSpecificBATS}<LSEP>[](symbol){y}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){trend}<LSEP>[](symbol){damping}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){second.model}<LSEP>[](symbol){AIC}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){first.model}<LSEP>[](symbol){AIC}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){second.model}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){first.model}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){first.model}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){first.model}<LEND>[assign](){<-}<LSEP>[](symbol){parFilterSpecifics}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){control.number}<LSEP>[](symbol){control.array}<LSEP>[](symbol){y}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){use.arma.errors}<LSEP>[](symbol){force.seasonality}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){box.cox}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){control.array}<LSEP>[](symbol){control.number}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){trend}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){control.array}<LSEP>[](symbol){control.number}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){damping}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){control.array}<LSEP>[](symbol){control.number}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){trend}<LEND>[](symbol){damping}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](real){inf}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){first.model}<LEND>[call](){}<LSEP>[](symbol){fitSpecificBATS}<LSEP>[](symbol){y}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){trend}<LSEP>[](symbol){damping}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){force.seasonality}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){non.seasonal.model}<LEND>[call](){}<LSEP>[](symbol){fitSpecificBATS}<LSEP>[](symbol){y}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){trend}<LSEP>[](symbol){damping}<LSEP>[argument 4; litteral](NULL){NULL}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){first.model}<LSEP>[](symbol){AIC}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){non.seasonal.model}<LSEP>[](symbol){AIC}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){first.model}<LSEP>[](symbol){non.seasonal.model}<LEND>[statement 6; control flow](){if}<LSEP>[](symbol){use.arma.errors}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){arma}<LEND>[call](){}<LSEP>[](symbol){auto.arima}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){first.model}<LSEP>[](symbol){errors}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[](symbol){...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){arma}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){arma}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){p}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){q}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){starting.params}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){first.model}<LSEP>[](symbol){parameters}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){second.model}<LEND>[call](){}<LSEP>[](symbol){fitSpecificBATS}<LSEP>[](symbol){y}<LSEP>[](symbol){box.cox}<LSEP>[](symbol){trend}<LSEP>[](symbol){damping}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){second.model}<LSEP>[](symbol){AIC}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){first.model}<LSEP>[](symbol){AIC}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){second.model}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){first.model}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){first.model}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){first.model}<LEND>[assign](){<-}<LSEP>[](symbol){fitted.bats}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted.values}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){hfitted}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[argument 2; litteral](str){bats}<LSEP>[](symbol){...}<LEND>[assign](){<-}<LSEP>[](symbol){print.bats}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){x}<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n}<LEND>[statement 2; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\nCall: }<LEND>[statement 3; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){call}<LEND>[statement 4; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\nParameters}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n Lambda: }<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[argument 1; litteral](real){6.000000}<LEND>[statement 6; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n Alpha: }<LEND>[statement 7; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){alpha}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n Beta: }<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){beta}<LEND>[statement 2; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n Damping Parameter: }<LEND>[statement 3; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){damping.parameter}<LEND>[argument 1; litteral](real){6.000000}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){gamma.values}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n Gamma Values: }<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){gamma.values}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){ar.coefficients}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n AR coefficients: }<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){ar.coefficients}<LEND>[argument 1; litteral](real){6.000000}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){ma.coefficients}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n MA coefficients: }<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){ma.coefficients}<LEND>[argument 1; litteral](real){6.000000}<LEND>[statement 12; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n}<LEND>[statement 13; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\nSeed States:\n}<LEND>[statement 14; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){seed.states}<LEND>[statement 15; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\nSigma: }<LEND>[statement 16; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){variance}<LEND>[statement 17; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\nAIC: }<LEND>[statement 18; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){AIC}<LEND>[statement 19; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n}<LEND>[assign](){<-}<LSEP>[](symbol){plot.bats}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){main}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](str){lambda}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){y}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){nonseas}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){beta}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){nseas}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){gamma.values}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){gamma.values}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seas.states}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){beta}<LEND>[](symbol){}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){cumsum}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){seasonal.periods}<LEND>[statement 2; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nseas}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seas.states}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){j}<LSEP>[](symbol){i}<LEND>[](symbol){}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){nseas}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){nonseas}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nseas}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){season}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nseas}<LEND>[argument 2; litteral](str){}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){out}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){y}<LEND>[statement 8; call](){}<LSEP>[](symbol){plot.ts}<LSEP>[](symbol){out}<LSEP>[](symbol){main}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[](symbol){...}<LEND>[assign](){<-}<LSEP>[](symbol){is.bats}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){bats} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){tslm}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){formula}<LSEP>[](symbol){data}<LSEP>[](symbol){subset}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){cl}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){formula}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){formula}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){formula}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){as.formula}<LEND>[](symbol){formula}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){data}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){mt}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){terms}<LSEP>[](symbol){formula}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){mt}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Cannot extract terms from form...}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){mt}<LEND>[call](){}<LSEP>[](symbol){terms}<LSEP>[](symbol){formula}<LSEP>[](symbol){data}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){vars}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){mt}<LSEP>[argument 1; litteral](str){variables}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){tsvar}<LEND>[call](){}<LSEP>[](symbol){match}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){trend}<LSEP>[argument 1; litteral](str){season}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){vars}<LEND>[argument 2; litteral](integer){0}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){fnvar}<LSEP>[litteral](NULL){NULL}<LEND>[statement 6; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){vars}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){term}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){vars}<LSEP>[](symbol){i}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.symbol}<LSEP>[](symbol){term}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){typeof}<LEND>[argument 0; call](){}<LSEP>[](symbol){eval}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){term}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){closure}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fnvar}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){fnvar}<LSEP>[](symbol){i}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){formula}<LSEP>[argument 1; litteral](str){.Environment}<LEND>[call](){}<LSEP>[](symbol){environment}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){formula}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){as.symbol}<LEND>[argument 0; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){formula}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){tsvar}<LSEP>[](symbol){fnvar}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){rmvar}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){tsvar}<LSEP>[](symbol){fnvar}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){rmvar}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){rmvar}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){rmvar}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){mt}<LSEP>[argument 1; litteral](str){response}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){rmvar}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){vars}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){vars}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){rmvar}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){data}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){vars}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){vars}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](logical){TRUE}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){vars}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){data}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){dataname}<LEND>[call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){data}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){data}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){datamat}<LEND>[argument 0; call](){}<LSEP>[](symbol){do.call}<LSEP>[](symbol){datamat}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.list}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){vars}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){parent.frame}<LEND>[](symbol){data}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){do.call}<LSEP>[](symbol){datamat}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.list}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){vars}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){parent.frame}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){data}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){cn}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){vars}<LEND>[argument 1; litteral](real){2.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){cn}<LEND>[call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){data}<LEND>[statement 13; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){data}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){mt}<LSEP>[argument 1; litteral](str){response}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){fnvar}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){eval}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){mt}<LSEP>[argument 1; litteral](str){variables}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){mt}<LSEP>[argument 1; litteral](str){response}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){data}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){tspx}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Not time series data, use lm()}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){tsdat}<LEND>[call](){}<LSEP>[](symbol){match}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){trend}<LSEP>[argument 1; litteral](str){season}<LEND>[](symbol){cn}<LSEP>[argument 2; litteral](integer){0}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsdat}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){trend}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){data}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){cn}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){cn}<LSEP>[argument 1; litteral](str){trend}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){data}<LSEP>[](symbol){trend}<LEND>[statement 17; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsdat}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsvar}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Non-seasonal data cannot be mo...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){season}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){cycle}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){cn}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){cn}<LSEP>[argument 1; litteral](str){season}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){data}<LSEP>[](symbol){season}<LEND>[statement 18; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){data}<LEND>[](symbol){cn}<LEND>[statement 19; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){subset}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.logical}<LSEP>[](symbol){subset}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){subset must be logical}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){subset}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){subset must be a logical vector}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){subset}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){data}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Subset must be the same length...}<LEND>[statement 1; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Subset has been assumed contig...}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){timesx}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[](symbol){subset}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){recoverTSP}<LSEP>[](symbol){timesx}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsdat}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsvar}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Non-seasonal data cannot be mo...}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){subset}<LSEP>[](symbol){}<LEND>[statement 20; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){resp_var}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){mt}<LSEP>[argument 1; litteral](str){variables}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){mt}<LSEP>[argument 1; litteral](str){response}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[](symbol){resp_var}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[](symbol){resp_var}<LEND>[](symbol){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[](symbol){resp_var}<LEND>[argument 1; litteral](str){lambda}<LEND>[statement 21; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsdat}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsvar}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){season}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){season}<LEND>[statement 22; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){lm}<LSEP>[](symbol){formula}<LSEP>[](symbol){data}<LSEP>[](symbol){na.exclude}<LSEP>[](symbol){...}<LEND>[statement 23; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){data}<LEND>[](symbol){data}<LEND>[statement 24; assign](){<-}<LSEP>[](symbol){responsevar}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){formula}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 25; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){residuals}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){fit}<LEND>[statement 26; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){residuals}<LEND>[statement 27; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){model.frame}<LSEP>[](symbol){fit}<LEND>[](symbol){}<LSEP>[](symbol){responsevar}<LEND>[statement 28; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted.values}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){fit}<LEND>[statement 29; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){residuals}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted.values}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[](symbol){tspx}<LEND>[statement 30; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){call}<LEND>[](symbol){cl}<LEND>[statement 31; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){method}<LEND>[litteral](str){Linear regression model}<LEND>[statement 32; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){exists}<LSEP>[argument 0; litteral](str){dataname}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){call}<LEND>[](symbol){data}<LEND>[](symbol){dataname}<LEND>[statement 33; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](str){biasadj}<LEND>[](symbol){biasadj}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){lambda}<LEND>[](symbol){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted.values}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted.values}<LEND>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[argument 3; call](){}<LSEP>[](symbol){var}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){residuals}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[](symbol){lambda}<LEND>[statement 34; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){tslm}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){fit}<LEND>[statement 35; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fit}<LEND>[assign](){<-}<LSEP>[](symbol){fitted.tslm}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted.values}<LEND>[assign](){<-}<LSEP>[](symbol){forecast.lm}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){newdata}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){ts}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){fan}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){51.000000}<LSEP>[argument 1; litteral](real){99.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){100.000000}<LSEP>[](symbol){level}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){99.990000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Confidence limit out of range}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){data}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){origdata}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){data}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){origdata}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){call}<LEND>[](symbol){data}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){origdata}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){eval}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){call}<LEND>[](symbol){data}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){origdata}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Could not find data. Try train...}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){origdata}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){object}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){data.frame}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){origdata}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){origdata}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LSEP>[](symbol){origdata}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){data.frame}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){origdata}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Could not find data. Try trai...}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LSEP>[](symbol){ts}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){ts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){origdata}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){origdata}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){timesx}<LEND>[call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){origdata}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LSEP>[](symbol){ts}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){ts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){origdata}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){origdata}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){timesx}<LEND>[call](){}<LSEP>[](symbol){time}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){origdata}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LSEP>[](symbol){ts}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){ts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){object}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){timesx}<LEND>[call](){}<LSEP>[](symbol){time}<LEND>[argument 0; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){object}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tspx}<LSEP>[litteral](NULL){NULL}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){oldterms}<LEND>[call](){}<LSEP>[](symbol){terms}<LSEP>[](symbol){object}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){newdata}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){reqvars}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){terms}<LEND>[argument 1; litteral](str){variables}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){terms}<LEND>[argument 1; litteral](str){response}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){tsvar}<LEND>[call](){}<LSEP>[](symbol){match}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){trend}<LSEP>[argument 1; litteral](str){season}<LEND>[](symbol){reqvars}<LSEP>[argument 2; litteral](integer){0}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fnvar}<LEND>[call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){reqvars}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.symbol}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){parse}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){typeof}<LEND>[argument 0; call](){}<LSEP>[](symbol){eval}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){parse}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){closure}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.data.frame}<LSEP>[](symbol){newdata}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){newdata}<LEND>[call](){}<LSEP>[](symbol){datamat}<LSEP>[](symbol){newdata}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){newdata}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){tsvar}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){reqvars}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){tsvar}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){reqvars}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){newdata column names not speci...}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){oldnewdata}<LSEP>[](symbol){newdata}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){newvars}<LEND>[call](){}<LSEP>[](symbol){make.names}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){newdata}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){misvar}<LEND>[call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){match}<LEND>[argument 0; call](){}<LSEP>[](symbol){make.names}<LSEP>[](symbol){reqvars}<LEND>[](symbol){newvars}<LSEP>[argument 2; litteral](integer){0}<LEND>[argument 1; litteral](integer){0}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){misvar}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){fnvar}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tmpdata}<LEND>[call](){}<LSEP>[](symbol){datamat}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){newdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){reqvars}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){misvar}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){rm1}<LSEP>[litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tmpdata}<LEND>[call](){}<LSEP>[](symbol){datamat}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){newdata}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){rm1}<LSEP>[litteral](logical){TRUE}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){tsvar}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){reqvars}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){reqvars}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){tsvar}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fnvar}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fnvar}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){tsvar}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){misvar}<LEND>[call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){match}<LEND>[argument 0; call](){}<LSEP>[](symbol){make.names}<LSEP>[](symbol){reqvars}<LEND>[](symbol){newvars}<LSEP>[argument 2; litteral](integer){0}<LEND>[argument 1; litteral](integer){0}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){|}<LSEP>[](symbol){misvar}<LSEP>[](symbol){fnvar}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){reqvars}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){reqvars}<LEND>[argument 1; call](){}<LSEP>[](symbol){|}<LSEP>[](symbol){misvar}<LSEP>[](symbol){fnvar}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fnvar}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fnvar}<LEND>[argument 1; call](){}<LSEP>[](symbol){|}<LSEP>[](symbol){misvar}<LSEP>[](symbol){fnvar}<LEND>[statement 2; control flow](){for}<LSEP>[](symbol){i}<LSEP>[](symbol){reqvars}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){found}<LSEP>[litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){subvars}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coefficients}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){subvars}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){pmatch}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coefficients}<LEND>[](symbol){j}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){subvars}<LEND>[call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){subvars}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){subvars}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coefficients}<LEND>[](symbol){subvars}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){subvars}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){subvars}<LEND>[call](){}<LSEP>[](symbol){substr}<LSEP>[](symbol){subvars}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){nchar}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](integer){999}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fsub}<LEND>[call](){}<LSEP>[](symbol){match}<LEND>[argument 0; call](){}<LSEP>[](symbol){make.names}<LSEP>[](symbol){subvars}<LEND>[](symbol){newvars}<LSEP>[argument 2; litteral](integer){0}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){fsub}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fsub}<LEND>[call](){}<LSEP>[](symbol){grep}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){make.names}<LSEP>[](symbol){subvars}<LEND>[argument 1; litteral](str){|}<LEND>[](symbol){newvars}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){fsub}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){fsub}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){subvars}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){imat}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){newdata}<LSEP>[](symbol){}<LSEP>[](symbol){fsub}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){fsub}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){imat}<LEND>[](symbol){subvars}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tmpdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){tmpdata}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){imat}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){found}<LSEP>[litteral](logical){TRUE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){subvars}<LSEP>[](symbol){i}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){subvars}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fnvar}<LEND>[argument 1; call](){}<LSEP>[](symbol){match}<LSEP>[](symbol){i}<LSEP>[](symbol){reqvars}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tmpdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){tmpdata}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){eval}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){parse}<LSEP>[](symbol){subvars}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){newdata}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){found}<LSEP>[litteral](logical){TRUE}<LEND>[statement 7; control flow](){if}<LSEP>[](symbol){found}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){tmpdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){tmpdata}<LEND>[call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){solvedFN___}<LEND>[argument 1; call](){}<LSEP>[](symbol){match}<LSEP>[](symbol){i}<LSEP>[](symbol){reqvars}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){subvarloc}<LEND>[call](){}<LSEP>[](symbol){match}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){lapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){terms}<LEND>[argument 1; litteral](str){predvars}<LEND>[](symbol){deparse}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){terms}<LEND>[argument 1; litteral](str){predvars}<LEND>[](symbol){subvarloc}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){terms}<LEND>[argument 1; litteral](str){variables}<LEND>[](symbol){subvarloc}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){parse}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){solvedFN___}<LEND>[argument 1; call](){}<LSEP>[](symbol){match}<LSEP>[](symbol){i}<LSEP>[](symbol){reqvars}<LEND>[argument 1; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){Could not find required variable }<LSEP>[](symbol){i}<LSEP>[argument 2; litteral](str){ in newdata. Specify newdata a...}<LEND>[statement 10; control flow](){if}<LSEP>[](symbol){rm1}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tmpdata}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[litteral](NULL){NULL}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){newdata}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){newdata}<LSEP>[](symbol){tmpdata}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){h}<LEND>[call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){newdata}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){tspx}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){trend}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){origdata}<LSEP>[](symbol){trend}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){origdata}<LEND>[argument 2; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){origdata}<LSEP>[](symbol){trend}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){newdata}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){newdata}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){newdata}<LSEP>[](symbol){trend}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){newdata}<LEND>[call](){}<LSEP>[](symbol){datamat}<LSEP>[](symbol){trend}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){season}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){cycle}<LSEP>[](symbol){x}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){newdata}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){newdata}<LSEP>[](symbol){season}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){newdata}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LSEP>[](symbol){newdata}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){exists}<LSEP>[argument 0; litteral](str){oldnewdata}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){oldnewdata}<LSEP>[](symbol){newdata}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){newdata}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){newdata}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){newdata}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){newdata}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){formula}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[argument 1; litteral](real){3.000000}<LEND>[statement 10; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){object}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){predict_object}<LSEP>[](symbol){object}<LEND>[statement 12; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){predict_object}<LSEP>[](symbol){residuals}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){residuals}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){nl}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){level}<LEND>[statement 15; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nl}<LEND>[body; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){out}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){predict_object}<LSEP>[](symbol){newdata}<LSEP>[argument 2; litteral](logical){TRUE}<LSEP>[argument 3; litteral](str){prediction}<LEND>[argument 4; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){level}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){100.000000}<LEND>[](symbol){...}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){newdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){out}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){fit}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Variables not found in newdata}<LEND>[statement 17; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){terms}<LEND>[](symbol){oldterms}<LEND>[statement 18; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){oldterms}<LSEP>[argument 1; litteral](str){variables}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){oldterms}<LSEP>[argument 1; litteral](str){response}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){out}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){fit}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){out}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){fit}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){out}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){fit}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[](symbol){level}<LEND>[argument 5; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[argument 6; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[statement 20; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){method}<LEND>[litteral](str){Linear regression model}<LEND>[statement 21; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){newdata}<LEND>[](symbol){oldnewdata}<LEND>[statement 22; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){residuals}<LEND>[call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){object}<LEND>[statement 23; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){object}<LEND>[statement 24; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){origdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tspx}<LSEP>[litteral](NULL){NULL}<LEND>[statement 25; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){residuals}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tspx}<LSEP>[litteral](NULL){NULL}<LEND>[statement 26; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){tspx}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){residuals}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){residuals}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){fitted}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){residuals}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){fitted}<LEND>[](symbol){tspx}<LEND>[statement 27; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){nl}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){nl}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lower}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){out}<LSEP>[](symbol){i}<LEND>[](symbol){fit}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){upper}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){out}<LSEP>[](symbol){i}<LEND>[](symbol){fit}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[statement 28; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){tspx}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){mean}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){upper}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lower}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 29; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){mean}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){mean}<LEND>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){fcast}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lower}<LEND>[](symbol){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){upper}<LEND>[](symbol){lambda}<LEND>[statement 30; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){fcast}<LSEP>[argument 1; litteral](str){forecast}<LEND>[assign](){<-}<LSEP>[](symbol){summary.tslm}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){residuals}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){residuals}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted.values}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted.values}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted.values}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted.values}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[statement 3; call](){}<LSEP>[](symbol){NextMethod}<LEND>[assign](){<-}<LSEP>[](symbol){CV}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){obj}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){lm}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){obj}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){This function is for objects o...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){obj}<LSEP>[](symbol){residuals}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){extractAIC}<LSEP>[](symbol){obj}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){aic}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){extractAIC}<LSEP>[](symbol){obj}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){aicc}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){aic}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){3.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){bic}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){aic}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){log}<LSEP>[](symbol){n}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){cv}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){obj}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){hatvalues}<LSEP>[](symbol){obj}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){adjr2}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){obj}<LEND>[](symbol){adj}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){cv}<LSEP>[](symbol){aic}<LSEP>[](symbol){aicc}<LSEP>[](symbol){bic}<LSEP>[](symbol){adjr2}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){CV}<LSEP>[argument 1; litteral](str){AIC}<LSEP>[argument 2; litteral](str){AICc}<LSEP>[argument 3; litteral](str){BIC}<LSEP>[argument 4; litteral](str){AdjR2}<LEND>[statement 10; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){out} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){subset.ts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){subset}<LSEP>[](symbol){month}<LSEP>[](symbol){quarter}<LSEP>[](symbol){season}<LSEP>[](symbol){start}<LSEP>[](symbol){end}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){subset}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){subset}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){subset must be the same length...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){subset}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){subset must be a vector of row...}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){mts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){subset.matrix}<LSEP>[](symbol){x}<LSEP>[](symbol){subset}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){subset.default}<LSEP>[](symbol){x}<LSEP>[](symbol){subset}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){start}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){end}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){start}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){start}<LSEP>[litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){end}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){end}<LEND>[call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){x}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){mts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xsub}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){start}<LSEP>[](symbol){end}<LEND>[](symbol){}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xsub}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){start}<LSEP>[](symbol){end}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 4; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){xsub}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](integer){1}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){start}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](integer){3}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Data must be seasonal}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){month}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){12.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Data is not monthly}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.character}<LSEP>[](symbol){month}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){season}<LEND>[call](){}<LSEP>[](symbol){pmatch}<LEND>[argument 0; call](){}<LSEP>[](symbol){tolower}<LSEP>[](symbol){month}<LEND>[argument 1; call](){}<LSEP>[](symbol){tolower}<LSEP>[](symbol){month.name}<LEND>[argument 2; litteral](logical){TRUE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){season}<LSEP>[](symbol){month}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){season}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LSEP>[](symbol){season}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){season}<LEND>[argument 1; litteral](integer){0}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){No recognizable months}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){season}<LEND>[argument 1; litteral](integer){1}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){season}<LEND>[argument 1; litteral](integer){12}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Months must be between 1 and 12}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){quarter}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){4.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Data is not quarterly}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.character}<LSEP>[](symbol){quarter}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){season}<LEND>[call](){}<LSEP>[](symbol){pmatch}<LEND>[argument 0; call](){}<LSEP>[](symbol){tolower}<LSEP>[](symbol){quarter}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){q}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 2; litteral](str){}<LEND>[argument 2; litteral](logical){TRUE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){season}<LSEP>[](symbol){quarter}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){season}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LSEP>[](symbol){season}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){season}<LEND>[argument 1; litteral](integer){0}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){No recognizable quarters}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){season}<LEND>[argument 1; litteral](integer){1}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){season}<LEND>[argument 1; litteral](integer){4}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Quarters must be between 1 and 4}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){season}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){No subset specified}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){season}<LEND>[argument 1; litteral](integer){1}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){season}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Seasons must be between 1 and}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){start}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){utils}<LSEP>[](symbol){head}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.element}<LEND>[argument 0; call](){}<LSEP>[](symbol){cycle}<LSEP>[](symbol){x}<LEND>[](symbol){season}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){mts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){subset.matrix}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.element}<LEND>[argument 0; call](){}<LSEP>[](symbol){cycle}<LSEP>[](symbol){x}<LEND>[](symbol){season}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){subset.default}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.element}<LEND>[argument 0; call](){}<LSEP>[](symbol){cycle}<LSEP>[](symbol){x}<LEND>[](symbol){season}<LEND>[statement 4; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){season}<LEND>[](symbol){start}<LEND>[assign](){<-}<LSEP>[](symbol){head.ts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){n}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){attr_x}<LEND>[call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attr_x}<LSEP>[](symbol){names}<LEND>[litteral](NULL){NULL}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){hx}<LEND>[call](){}<LSEP>[](symbol){head.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){x}<LEND>[](symbol){n}<LSEP>[](symbol){...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[](symbol){n}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){hx}<LEND>[call](){}<LSEP>[](symbol){head}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){x}<LEND>[](symbol){n}<LSEP>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){numeric}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attr_x}<LSEP>[](symbol){tsp}<LEND>[argument 1; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attr_x}<LSEP>[](symbol){tsp}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){hx}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attr_x}<LSEP>[](symbol){tsp}<LEND>[argument 1; litteral](real){3.000000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attr_x}<LSEP>[](symbol){dim}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){hx}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){hx}<LEND>[](symbol){attr_x}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){hx}<LEND>[assign](){<-}<LSEP>[](symbol){tail.ts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){n}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){attr_x}<LEND>[call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attr_x}<LSEP>[](symbol){names}<LEND>[litteral](NULL){NULL}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){hx}<LEND>[call](){}<LSEP>[](symbol){tail.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){x}<LEND>[](symbol){n}<LSEP>[](symbol){...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[](symbol){n}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){hx}<LEND>[call](){}<LSEP>[](symbol){tail}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){x}<LEND>[](symbol){n}<LSEP>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){numeric}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attr_x}<LSEP>[](symbol){tsp}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attr_x}<LSEP>[](symbol){tsp}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){hx}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attr_x}<LSEP>[](symbol){tsp}<LEND>[argument 1; litteral](real){3.000000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attr_x}<LSEP>[](symbol){dim}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){hx}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){hx}<LEND>[](symbol){attr_x}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){hx}<LEND>[assign](){<-}<LSEP>[](symbol){subset.msts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){subset}<LSEP>[](symbol){start}<LSEP>[](symbol){end}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){subset.ts}<LSEP>[](symbol){x}<LSEP>[](symbol){start}<LSEP>[](symbol){end}<LSEP>[](symbol){...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){out}<LEND>[statement 2; call](){}<LSEP>[](symbol){msts}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){msts}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){msts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){data}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){ts.frequency}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){data}<LSEP>[argument 1; litteral](str){ts}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){data}<LEND>[](symbol){ts.frequency}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){...}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){object}<LSEP>[](symbol){data}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){data}<LSEP>[](symbol){ts.frequency}<LSEP>[](symbol){...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 1; litteral](integer){1}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){msts}<LSEP>[argument 1; litteral](str){ts}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](str){msts}<LEND>[call](){}<LSEP>[](symbol){sort}<LSEP>[](symbol){seasonal.periods}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){object}<LEND>[assign](){<-}<LSEP>[](symbol){print.msts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Multi-Seasonal Time Series:\n}<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Start: }<LEND>[statement 2; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){start}<LSEP>[](symbol){x}<LEND>[statement 3; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\nSeasonal Periods: }<LEND>[statement 4; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){msts}<LEND>[statement 5; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\nData:\n}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){unclass}<LSEP>[](symbol){x}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){xx}<LSEP>[argument 1; litteral](str){tsp}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){xx}<LSEP>[argument 1; litteral](str){msts}<LEND>[litteral](NULL){NULL}<LEND>[statement 8; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){xx}<LEND>[statement 9; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n}<LEND>[assign](){<-}<LSEP>[](symbol){window.msts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){msts}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){ts}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){window}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){msts}<LSEP>[argument 1; litteral](str){ts}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){msts}<LEND>[](symbol){seasonal.periods}<LEND>[statement 5; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){[.msts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){i}<LSEP>[](symbol){j}<LSEP>[](symbol){drop}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){NextMethod}<LSEP>[argument 0; litteral](str){[}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](str){ts}<LEND>[true branch; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){y}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){msts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){y}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](str){msts}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){msts}<LEND>[](symbol){y}<LEND>[assign](){<-}<LSEP>[](symbol){copy_msts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){y}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){y}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){y}<LEND>[](symbol){y}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){rbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){y}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){y}<LEND>[](symbol){y}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){y}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){x and y should have the same n...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){mts}<LSEP>[argument 1; litteral](str){ts}<LSEP>[argument 2; litteral](str){matrix}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){y}<LEND>[litteral](str){ts}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){msts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){x}<LEND>[true branch; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){msts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){y}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){attr}<LEND>[call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){x}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){y}<LEND>[](symbol){tsp}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attr}<LSEP>[](symbol){tsp}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){y}<LEND>[](symbol){msts}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attr}<LSEP>[](symbol){msts}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){y}<LEND>[assign](){<-}<LSEP>[](symbol){future_msts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){y}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){mts}<LSEP>[argument 1; litteral](str){ts}<LSEP>[argument 2; litteral](str){matrix}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){y}<LEND>[litteral](str){ts}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){msts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){x}<LEND>[true branch; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){msts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){y}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){attr}<LEND>[call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){x}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attr}<LSEP>[](symbol){tsp}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attr}<LSEP>[](symbol){tsp}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attr}<LSEP>[](symbol){tsp}<LEND>[argument 1; litteral](real){3.000000}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){y}<LEND>[](symbol){tsp}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attr}<LSEP>[](symbol){tsp}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){y}<LEND>[](symbol){msts}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attr}<LSEP>[](symbol){msts}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){y} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){nnetar}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){p}<LSEP>[](symbol){P}<LSEP>[](symbol){size}<LSEP>[](symbol){repeats}<LSEP>[](symbol){xreg}<LSEP>[](symbol){lambda}<LSEP>[](symbol){model}<LSEP>[](symbol){subset}<LSEP>[](symbol){scale.inputs}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){useoldmodel}<LSEP>[litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){yname}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){useoldmodel}<LSEP>[litteral](logical){TRUE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.nnetar}<LSEP>[](symbol){model}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Model must be a nnetar object}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){1}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){minlength}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){P}<LEND>[](symbol){m}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[](symbol){minlength}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Series must be at least of length}<LSEP>[](symbol){minlength}<LSEP>[argument 2; litteral](str){to use fitted model}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){3.000000}<LEND>[](symbol){m}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Data frequency doesn't match f...}<LSEP>[](symbol){m}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){x}<LSEP>[](symbol){m}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){No external regressors provided}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Number of external regressors ...}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){lambda}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){size}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){size}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){p}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){P}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){P}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lags}<LEND>[call](){}<LSEP>[](symbol){sort}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){m}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){P}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lags}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){scalex}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){scale.inputs}<LSEP>[litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](real){3.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Not enough data to fit a model}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){constant_data}<LEND>[call](){}<LSEP>[](symbol){is.constant}<LEND>[argument 0; call](){}<LSEP>[](symbol){na.interp}<LSEP>[](symbol){x}<LEND>[statement 2; control flow](){if}<LSEP>[](symbol){constant_data}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Constant data, setting p=1, P=...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){scale.inputs}<LSEP>[litteral](logical){FALSE}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){lambda}<LSEP>[litteral](NULL){NULL}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){p}<LSEP>[litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){P}<LSEP>[litteral](real){0.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){constant_xreg}<LEND>[call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){xreg}<LEND>[argument 1; litteral](real){2.000000}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){is.constant}<LEND>[argument 0; call](){}<LSEP>[](symbol){na.interp}<LSEP>[](symbol){x}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){constant_xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Constant xreg column, setting ...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){scale.inputs}<LSEP>[litteral](logical){FALSE}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Missing values in x, omitting ...}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){xx}<LSEP>[argument 1; litteral](str){lambda}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LSEP>[](symbol){x}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){xsub}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){TRUE}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.numeric}<LSEP>[](symbol){subset}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xsub}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){subset}<LEND>[litteral](logical){FALSE}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.logical}<LSEP>[](symbol){subset}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xsub}<LSEP>[](symbol){subset}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){scalex}<LSEP>[litteral](NULL){NULL}<LEND>[statement 9; control flow](){if}<LSEP>[](symbol){scale.inputs}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){useoldmodel}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){scalex}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){scalex}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tmpx}<LEND>[call](){}<LSEP>[](symbol){scale}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xx}<LSEP>[](symbol){xsub}<LEND>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){scalex}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){tmpx}<LSEP>[argument 1; litteral](str){scaled:center}<LEND>[argument 1; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){tmpx}<LSEP>[argument 1; litteral](str){scaled:scale}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){scale}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){scalex}<LSEP>[](symbol){center}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){scalex}<LSEP>[](symbol){scale}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xx}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){xxreg}<LSEP>[litteral](NULL){NULL}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){scalexreg}<LSEP>[litteral](NULL){NULL}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xxreg}<LEND>[assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){xreg}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Number of rows in xreg does no...}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Missing values in xreg, omitti...}<LEND>[statement 3; control flow](){if}<LSEP>[](symbol){scale.inputs}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){useoldmodel}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){scalexreg}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){scalexreg}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tmpx}<LEND>[call](){}<LSEP>[](symbol){scale}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xxreg}<LSEP>[](symbol){xsub}<LSEP>[](symbol){}<LEND>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){scalexreg}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){tmpx}<LSEP>[argument 1; litteral](str){scaled:center}<LEND>[argument 1; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){tmpx}<LSEP>[argument 1; litteral](str){scaled:scale}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xxreg}<LEND>[call](){}<LSEP>[](symbol){scale}<LSEP>[](symbol){xxreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){scalexreg}<LSEP>[](symbol){center}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){scalexreg}<LSEP>[](symbol){scale}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){xx}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){xx}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){xx}<LEND>[argument 1; litteral](integer){1}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){useoldmodel}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){p}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){ar}<LEND>[argument 0; call](){}<LSEP>[](symbol){na.interp}<LSEP>[](symbol){xx}<LEND>[](symbol){ar}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>=}<LSEP>[](symbol){p}<LSEP>[](symbol){n}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Reducing number of lagged inpu...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){lags}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Non-seasonal data, ignoring se...}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){P}<LSEP>[litteral](real){0.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){p}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){m}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x.sa}<LEND>[call](){}<LSEP>[](symbol){seasadj}<LEND>[argument 0; call](){}<LSEP>[](symbol){mstl}<LEND>[argument 0; call](){}<LSEP>[](symbol){na.interp}<LSEP>[](symbol){xx}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x.sa}<LEND>[call](){}<LSEP>[](symbol){na.interp}<LSEP>[](symbol){xx}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){ar}<LSEP>[](symbol){x.sa}<LEND>[](symbol){ar}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>=}<LSEP>[](symbol){p}<LSEP>[](symbol){n}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Reducing number of lagged inpu...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>=}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){m}<LSEP>[](symbol){P}<LEND>[argument 1; litteral](real){2.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lags}<LEND>[call](){}<LSEP>[](symbol){sort}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){m}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){P}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lags}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Series too short for seasonal ...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){P}<LSEP>[litteral](real){0.000000}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){maxlag}<LEND>[call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){lags}<LEND>[statement 18; assign](){<-}<LSEP>[](symbol){nlag}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){lags}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){maxlag}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){lags.X}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){nan}<LSEP>[](symbol){nlag}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[](symbol){maxlag}<LEND>[statement 21; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nlag}<LEND>[body; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lags.X}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){maxlag}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lags}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lags}<LSEP>[](symbol){i}<LEND>[statement 22; assign](){<-}<LSEP>[](symbol){lags.X}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){lags.X}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xxreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){maxlag}<LEND>[](symbol){}<LEND>[statement 23; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){size}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){size}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){lags.X}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 24; assign](){<-}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){complete.cases}<LSEP>[](symbol){lags.X}<LSEP>[](symbol){y}<LEND>[statement 25; assign](){<-}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){&}<LSEP>[](symbol){j}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xsub}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){maxlag}<LEND>[statement 26; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lags.X}<LSEP>[](symbol){j}<LSEP>[](symbol){}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){No data to fit (possibly due t...}<LEND>[statement 27; control flow](){if}<LSEP>[](symbol){useoldmodel}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){oldmodel_avnnet}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lags.X}<LSEP>[](symbol){j}<LSEP>[](symbol){}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y}<LSEP>[](symbol){j}<LEND>[](symbol){size}<LSEP>[](symbol){model}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){avnnet}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lags.X}<LSEP>[](symbol){j}<LSEP>[](symbol){}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y}<LSEP>[](symbol){j}<LEND>[](symbol){size}<LSEP>[](symbol){repeats}<LSEP>[](symbol){...}<LEND>[statement 28; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[statement 29; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){x}<LEND>[statement 30; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){m}<LEND>[](symbol){m}<LEND>[statement 31; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){p}<LEND>[](symbol){p}<LEND>[statement 32; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){P}<LEND>[](symbol){P}<LEND>[statement 33; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){scalex}<LEND>[](symbol){scalex}<LEND>[statement 34; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){scalexreg}<LEND>[](symbol){scalexreg}<LEND>[statement 35; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){size}<LEND>[](symbol){size}<LEND>[statement 36; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){xreg}<LEND>[](symbol){xreg}<LEND>[statement 37; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){lambda}<LEND>[](symbol){lambda}<LEND>[statement 38; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){subset}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[](symbol){xsub}<LEND>[statement 39; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){model}<LEND>[](symbol){fit}<LEND>[statement 40; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){nnetargs}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){...}<LEND>[statement 41; control flow](){if}<LSEP>[](symbol){useoldmodel}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){nnetargs}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){nnetargs}<LEND>[statement 42; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lags.X}<LSEP>[](symbol){j}<LSEP>[](symbol){}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){nan}<LSEP>[](symbol){maxlag}<LEND>[argument 1; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){fit}<LSEP>[](symbol){predict}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){nan}<LSEP>[](symbol){maxlag}<LEND>[argument 1; call](){}<LSEP>[](symbol){rowMeans}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){fit}<LSEP>[](symbol){predict}<LEND>[statement 43; control flow](){if}<LSEP>[](symbol){scale.inputs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){fits}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){scalex}<LSEP>[](symbol){scale}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){scalex}<LSEP>[](symbol){center}<LEND>[statement 44; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){fits}<LEND>[statement 45; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){fits}<LSEP>[](symbol){lambda}<LEND>[statement 46; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){nan}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){x}<LEND>[statement 47; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){fitted}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){TRUE}<LSEP>[](symbol){maxlag}<LEND>[](symbol){j}<LEND>[](symbol){fits}<LEND>[statement 48; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){copy_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){fitted}<LEND>[statement 49; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){residuals}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){fitted}<LEND>[statement 50; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){lags}<LEND>[](symbol){lags}<LEND>[statement 51; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){series}<LEND>[](symbol){yname}<LEND>[statement 52; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){NNAR(}<LSEP>[](symbol){p}<LSEP>[argument 2; litteral](str){}<LEND>[statement 53; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[argument 1; litteral](str){,}<LSEP>[](symbol){P}<LSEP>[argument 3; litteral](str){}<LEND>[statement 54; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[argument 1; litteral](str){,}<LSEP>[](symbol){size}<LSEP>[argument 3; litteral](str){)}<LSEP>[argument 4; litteral](str){}<LEND>[statement 55; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[argument 1; litteral](str){[}<LSEP>[](symbol){m}<LSEP>[argument 3; litteral](str){]}<LSEP>[argument 4; litteral](str){}<LEND>[statement 56; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 57; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){nnetar}<LEND>[assign](){<-}<LSEP>[](symbol){avnnet}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){y}<LSEP>[](symbol){repeats}<LSEP>[](symbol){linout}<LSEP>[](symbol){trace}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){mods}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[statement 1; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){repeats}<LEND>[body; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){mods}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){nnet}<LSEP>[](symbol){nnet}<LEND>[](symbol){x}<LSEP>[](symbol){y}<LSEP>[](symbol){linout}<LSEP>[](symbol){trace}<LSEP>[](symbol){...}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){mods}<LSEP>[argument 1; litteral](str){nnetarmodels}<LEND>[assign](){<-}<LSEP>[](symbol){oldmodel_avnnet}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){y}<LSEP>[](symbol){size}<LSEP>[](symbol){model}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){repeats}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){model}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){args}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){x}<LSEP>[](symbol){y}<LSEP>[](symbol){size}<LSEP>[argument 3; litteral](real){1.000000}<LSEP>[argument 4; litteral](logical){FALSE}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){args}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){args}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){nnetargs}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){args}<LSEP>[](symbol){maxit}<LEND>[litteral](real){0.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){mods}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[statement 5; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){repeats}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){args}<LSEP>[](symbol){Wts}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){model}<LEND>[](symbol){i}<LEND>[](symbol){wts}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){mods}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){do.call}<LEND>[argument 0; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){nnet}<LSEP>[](symbol){nnet}<LEND>[](symbol){args}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){mods}<LSEP>[argument 1; litteral](str){nnetarmodels}<LEND>[assign](){<-}<LSEP>[](symbol){print.nnetarmodels}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){\nAverage of}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 2; litteral](str){networks, each of which is\n}<LEND>[statement 1; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){forecast.nnetar}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){PI}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){xreg}<LSEP>[](symbol){lambda}<LSEP>[](symbol){bootstrap}<LSEP>[](symbol){npaths}<LSEP>[](symbol){innov}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LSEP>[](symbol){object}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){x}<LEND>[statement 2; control flow](){if}<LSEP>[](symbol){fan}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){51.000000}<LSEP>[argument 1; litteral](real){99.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){100.000000}<LSEP>[](symbol){level}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){99.990000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Confidence limit out of range}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){External regressors were not u...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xreg}<LSEP>[litteral](NULL){NULL}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){No external regressors provided}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){xreg}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Number of external regressors ...}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){xreg contains different column...}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){h}<LEND>[call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){xreg}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){h}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){xxreg}<LSEP>[](symbol){xreg}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){xx}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){xx}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){scale}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){center}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){scale}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xxreg}<LEND>[call](){}<LSEP>[](symbol){scale}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalexreg}<LEND>[](symbol){center}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalexreg}<LEND>[](symbol){scale}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){lags}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lags}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){maxlag}<LEND>[call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){lags}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){flag}<LEND>[call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){tail}<LSEP>[](symbol){xx}<LSEP>[](symbol){maxlag}<LEND>[statement 12; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){newdata}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){flag}<LSEP>[](symbol){lags}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xxreg}<LSEP>[](symbol){i}<LSEP>[](symbol){}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){newdata}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){I can't forecast when there ar...}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fcast}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){predict}<LSEP>[](symbol){newdata}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){flag}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fcast}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){flag}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){maxlag}<LEND>[statement 13; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){fcast}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){scale}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){scalex}<LEND>[](symbol){center}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){fcast}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 15; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lambda}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){isTRUE}<LSEP>[](symbol){PI}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nint}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){level}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){sim}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){npaths}<LSEP>[](symbol){h}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){innov}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){innov}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){h}<LSEP>[](symbol){npaths}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Incorrect number of innovation...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){innov}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){innov}<LSEP>[](symbol){h}<LSEP>[](symbol){npaths}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){bootstrap}<LSEP>[litteral](logical){FALSE}<LEND>[statement 3; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){npaths}<LEND>[body; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sim}<LSEP>[](symbol){i}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){simulate}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){bootstrap}<LSEP>[](symbol){xreg}<LSEP>[](symbol){lambda}<LEND>[argument 5; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){innov}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[](symbol){...}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){sim}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){quantile}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](real){200.000000}<LEND>[argument 4; litteral](real){8.000000}<LSEP>[argument 5; litteral](logical){TRUE}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){sim}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){quantile}<LEND>[argument 3; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](real){200.000000}<LEND>[argument 4; litteral](real){8.000000}<LSEP>[argument 5; litteral](logical){TRUE}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){nint}<LSEP>[argument 1; litteral](integer){1}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){lower}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){upper}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){lower}<LSEP>[argument 1; litteral](integer){1}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){upper}<LSEP>[argument 1; litteral](integer){1}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){future_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){x}<LEND>[](symbol){lower}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){future_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){x}<LEND>[](symbol){upper}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lower}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){upper}<LSEP>[litteral](NULL){NULL}<LEND>[statement 17; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){mean}<LEND>[call](){}<LSEP>[](symbol){future_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){x}<LEND>[](symbol){fcast}<LEND>[statement 18; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){level}<LEND>[](symbol){level}<LEND>[statement 19; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){out}<LSEP>[argument 1; litteral](str){forecast}<LEND>[assign](){<-}<LSEP>[](symbol){fitted.nnetar}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){hfitted}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[argument 2; litteral](str){nnetar}<LSEP>[](symbol){...}<LEND>[assign](){<-}<LSEP>[](symbol){print.nnetar}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){digits}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Series:}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){series}<LEND>[argument 2; litteral](str){\n}<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Model: }<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){method}<LEND>[argument 2; litteral](str){\n}<LEND>[statement 2; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Call: }<LEND>[statement 3; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){call}<LEND>[statement 4; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){model}<LEND>[statement 5; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\nsigma^2 estimated as }<LEND>[argument 1; call](){}<LSEP>[](symbol){format}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[](symbol){digits}<LEND>[argument 2; litteral](str){\n}<LSEP>[argument 3; litteral](str){}<LEND>[statement 6; call](){}<LSEP>[](symbol){invisible}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){is.nnetar}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){nnetar}<LEND>[assign](){<-}<LSEP>[](symbol){is.nnetarmodels}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){nnetarmodels}<LEND>[assign](){<-}<LSEP>[](symbol){scale.ts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){center}<LSEP>[](symbol){scale}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){as.ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){scale.default}<LSEP>[](symbol){x}<LSEP>[](symbol){center}<LSEP>[](symbol){scale}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[](symbol){tspx}<LEND>[statement 3; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){x} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){getResponse}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; call](){}<LSEP>[](symbol){UseMethod}<LSEP>[argument 0; litteral](str){getResponse}<LEND>[assign](){<-}<LSEP>[](symbol){getResponse.default}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.list}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[](symbol){getResponse.lm}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](str){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](str){x}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){responsevar}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){formula}<LSEP>[](symbol){object}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){model.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){}<LSEP>[](symbol){responsevar}<LEND>[assign](){<-}<LSEP>[](symbol){getResponse.Arima}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){series.name}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){series.name}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](NULL){NULL}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){eval.parent}<LEND>[argument 0; call](){}<LSEP>[](symbol){parse}<LSEP>[](symbol){series.name}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){eval.parent}<LEND>[argument 0; call](){}<LSEP>[](symbol){parse}<LSEP>[](symbol){series.name}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](NULL){NULL}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){getResponse.fracdiff}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){series.name}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){call}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){series.name}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){missing original time series}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){eval.parent}<LEND>[argument 0; call](){}<LSEP>[](symbol){parse}<LSEP>[](symbol){series.name}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){eval.parent}<LEND>[argument 0; call](){}<LSEP>[](symbol){parse}<LSEP>[](symbol){series.name}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](NULL){NULL}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){getResponse.ar}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){getResponse.Arima}<LSEP>[](symbol){object}<LEND>[assign](){<-}<LSEP>[](symbol){getResponse.tbats}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](NULL){NULL}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){y}<LEND>[assign](){<-}<LSEP>[](symbol){getResponse.bats}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){getResponse.tbats}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[assign](){<-}<LSEP>[](symbol){getResponse.mforecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){do.call}<LSEP>[](symbol){cbind}<LEND>[argument 1; call](){}<LSEP>[](symbol){lapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){forecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){getResponse.baggedModel}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){y}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](NULL){NULL}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){y} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){forecast.ets}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){simulate}<LSEP>[](symbol){bootstrap}<LSEP>[](symbol){npaths}<LSEP>[](symbol){PI}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Forecast horizon out of bounds}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){biasadj}<LSEP>[litteral](logical){FALSE}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){biasadj}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){biasadj}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](str){biasadj}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.logical}<LSEP>[](symbol){biasadj}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){biasadj information not found,...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){biasadj}<LSEP>[litteral](logical){FALSE}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){PI}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){biasadj}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){simulate}<LEND>[assign](){<-}<LSEP>[](symbol){bootstrap}<LEND>[assign](){<-}<LSEP>[](symbol){fan}<LSEP>[litteral](logical){FALSE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){biasadj}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){npaths}<LSEP>[litteral](real){2.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){level}<LSEP>[litteral](real){90.000000}<LEND>[statement 3; control flow](){if}<LSEP>[](symbol){fan}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){51.000000}<LSEP>[argument 1; litteral](real){99.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){100.000000}<LSEP>[](symbol){level}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){99.990000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Confidence limit out of range}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){sort}<LSEP>[](symbol){level}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){damped}<LEND>[call](){}<LSEP>[](symbol){as.logical}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){4.000000}<LEND>[statement 7; control flow](){if}<LSEP>[](symbol){bootstrap}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){simulate}<LSEP>[litteral](logical){TRUE}<LEND>[statement 8; control flow](){if}<LSEP>[](symbol){simulate}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){f}<LEND>[call](){}<LSEP>[](symbol){pegelsfcast.C}<LSEP>[](symbol){h}<LSEP>[](symbol){object}<LSEP>[](symbol){level}<LSEP>[](symbol){bootstrap}<LSEP>[](symbol){npaths}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){A}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.element}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){A}<LSEP>[argument 1; litteral](str){N}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.element}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){N}<LSEP>[argument 1; litteral](str){A}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){f}<LEND>[call](){}<LSEP>[](symbol){class1}<LSEP>[](symbol){h}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){states}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){3.000000}<LEND>[](symbol){damped}<LEND>[argument 5; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){m}<LEND>[argument 6; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){sigma2}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){par}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){M}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.element}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){A}<LSEP>[argument 1; litteral](str){N}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.element}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){N}<LSEP>[argument 1; litteral](str){A}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){f}<LEND>[call](){}<LSEP>[](symbol){class2}<LSEP>[](symbol){h}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){states}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){3.000000}<LEND>[](symbol){damped}<LEND>[argument 5; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){m}<LEND>[argument 6; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){sigma2}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){par}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){M}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](str){M}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](str){M}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){f}<LEND>[call](){}<LSEP>[](symbol){class3}<LSEP>[](symbol){h}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){states}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){3.000000}<LEND>[](symbol){damped}<LEND>[argument 5; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){m}<LEND>[argument 6; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){sigma2}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){par}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){f}<LEND>[call](){}<LSEP>[](symbol){pegelsfcast.C}<LSEP>[](symbol){h}<LSEP>[](symbol){object}<LSEP>[](symbol){level}<LSEP>[](symbol){bootstrap}<LSEP>[](symbol){npaths}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){tsp.x}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){tsp.x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){start.f}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){m}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){start.f}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){future_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){f}<LSEP>[](symbol){mu}<LEND>[](symbol){level}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LSEP>[](symbol){PI}<LSEP>[](symbol){biasadj}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){f}<LSEP>[](symbol){var}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){lower}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){level}<LEND>[](symbol){h}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){lower}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](str){%}<LSEP>[argument 2; litteral](str){}<LEND>[statement 2; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){level}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){marg.error}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){f}<LSEP>[](symbol){var}<LEND>[argument 1; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){qnorm}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){100.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){level}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){200.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){lower}<LEND>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){mean}<LEND>[](symbol){marg.error}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){upper}<LEND>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){mean}<LEND>[](symbol){marg.error}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){copy_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){lower}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){copy_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){upper}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){f}<LSEP>[](symbol){lower}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){copy_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){f}<LSEP>[](symbol){lower}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){copy_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){f}<LSEP>[](symbol){upper}<LEND>[false branch; control flow](){if}<LSEP>[](symbol){PI}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){No prediction intervals for th...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LSEP>[](symbol){biasadj}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){No bias adjustment possible}<LEND>[statement 13; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){copy_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){object}<LEND>[statement 14; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){method}<LEND>[statement 15; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){call}<LEND>[](symbol){y}<LEND>[statement 16; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){residuals}<LEND>[call](){}<LSEP>[](symbol){copy_msts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){object}<LEND>[statement 17; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){mean}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){mean}<LEND>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){out}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){PI}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){lower}<LEND>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){upper}<LEND>[](symbol){lambda}<LEND>[statement 18; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){PI}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){lower}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){upper}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){level}<LEND>[litteral](NULL){NULL}<LEND>[statement 19; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){out}<LSEP>[argument 1; litteral](str){forecast}<LEND>[assign](){<-}<LSEP>[](symbol){pegelsfcast.C}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){h}<LSEP>[](symbol){obj}<LSEP>[](symbol){npaths}<LSEP>[](symbol){level}<LSEP>[](symbol){bootstrap}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y.paths}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){npaths}<LSEP>[](symbol){h}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){obj}<LSEP>[](symbol){lambda}<LEND>[litteral](NULL){NULL}<LEND>[statement 2; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){npaths}<LEND>[body; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y.paths}<LSEP>[](symbol){i}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){simulate.ets}<LSEP>[](symbol){obj}<LSEP>[](symbol){h}<LSEP>[argument 2; litteral](logical){TRUE}<LSEP>[](symbol){bootstrap}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){y.f}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){.C}<LSEP>[argument 0; litteral](str){etsforecast}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.double}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){obj}<LSEP>[](symbol){states}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){obj}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){obj}<LSEP>[](symbol){m}<LEND>[argument 3; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){switch}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){obj}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){2.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){switch}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){obj}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){2.000000}<LEND>[argument 5; call](){}<LSEP>[](symbol){as.double}<LEND>[argument 0; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){obj}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](str){FALSE}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){obj}<LSEP>[](symbol){par}<LEND>[argument 1; litteral](str){phi}<LEND>[argument 6; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){h}<LEND>[argument 7; call](){}<LSEP>[](symbol){as.double}<LEND>[argument 0; call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){h}<LEND>[argument 8; litteral](str){forecast}<LEND>[argument 1; litteral](real){7.000000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y.f}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){99999.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Problem with multiplicative da...}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){y.paths}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){quantile}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](real){200.000000}<LEND>[argument 4; litteral](real){8.000000}<LSEP>[argument 5; litteral](logical){TRUE}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){y.paths}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){quantile}<LEND>[argument 3; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](real){200.000000}<LEND>[argument 4; litteral](real){8.000000}<LSEP>[argument 5; litteral](logical){TRUE}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){lower}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){upper}<LEND>[statement 8; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){y.f}<LSEP>[](symbol){lower}<LSEP>[](symbol){upper}<LEND>[assign](){<-}<LSEP>[](symbol){class1}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){h}<LSEP>[](symbol){last.state}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){seasontype}<LSEP>[](symbol){damped}<LSEP>[](symbol){m}<LSEP>[](symbol){sigma2}<LSEP>[](symbol){par}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){last.state}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){H}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){A}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){H}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[litteral](real){1.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){A}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){damped}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){H}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){phi}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){H}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){p}<LSEP>[](symbol){p}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){F}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[litteral](real){1.000000}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){A}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){damped}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){F}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){F}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){phi}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){F}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){F}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[litteral](real){1.000000}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){A}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){F}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[](symbol){m}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){p}<LEND>[litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){F}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[](symbol){m}<LEND>[argument 1; litteral](real){2.000000}<LEND>[](symbol){p}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[](symbol){m}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){diag}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){G}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){p}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){G}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){alpha}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){A}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){G}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){beta}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){A}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){G}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){gamma}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){mu}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){h}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){Fj}<LEND>[call](){}<LSEP>[](symbol){diag}<LSEP>[](symbol){p}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){cj}<LEND>[call](){}<LSEP>[](symbol){numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 15; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mu}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){H}<LSEP>[](symbol){Fj}<LEND>[](symbol){last.state}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){cj}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){H}<LSEP>[](symbol){Fj}<LEND>[](symbol){G}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){Fj}<LEND>[call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){Fj}<LSEP>[](symbol){F}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){cj2}<LEND>[call](){}<LSEP>[](symbol){cumsum}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){cj}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){var}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){sigma2}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){cj2}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){var}<LSEP>[](symbol){sigma2}<LEND>[statement 16; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mu}<LSEP>[](symbol){h}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){H}<LSEP>[](symbol){Fj}<LEND>[](symbol){last.state}<LEND>[statement 17; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){mu}<LSEP>[](symbol){var}<LSEP>[](symbol){cj}<LEND>[assign](){<-}<LSEP>[](symbol){class2}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){h}<LSEP>[](symbol){last.state}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){seasontype}<LSEP>[](symbol){damped}<LSEP>[](symbol){m}<LSEP>[](symbol){sigma2}<LSEP>[](symbol){par}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tmp}<LEND>[call](){}<LSEP>[](symbol){class1}<LSEP>[](symbol){h}<LSEP>[](symbol){last.state}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){seasontype}<LSEP>[](symbol){damped}<LSEP>[](symbol){m}<LSEP>[](symbol){sigma2}<LSEP>[](symbol){par}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){theta}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){h}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){theta}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){mu}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){h}<LEND>[body; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){theta}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){mu}<LEND>[](symbol){j}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){sigma2}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){cj}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){j}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){theta}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){j}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){var}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){sigma2}<LEND>[](symbol){theta}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){mu}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 5; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){mu}<LEND>[](symbol){var}<LEND>[assign](){<-}<LSEP>[](symbol){class3}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){h}<LSEP>[](symbol){last.state}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){seasontype}<LSEP>[](symbol){damped}<LSEP>[](symbol){m}<LSEP>[](symbol){sigma2}<LSEP>[](symbol){par}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){last.state}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){H1}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){N}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){H2}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){F1}<LSEP>[litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){G1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){alpha}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){F1}<LEND>[call](){}<LSEP>[](symbol){rbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ifelse}<LSEP>[](symbol){damped}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){phi}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){G1}<LEND>[call](){}<LSEP>[](symbol){rbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){beta}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){F2}<LEND>[call](){}<LSEP>[](symbol){rbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){diag}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){G2}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){m}<LSEP>[](symbol){m}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){G2}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){gamma}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){Mh}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){last.state}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[](symbol){m}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){last.state}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[](symbol){m}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){p}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){Vh}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){Mh}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){Mh}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){H21}<LEND>[call](){}<LSEP>[](symbol){%x%}<LSEP>[](symbol){H2}<LSEP>[](symbol){H1}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){F21}<LEND>[call](){}<LSEP>[](symbol){%x%}<LSEP>[](symbol){F2}<LSEP>[](symbol){F1}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){G21}<LEND>[call](){}<LSEP>[](symbol){%x%}<LSEP>[](symbol){G2}<LSEP>[](symbol){G1}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){K}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%x%}<LSEP>[](symbol){G2}<LSEP>[](symbol){F1}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%x%}<LSEP>[](symbol){F2}<LSEP>[](symbol){G1}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){mu}<LEND>[assign](){<-}<LSEP>[](symbol){var}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){h}<LEND>[statement 14; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mu}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){H1}<LSEP>[](symbol){Mh}<LEND>[argument 1; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){H2}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){var}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){sigma2}<LEND>[argument 1; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){H21}<LSEP>[](symbol){Vh}<LEND>[argument 1; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){H21}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){sigma2}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mu}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){vecMh}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){Mh}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){Vh}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){F21}<LSEP>[](symbol){Vh}<LEND>[argument 1; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){F21}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){sigma2}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){F21}<LSEP>[](symbol){Vh}<LEND>[argument 1; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){G21}<LEND>[argument 1; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){G21}<LSEP>[](symbol){Vh}<LEND>[argument 1; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){F21}<LEND>[argument 1; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){K}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Vh}<LEND>[argument 1; call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){vecMh}<LEND>[argument 1; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){vecMh}<LEND>[argument 1; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){K}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){sigma2}<LEND>[argument 1; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){G21}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[](symbol){Vh}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){vecMh}<LEND>[argument 1; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){vecMh}<LEND>[argument 1; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){G21}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){Mh}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){F1}<LSEP>[](symbol){Mh}<LEND>[argument 1; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){F2}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){G1}<LSEP>[](symbol){Mh}<LEND>[argument 1; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){G2}<LEND>[](symbol){sigma2}<LEND>[statement 15; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){mu}<LSEP>[](symbol){var} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){auto.arima}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){d}<LSEP>[](symbol){D}<LSEP>[](symbol){max.p}<LSEP>[](symbol){max.q}<LSEP>[](symbol){max.P}<LSEP>[](symbol){max.Q}<LSEP>[](symbol){max.order}<LSEP>[](symbol){max.d}<LSEP>[](symbol){max.D}<LSEP>[](symbol){start.p}<LSEP>[](symbol){start.q}<LSEP>[](symbol){start.P}<LSEP>[](symbol){start.Q}<LSEP>[](symbol){stationary}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){ic}<LSEP>[](symbol){stepwise}<LSEP>[](symbol){nmodels}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){truncate}<LSEP>[](symbol){xreg}<LSEP>[](symbol){test}<LSEP>[](symbol){test.args}<LSEP>[](symbol){seasonal.test}<LSEP>[](symbol){seasonal.test.args}<LSEP>[](symbol){allowdrift}<LSEP>[](symbol){allowmean}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){parallel}<LSEP>[](symbol){num.cores}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LSEP>[](symbol){stepwise}<LSEP>[](symbol){parallel}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Parallel computer is only impl...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){parallel}<LSEP>[litteral](logical){FALSE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LSEP>[](symbol){trace}<LSEP>[](symbol){parallel}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){message}<LSEP>[argument 0; litteral](str){Tracing model searching in par...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){trace}<LSEP>[litteral](logical){FALSE}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){x}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){auto.arima can only handle uni...}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){orig.x}<LSEP>[](symbol){x}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){missing}<LEND>[call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){firstnonmiss}<LEND>[call](){}<LSEP>[](symbol){head}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){missing}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){lastnonmiss}<LEND>[call](){}<LSEP>[](symbol){tail}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){missing}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){serieslength}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){missing}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){firstnonmiss}<LSEP>[](symbol){lastnonmiss}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){x}<LSEP>[](symbol){firstnonmiss}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.numeric}<LSEP>[](symbol){xreg}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){xreg should be a numeric matri...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){xreg}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){firstnonmiss}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){xreg}<LEND>[](symbol){}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.constant}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){All data are missing}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){allowmean}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[argument 2; litteral](logical){FALSE}<LSEP>[](symbol){...}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[](symbol){orig.x}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){series}<LEND>[](symbol){series}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){call}<LEND>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){x}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){constant}<LEND>[litteral](logical){TRUE}<LEND>[statement 7; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fit}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){ic}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){ic}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){test}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){seasonal.test}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){seasonal.test}<LEND>[statement 16; control flow](){if}<LSEP>[](symbol){seasonal}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){m}<LSEP>[litteral](real){1.000000}<LEND>[statement 17; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){m}<LSEP>[litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){round}<LSEP>[](symbol){m}<LEND>[statement 18; assign](){<-}<LSEP>[](symbol){max.p}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){max.p}<LEND>[argument 1; call](){}<LSEP>[](symbol){floor}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){serieslength}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){max.q}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){max.q}<LEND>[argument 1; call](){}<LSEP>[](symbol){floor}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){serieslength}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){max.P}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){max.P}<LEND>[argument 1; call](){}<LSEP>[](symbol){floor}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){serieslength}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[](symbol){m}<LEND>[statement 21; assign](){<-}<LSEP>[](symbol){max.Q}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){max.Q}<LEND>[argument 1; call](){}<LSEP>[](symbol){floor}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){serieslength}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[](symbol){m}<LEND>[statement 22; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){serieslength}<LSEP>[argument 1; litteral](integer){3}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ic}<LSEP>[litteral](str){aic}<LEND>[statement 23; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](str){biasadj}<LEND>[](symbol){biasadj}<LEND>[statement 24; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){xreg}<LEND>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){xreg}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; litteral](str){xreg}<LEND>[false branch; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){xreg}<LEND>[argument 2; litteral](str){}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xregg}<LSEP>[](symbol){xreg}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){xx}<LSEP>[](symbol){x}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){constant_columns}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){xregg}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){is.constant}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){all}<LSEP>[](symbol){constant_columns}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xregg}<LSEP>[litteral](NULL){NULL}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LSEP>[](symbol){constant_columns}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xregg}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xregg}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LSEP>[](symbol){constant_columns}<LEND>[argument 3; litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){sv}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){svd}<LEND>[argument 0; call](){}<LSEP>[](symbol){na.omit}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){xregg}<LEND>[](symbol){xregg}<LEND>[](symbol){d}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){sv}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){sv}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){.Machine}<LSEP>[](symbol){double.eps}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){xreg is rank deficient}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){rowSums}<LSEP>[](symbol){xregg}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xx}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){residuals}<LEND>[argument 0; call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){x}<LSEP>[](symbol){xregg}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xregg}<LSEP>[litteral](NULL){NULL}<LEND>[statement 25; control flow](){if}<LSEP>[](symbol){stationary}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){d}<LEND>[assign](){<-}<LSEP>[](symbol){D}<LSEP>[litteral](real){0.000000}<LEND>[statement 26; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){D}<LEND>[assign](){<-}<LSEP>[](symbol){max.P}<LEND>[assign](){<-}<LSEP>[](symbol){max.Q}<LSEP>[litteral](real){0.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){D}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){m}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){D}<LSEP>[litteral](real){0.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){D}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){D}<LEND>[call](){}<LSEP>[](symbol){do.call}<LSEP>[argument 0; litteral](str){nsdiffs}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){xx}<LSEP>[](symbol){seasonal.test}<LSEP>[](symbol){max.D}<LEND>[](symbol){seasonal.test.args}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){D}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xregg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){diffxreg}<LEND>[call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){xregg}<LSEP>[](symbol){D}<LSEP>[](symbol){m}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){diffxreg}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){is.constant}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){D}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){D}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){D}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){dx}<LEND>[call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){xx}<LSEP>[](symbol){D}<LSEP>[](symbol){m}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){dx}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){D}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){D}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 27; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){D}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){dx}<LEND>[call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){xx}<LSEP>[](symbol){D}<LSEP>[](symbol){m}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){dx}<LSEP>[](symbol){xx}<LEND>[statement 28; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xregg}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){D}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){diffxreg}<LEND>[call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){xregg}<LSEP>[](symbol){D}<LSEP>[](symbol){m}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){diffxreg}<LSEP>[](symbol){xregg}<LEND>[statement 29; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){d}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){d}<LEND>[call](){}<LSEP>[](symbol){do.call}<LSEP>[argument 0; litteral](str){ndiffs}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){dx}<LSEP>[](symbol){test}<LSEP>[](symbol){max.d}<LEND>[](symbol){test.args}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xregg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){diffxreg}<LEND>[call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){diffxreg}<LSEP>[](symbol){d}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){diffxreg}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){is.constant}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){d}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){diffdx}<LEND>[call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){dx}<LSEP>[](symbol){d}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){diffdx}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){d}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 30; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>=}<LSEP>[](symbol){D}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Having more than one seasonal ...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){D}<LSEP>[](symbol){d}<LEND>[argument 1; litteral](real){2.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Having 3 or more differencing ...}<LEND>[statement 31; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){dx}<LEND>[call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){dx}<LSEP>[](symbol){d}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 32; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){dx}<LEND>[argument 1; litteral](integer){0}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Not enough data to proceed}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.constant}<LSEP>[](symbol){dx}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){D}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){d}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){D}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[](symbol){m}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[argument 4; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){dx}<LSEP>[](symbol){m}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[](symbol){method}<LSEP>[](symbol){...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){D}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){d}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){D}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[](symbol){m}<LEND>[](symbol){method}<LSEP>[](symbol){...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){d}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[](symbol){method}<LSEP>[](symbol){...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){d}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[argument 2; litteral](logical){TRUE}<LEND>[argument 3; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){dx}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[](symbol){method}<LSEP>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Data follow a simple polynomia...}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){D}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){d}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){D}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[](symbol){m}<LEND>[](symbol){xreg}<LSEP>[](symbol){method}<LSEP>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){d}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[](symbol){xreg}<LSEP>[](symbol){method}<LSEP>[](symbol){...}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[](symbol){orig.x}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){series}<LEND>[](symbol){series}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){call}<LEND>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){x}<LEND>[statement 5; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fit}<LEND>[statement 33; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){max.P}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){max.p}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){max.p}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){max.Q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){max.q}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){max.q}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 34; control flow](){if}<LSEP>[](symbol){approximation}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){truncate}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[](symbol){truncate}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){tail}<LSEP>[](symbol){x}<LSEP>[](symbol){truncate}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){D}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){arima}<LEND>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){d}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){arima}<LEND>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){d}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){D}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[](symbol){m}<LEND>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){fit}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){offset}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){loglik}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){serieslength}<LEND>[argument 1; call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){sigma2}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){offset}<LSEP>[litteral](real){0.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){offset}<LSEP>[litteral](real){0.000000}<LEND>[statement 35; assign](){<-}<LSEP>[](symbol){allowdrift}<LEND>[call](){}<LSEP>[](symbol){&}<LSEP>[](symbol){allowdrift}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){d}<LSEP>[](symbol){D}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 36; assign](){<-}<LSEP>[](symbol){allowmean}<LEND>[call](){}<LSEP>[](symbol){&}<LSEP>[](symbol){allowmean}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){d}<LSEP>[](symbol){D}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 37; assign](){<-}<LSEP>[](symbol){constant}<LEND>[call](){}<LSEP>[](symbol){|}<LSEP>[](symbol){allowdrift}<LSEP>[](symbol){allowmean}<LEND>[statement 38; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LSEP>[](symbol){approximation}<LSEP>[](symbol){trace}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n Fitting models using approx...}<LEND>[statement 39; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){stepwise}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LEND>[call](){}<LSEP>[](symbol){search.arima}<LSEP>[](symbol){x}<LSEP>[](symbol){d}<LSEP>[](symbol){D}<LSEP>[](symbol){max.p}<LSEP>[](symbol){max.q}<LSEP>[](symbol){max.P}<LSEP>[](symbol){max.Q}<LSEP>[](symbol){max.order}<LSEP>[](symbol){stationary}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){xreg}<LSEP>[](symbol){offset}<LSEP>[](symbol){allowdrift}<LSEP>[](symbol){allowmean}<LSEP>[](symbol){parallel}<LSEP>[](symbol){num.cores}<LSEP>[](symbol){...}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){call}<LEND>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){x}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){lambda}<LEND>[](symbol){lambda}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){x}<LEND>[](symbol){orig.x}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){series}<LEND>[](symbol){series}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){fitted.Arima}<LSEP>[](symbol){bestfit}<LEND>[statement 7; control flow](){if}<LSEP>[](symbol){trace}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n\n Best model:}<LEND>[argument 1; call](){}<LSEP>[](symbol){arima.string}<LSEP>[](symbol){bestfit}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 2; litteral](str){\n\n}<LEND>[statement 8; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){bestfit}<LEND>[statement 40; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){10}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){start.p}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){start.p}<LSEP>[argument 1; litteral](integer){1}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){start.q}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){start.q}<LSEP>[argument 1; litteral](integer){1}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){start.P}<LSEP>[litteral](integer){0}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){start.Q}<LSEP>[litteral](integer){0}<LEND>[statement 41; assign](){<-}<LSEP>[](symbol){p}<LEND>[assign](){<-}<LSEP>[](symbol){start.p}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){start.p}<LSEP>[](symbol){max.p}<LEND>[statement 42; assign](){<-}<LSEP>[](symbol){q}<LEND>[assign](){<-}<LSEP>[](symbol){start.q}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){start.q}<LSEP>[](symbol){max.q}<LEND>[statement 43; assign](){<-}<LSEP>[](symbol){P}<LEND>[assign](){<-}<LSEP>[](symbol){start.P}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){start.P}<LSEP>[](symbol){max.P}<LEND>[statement 44; assign](){<-}<LSEP>[](symbol){Q}<LEND>[assign](){<-}<LSEP>[](symbol){start.Q}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){start.Q}<LSEP>[](symbol){max.Q}<LEND>[statement 45; assign](){<-}<LSEP>[](symbol){results}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){nmodels}<LSEP>[argument 2; litteral](real){8.000000}<LEND>[statement 46; assign](){<-}<LSEP>[](symbol){bestfit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LEND>[](symbol){constant}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 47; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[statement 48; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){d}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){D}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[](symbol){constant}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 49; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){d}<LSEP>[argument 2; litteral](real){0.000000}<LSEP>[argument 3; litteral](real){0.000000}<LSEP>[](symbol){D}<LSEP>[argument 5; litteral](real){0.000000}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[statement 50; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fit}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LEND>[assign](){<-}<LSEP>[](symbol){q}<LEND>[assign](){<-}<LSEP>[](symbol){P}<LEND>[assign](){<-}<LSEP>[](symbol){Q}<LSEP>[litteral](real){0.000000}<LEND>[statement 51; assign](){<-}<LSEP>[](symbol){k}<LSEP>[litteral](real){2.000000}<LEND>[statement 52; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){max.p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){max.P}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){max.p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[](symbol){d}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){max.P}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[](symbol){D}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[](symbol){constant}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){max.p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[](symbol){d}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){max.P}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[](symbol){D}<LSEP>[argument 5; litteral](real){0.000000}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fit}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){max.p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){P}<LEND>[call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){max.P}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){q}<LEND>[assign](){<-}<LSEP>[](symbol){Q}<LSEP>[litteral](real){0.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 53; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){max.q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){max.Q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){max.q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){D}<LEND>[argument 2; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){max.Q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[](symbol){constant}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){max.q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 3; litteral](real){0.000000}<LSEP>[](symbol){D}<LEND>[argument 5; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){max.Q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fit}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LEND>[assign](){<-}<LSEP>[](symbol){P}<LSEP>[litteral](real){0.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){Q}<LEND>[call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){max.Q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){max.q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 54; control flow](){if}<LSEP>[](symbol){constant}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){d}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){D}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[argument 3; litteral](logical){FALSE}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){d}<LSEP>[argument 2; litteral](real){0.000000}<LSEP>[argument 3; litteral](real){0.000000}<LSEP>[](symbol){D}<LSEP>[argument 5; litteral](real){0.000000}<LSEP>[argument 6; litteral](real){0.000000}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fit}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LEND>[assign](){<-}<LSEP>[](symbol){q}<LEND>[assign](){<-}<LSEP>[](symbol){P}<LEND>[assign](){<-}<LSEP>[](symbol){Q}<LSEP>[litteral](real){0.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 55; assign](){<-}<LSEP>[](symbol){startk}<LSEP>[litteral](real){0.000000}<LEND>[statement 56; control flow](){while}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){startk}<LSEP>[](symbol){k}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){k}<LSEP>[](symbol){nmodels}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){startk}<LSEP>[](symbol){k}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){newmodel}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){D}<LSEP>[](symbol){Q}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[](symbol){}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){k}<LSEP>[](symbol){nmodels}<LEND>[true branch; call](){}<LSEP>[](symbol){next}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){D}<LSEP>[](symbol){Q}<LEND>[](symbol){constant}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){D}<LSEP>[](symbol){Q}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fit}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){P}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){next}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){newmodel}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LEND>[argument 5; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[](symbol){}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){k}<LSEP>[](symbol){nmodels}<LEND>[true branch; call](){}<LSEP>[](symbol){next}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){constant}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LEND>[argument 5; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fit}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){Q}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){next}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){P}<LSEP>[](symbol){max.P}<LEND>[argument 1; call](){}<LSEP>[](symbol){newmodel}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 3; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){D}<LSEP>[](symbol){Q}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[](symbol){}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){k}<LSEP>[](symbol){nmodels}<LEND>[true branch; call](){}<LSEP>[](symbol){next}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){D}<LSEP>[](symbol){Q}<LEND>[](symbol){constant}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 3; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){D}<LSEP>[](symbol){Q}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fit}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){P}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){next}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){Q}<LSEP>[](symbol){max.Q}<LEND>[argument 1; call](){}<LSEP>[](symbol){newmodel}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LEND>[argument 5; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[](symbol){}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){k}<LSEP>[](symbol){nmodels}<LEND>[true branch; call](){}<LSEP>[](symbol){next}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){constant}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LEND>[argument 5; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fit}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){Q}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){next}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){newmodel}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){D}<LEND>[argument 5; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[](symbol){}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){k}<LSEP>[](symbol){nmodels}<LEND>[true branch; call](){}<LSEP>[](symbol){next}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){D}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){constant}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){D}<LEND>[argument 5; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fit}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){Q}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){P}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){next}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){Q}<LSEP>[](symbol){max.Q}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){newmodel}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){D}<LEND>[argument 5; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[](symbol){}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){k}<LSEP>[](symbol){nmodels}<LEND>[true branch; call](){}<LSEP>[](symbol){next}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){D}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){constant}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){D}<LEND>[argument 5; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fit}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){Q}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){P}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){next}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){P}<LSEP>[](symbol){max.P}<LEND>[argument 1; call](){}<LSEP>[](symbol){newmodel}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 3; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){D}<LEND>[argument 5; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[](symbol){}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){k}<LSEP>[](symbol){nmodels}<LEND>[true branch; call](){}<LSEP>[](symbol){next}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){D}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){constant}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 3; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){D}<LEND>[argument 5; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fit}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){Q}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){P}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){next}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){Q}<LSEP>[](symbol){max.Q}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){P}<LSEP>[](symbol){max.P}<LEND>[argument 1; call](){}<LSEP>[](symbol){newmodel}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 3; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){D}<LEND>[argument 5; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[](symbol){}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){k}<LSEP>[](symbol){nmodels}<LEND>[true branch; call](){}<LSEP>[](symbol){next}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){D}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){constant}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 3; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){D}<LEND>[argument 5; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fit}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){Q}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){P}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){next}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){newmodel}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){d}<LSEP>[](symbol){q}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[](symbol){}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){k}<LSEP>[](symbol){nmodels}<LEND>[true branch; call](){}<LSEP>[](symbol){next}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LEND>[](symbol){constant}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){d}<LSEP>[](symbol){q}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fit}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){next}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){newmodel}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[](symbol){}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){k}<LSEP>[](symbol){nmodels}<LEND>[true branch; call](){}<LSEP>[](symbol){next}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LEND>[](symbol){constant}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fit}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){next}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){p}<LSEP>[](symbol){max.p}<LEND>[argument 1; call](){}<LSEP>[](symbol){newmodel}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){d}<LSEP>[](symbol){q}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[](symbol){}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){k}<LSEP>[](symbol){nmodels}<LEND>[true branch; call](){}<LSEP>[](symbol){next}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LEND>[](symbol){constant}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){d}<LSEP>[](symbol){q}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fit}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){next}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){q}<LSEP>[](symbol){max.q}<LEND>[argument 1; call](){}<LSEP>[](symbol){newmodel}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[](symbol){}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){k}<LSEP>[](symbol){nmodels}<LEND>[true branch; call](){}<LSEP>[](symbol){next}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LEND>[](symbol){constant}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fit}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){next}<LEND>[statement 13; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){newmodel}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[](symbol){}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){k}<LSEP>[](symbol){nmodels}<LEND>[true branch; call](){}<LSEP>[](symbol){next}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LEND>[](symbol){constant}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fit}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){next}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){q}<LSEP>[](symbol){max.q}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){newmodel}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[](symbol){}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){k}<LSEP>[](symbol){nmodels}<LEND>[true branch; call](){}<LSEP>[](symbol){next}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LEND>[](symbol){constant}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fit}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){next}<LEND>[statement 15; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){p}<LSEP>[](symbol){max.p}<LEND>[argument 1; call](){}<LSEP>[](symbol){newmodel}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[](symbol){}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){k}<LSEP>[](symbol){nmodels}<LEND>[true branch; call](){}<LSEP>[](symbol){next}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LEND>[](symbol){constant}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fit}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){next}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){q}<LSEP>[](symbol){max.q}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){p}<LSEP>[](symbol){max.p}<LEND>[argument 1; call](){}<LSEP>[](symbol){newmodel}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[](symbol){}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){k}<LSEP>[](symbol){nmodels}<LEND>[true branch; call](){}<LSEP>[](symbol){next}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LEND>[](symbol){constant}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fit}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){next}<LEND>[statement 17; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LSEP>[](symbol){allowdrift}<LSEP>[](symbol){allowmean}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){newmodel}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LEND>[argument 6; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[](symbol){}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){k}<LSEP>[](symbol){nmodels}<LEND>[true branch; call](){}<LSEP>[](symbol){next}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LEND>[argument 3; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){constant}<LEND>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){method}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LEND>[argument 6; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){constant}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fit}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){constant}<LEND>[call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){constant}<LEND>[statement 57; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){k}<LSEP>[](symbol){nmodels}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LEND>[argument 0; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){Stepwise search was stopped ea...}<LSEP>[](symbol){nmodels}<LEND>[statement 58; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LSEP>[](symbol){approximation}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){arma}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){trace}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n\n Now re-fitting the best m...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){icorder}<LEND>[call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){8.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){nmodels}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){8.000000}<LEND>[statement 3; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){seq}<LSEP>[](symbol){nmodels}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){icorder}<LSEP>[](symbol){i}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){k}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){k}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){k}<LSEP>[argument 2; litteral](real){4.000000}<LEND>[](symbol){D}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){k}<LSEP>[argument 2; litteral](real){6.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){k}<LSEP>[argument 2; litteral](real){7.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[argument 6; litteral](logical){FALSE}<LSEP>[](symbol){method}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[argument 1; litteral](real){inf}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fit}<LEND>[statement 1; control flow](){break}<LEND>[statement 59; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[argument 1; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){isTRUE}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){method}<LSEP>[argument 1; litteral](str){CSS}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){trace}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n}<LEND>[statement 1; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){No suitable ARIMA model found}<LEND>[statement 60; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){x}<LEND>[](symbol){orig.x}<LEND>[statement 61; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){series}<LEND>[](symbol){series}<LEND>[statement 62; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[litteral](NULL){NULL}<LEND>[statement 63; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 64; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){call}<LEND>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){x}<LEND>[statement 65; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){lambda}<LEND>[](symbol){lambda}<LEND>[statement 66; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){fitted.Arima}<LSEP>[](symbol){bestfit}<LEND>[statement 67; control flow](){if}<LSEP>[](symbol){trace}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n\n Best model:}<LEND>[argument 1; call](){}<LSEP>[](symbol){arima.string}<LSEP>[](symbol){bestfit}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 2; litteral](str){\n\n}<LEND>[statement 68; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){bestfit}<LEND>[assign](){<-}<LSEP>[](symbol){myarima}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){order}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){constant}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){method}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){missing}<LEND>[call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){firstnonmiss}<LEND>[call](){}<LSEP>[](symbol){head}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){missing}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){lastnonmiss}<LEND>[call](){}<LSEP>[](symbol){tail}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){missing}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){missing}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){firstnonmiss}<LSEP>[](symbol){lastnonmiss}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){use.season}<LEND>[call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){seasonal}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){diffs}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){method}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){approximation}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){method}<LSEP>[litteral](str){CSS}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){method}<LSEP>[litteral](str){CSS-ML}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){diffs}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){constant}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){colnames<-}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){make.unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){drift}<LEND>[argument 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](str){}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){xreg}<LEND>[false branch; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){xreg}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){use.season}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){arima}<LEND>[](symbol){x}<LSEP>[](symbol){order}<LEND>[argument 2; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){m}<LEND>[](symbol){xreg}<LSEP>[](symbol){method}<LSEP>[](symbol){...}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){arima}<LEND>[](symbol){x}<LSEP>[](symbol){order}<LSEP>[](symbol){xreg}<LSEP>[](symbol){method}<LSEP>[](symbol){...}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){use.season}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){arima}<LEND>[](symbol){x}<LSEP>[](symbol){order}<LEND>[argument 2; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){m}<LEND>[](symbol){constant}<LSEP>[](symbol){method}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){arima}<LEND>[](symbol){x}<LSEP>[](symbol){order}<LSEP>[](symbol){constant}<LSEP>[](symbol){method}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nxreg}<LSEP>[litteral](real){0.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nxreg}<LEND>[call](){}<LSEP>[](symbol){ncol}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){xreg}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){fit}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nstar}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){m}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){diffs}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){constant}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){xreg}<LEND>[](symbol){xreg}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){npar}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){coef}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){mask}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){method}<LSEP>[argument 1; litteral](str){CSS}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){aic}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){offset}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){nstar}<LEND>[argument 1; call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){sigma2}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){npar}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){aic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){bic}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){aic}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){npar}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){log}<LSEP>[](symbol){nstar}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){aicc}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){aic}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){npar}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){npar}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){nstar}<LSEP>[](symbol){npar}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[call](){}<LSEP>[](symbol){switch}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){bic}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){aic}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){aicc}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){aic}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){bic}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){aicc}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[litteral](real){inf}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){sigma2}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){residuals}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){nstar}<LSEP>[](symbol){npar}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){minroot}<LSEP>[litteral](real){2.000000}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){testvec}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){model}<LEND>[](symbol){phi}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){testvec}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){last.nonzero}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LSEP>[](symbol){k}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){last.nonzero}<LSEP>[litteral](real){0.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){last.nonzero}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){testvec}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testvec}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){last.nonzero}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){proots}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){polyroot}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){testvec}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){proots}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){minroot}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){minroot}<LEND>[argument 1; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){proots}<LEND>[false branch; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[litteral](real){inf}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[argument 1; litteral](real){inf}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){testvec}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){model}<LEND>[](symbol){theta}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){testvec}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){last.nonzero}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LSEP>[](symbol){k}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){last.nonzero}<LSEP>[litteral](real){0.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){last.nonzero}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){testvec}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testvec}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){last.nonzero}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){proots}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){polyroot}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){testvec}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){proots}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){minroot}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){minroot}<LEND>[argument 1; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){proots}<LEND>[false branch; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[litteral](real){inf}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){minroot}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){0.010000}<LEND>[argument 1; call](){}<LSEP>[](symbol){checkarima}<LSEP>[](symbol){fit}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[litteral](real){inf}<LEND>[statement 10; control flow](){if}<LSEP>[](symbol){trace}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n}<LEND>[argument 1; call](){}<LSEP>[](symbol){arima.string}<LSEP>[](symbol){fit}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 2; litteral](str){:}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[statement 11; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){xreg}<LEND>[](symbol){xreg}<LEND>[statement 12; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){forecast_ARIMA}<LSEP>[argument 1; litteral](str){ARIMA}<LSEP>[argument 2; litteral](str){Arima}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){unused argument}<LSEP>[](symbol){fit}<LEND>[argument 1; litteral](integer){0}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fit}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){trace}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n ARIMA(}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](str){,}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 4; litteral](str){,}<LEND>[argument 5; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 6; litteral](str){)}<LSEP>[argument 7; litteral](str){}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){use.season}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){(}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](str){,}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 4; litteral](str){,}<LEND>[argument 5; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 6; litteral](str){)[}<LSEP>[](symbol){m}<LSEP>[argument 8; litteral](str){]}<LSEP>[argument 9; litteral](str){}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LSEP>[](symbol){constant}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){ with non-zero mean}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LSEP>[](symbol){constant}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){ with drift }<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){constant}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasonal}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){ with zero mean }<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){ }<LEND>[statement 3; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){ :}<LSEP>[argument 1; litteral](real){inf}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](real){inf}<LEND>[assign](){<-}<LSEP>[](symbol){newmodel}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LSEP>[](symbol){constant}<LSEP>[](symbol){results}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){results}<LEND>[statement 1; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){i}<LEND>[argument 2; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){7.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){d}<LSEP>[](symbol){q}<LSEP>[](symbol){P}<LSEP>[](symbol){D}<LSEP>[](symbol){Q}<LSEP>[](symbol){constant}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){results}<LSEP>[](symbol){i}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){7.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){arima.string}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){padding}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){order}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){6.000000}<LSEP>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){3.000000}<LSEP>[argument 4; litteral](real){7.000000}<LSEP>[argument 5; litteral](real){4.000000}<LSEP>[argument 6; litteral](real){5.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){7.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){result}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){ARIMA(}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](str){,}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 4; litteral](str){,}<LEND>[argument 5; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 6; litteral](str){)}<LSEP>[argument 7; litteral](str){}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){4.000000}<LSEP>[argument 1; litteral](real){6.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){result}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){result}<LSEP>[argument 1; litteral](str){(}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 3; litteral](str){,}<LEND>[argument 4; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[argument 5; litteral](str){,}<LEND>[argument 6; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){6.000000}<LEND>[argument 7; litteral](str){)[}<LSEP>[](symbol){m}<LSEP>[argument 9; litteral](str){]}<LSEP>[argument 10; litteral](str){}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LSEP>[](symbol){padding}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){4.000000}<LSEP>[argument 1; litteral](real){6.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){result}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){result}<LSEP>[argument 1; litteral](str){ }<LSEP>[argument 2; litteral](str){}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){9.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){result}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){result}<LSEP>[argument 1; litteral](str){ }<LSEP>[argument 2; litteral](str){}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){99.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){result}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){result}<LSEP>[argument 1; litteral](str){ }<LSEP>[argument 2; litteral](str){}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){result}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){result}<LSEP>[argument 1; litteral](str){ }<LSEP>[argument 2; litteral](str){}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){xreg}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){drift}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coef}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){result}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){result}<LSEP>[argument 1; litteral](str){with drift }<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){result}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Regression with}<LSEP>[](symbol){result}<LSEP>[argument 2; litteral](str){errors}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){constant}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coef}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){intercept}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coef}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){result}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){result}<LSEP>[argument 1; litteral](str){with non-zero mean}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){result}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){result}<LSEP>[argument 1; litteral](str){with zero mean }<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){result}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){result}<LSEP>[argument 1; litteral](str){ }<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){padding}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){result}<LEND>[call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){[ ]*$}<LSEP>[argument 1; litteral](str){}<LSEP>[](symbol){result}<LEND>[statement 7; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){result}<LEND>[assign](){<-}<LSEP>[](symbol){summary.Arima}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){summary.Arima}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[](symbol){object}<LEND>[assign](){<-}<LSEP>[](symbol){print.summary.Arima}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){NextMethod}<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\nTraining set error measures:\n}<LEND>[statement 2; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){checkarima}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.nan}<LEND>[argument 0; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){diag}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){var.coef}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){test}<LEND>[assign](){<-}<LSEP>[](symbol){is.constant}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){isTRUE}<LEND>[argument 0; call](){}<LSEP>[](symbol){all.equal}<LSEP>[](symbol){x}<LSEP>[](symbol){y} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){arroots}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Arima}<LSEP>[argument 1; litteral](str){ar}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){object must be of class Arima ...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){Arima}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){parvec}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){phi}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){parvec}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ar}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){parvec}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){last.nonzero}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){parvec}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){last.nonzero}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){polyroot}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){parvec}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){last.nonzero}<LEND>[argument 1; litteral](str){AR}<LEND>[argument 1; litteral](str){armaroots}<LEND>[statement 3; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){numeric}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; litteral](str){AR}<LEND>[argument 1; litteral](str){armaroots}<LEND>[assign](){<-}<LSEP>[](symbol){maroots}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){Arima}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){object must be of class Arima}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){parvec}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){model}<LEND>[](symbol){theta}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){parvec}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){last.nonzero}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){parvec}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){last.nonzero}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){polyroot}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){parvec}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){last.nonzero}<LEND>[argument 1; litteral](str){MA}<LEND>[argument 1; litteral](str){armaroots}<LEND>[statement 3; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){numeric}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; litteral](str){MA}<LEND>[argument 1; litteral](str){armaroots}<LEND>[assign](){<-}<LSEP>[](symbol){plot.armaroots}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){main}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){main}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){main}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Inverse}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){type}<LEND>[argument 2; litteral](str){roots}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){oldpar}<LEND>[call](){}<LSEP>[](symbol){par}<LSEP>[argument 0; litteral](str){s}<LEND>[statement 2; call](){}<LSEP>[](symbol){on.exit}<LEND>[argument 0; call](){}<LSEP>[](symbol){par}<LSEP>[](symbol){oldpar}<LEND>[statement 3; call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[argument 4; litteral](str){n}<LSEP>[argument 5; litteral](str){n}<LSEP>[argument 6; litteral](str){n}<LSEP>[argument 7; litteral](str){n}<LSEP>[](symbol){main}<LSEP>[](symbol){...}<LEND>[statement 4; call](){}<LSEP>[](symbol){axis}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 2; litteral](real){0.500000}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.025000}<LEND>[statement 5; call](){}<LSEP>[](symbol){axis}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){-i}<LSEP>[argument 1; litteral](str){0}<LSEP>[argument 2; litteral](str){i}<LEND>[argument 3; litteral](real){0.500000}<LEND>[argument 4; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.025000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){circx}<LEND>[call](){}<LSEP>[](symbol){seq}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){501.000000}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){circy}<LEND>[call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){circx}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 8; call](){}<LSEP>[](symbol){lines}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){circx}<LSEP>[](symbol){circx}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){circy}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){circy}<LEND>[argument 2; litteral](str){gray}<LEND>[statement 9; call](){}<LSEP>[](symbol){lines}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 2; litteral](str){gray}<LEND>[statement 10; call](){}<LSEP>[](symbol){lines}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 2; litteral](str){gray}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){roots}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){inside}<LEND>[call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){roots}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){roots}<LEND>[](symbol){inside}<LEND>[argument 1; litteral](real){19.000000}<LSEP>[argument 2; litteral](str){black}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){inside}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){points}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){roots}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){inside}<LEND>[argument 1; litteral](real){19.000000}<LSEP>[argument 2; litteral](str){red}<LEND>[assign](){<-}<LSEP>[](symbol){plot.Arima}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){type}<LSEP>[](symbol){main}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){type}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){type}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){Arima}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){This function is for objects o...}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){q}<LEND>[assign](){<-}<LSEP>[](symbol){p}<LSEP>[litteral](real){0.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){model}<LEND>[](symbol){phi}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){model}<LEND>[](symbol){phi}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LSEP>[](symbol){test}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LSEP>[](symbol){test}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){model}<LEND>[](symbol){theta}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){model}<LEND>[](symbol){theta}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LSEP>[](symbol){test}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LSEP>[](symbol){test}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){both}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){type}<LSEP>[litteral](str){ma}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){type}<LSEP>[litteral](str){ar}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){ar}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){ma}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){No roots to plot}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){main}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){main}<LSEP>[litteral](str){No AR or MA roots}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){both}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){oldpar}<LEND>[call](){}<LSEP>[](symbol){par}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){on.exit}<LEND>[argument 0; call](){}<LSEP>[](symbol){par}<LSEP>[](symbol){oldpar}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){ma}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){arroots}<LSEP>[](symbol){x}<LEND>[](symbol){main}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){...}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){type}<LSEP>[argument 1; litteral](str){ar}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){maroots}<LSEP>[](symbol){x}<LEND>[](symbol){main}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){...}<LEND>[assign](){<-}<LSEP>[](symbol){plot.ar}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){main}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){ar}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){This function is for objects o...}<LEND>[statement 1; call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){arroots}<LSEP>[](symbol){x}<LEND>[](symbol){main}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){...} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){tsCV}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){forecastfunction}<LSEP>[](symbol){h}<LSEP>[](symbol){window}<LSEP>[](symbol){xreg}<LSEP>[](symbol){initial}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){y}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){nan}<LSEP>[](symbol){n}<LSEP>[](symbol){h}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>=}<LSEP>[](symbol){initial}<LSEP>[](symbol){n}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){initial period too long}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){y}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){xreg}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){xreg must be of the same size ...}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){h}<LEND>[argument 2; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){start}<LSEP>[](symbol){y}<LEND>[argument 2; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){y}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){window}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){indx}<LEND>[call](){}<LSEP>[](symbol){seq}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){initial}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](integer){1}<LEND>[false branch; assign](){<-}<LSEP>[](symbol){indx}<LEND>[call](){}<LSEP>[](symbol){seq}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){window}<LSEP>[](symbol){initial}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](integer){1}<LEND>[argument 2; litteral](integer){1}<LEND>[statement 7; control flow](){for}<LSEP>[](symbol){i}<LSEP>[](symbol){indx}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y_subset}<LEND>[call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){window}<LEND>[argument 1; litteral](integer){1}<LEND>[argument 2; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){>=}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[](symbol){window}<LEND>[argument 1; litteral](integer){0}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[](symbol){window}<LEND>[argument 1; litteral](integer){1}<LEND>[argument 2; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){small window}<LEND>[](symbol){i}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fc}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecastfunction}<LSEP>[](symbol){y_subset}<LSEP>[](symbol){h}<LSEP>[](symbol){...}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xreg_subset}<LEND>[call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){window}<LEND>[argument 1; litteral](integer){1}<LEND>[argument 2; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){>=}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[](symbol){window}<LEND>[argument 1; litteral](integer){0}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[](symbol){window}<LEND>[argument 1; litteral](integer){1}<LEND>[argument 2; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){small window}<LEND>[](symbol){i}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xreg_future}<LEND>[call](){}<LSEP>[](symbol){subset}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[](symbol){h}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fc}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecastfunction}<LSEP>[](symbol){y_subset}<LSEP>[](symbol){h}<LSEP>[](symbol){xreg_subset}<LSEP>[](symbol){xreg_future}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){fc}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){e}<LSEP>[](symbol){i}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){seq}<LSEP>[](symbol){h}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fc}<LSEP>[](symbol){mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){seq}<LSEP>[](symbol){h}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){e}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](integer){1}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){h=}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[argument 2; litteral](str){}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){e}<LEND>[assign](){<-}<LSEP>[](symbol){CVar}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){k}<LSEP>[](symbol){FUN}<LSEP>[](symbol){cvtrace}<LSEP>[](symbol){blocked}<LSEP>[](symbol){LBlags}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nx}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){k}<LEND>[](symbol){nx}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](integer){1}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){k must be at least 2}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){ind}<LEND>[call](){}<LSEP>[](symbol){seq_len}<LSEP>[](symbol){nx}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fold}<LEND>[control flow](){if}<LSEP>[](symbol){blocked}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){sort}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[](symbol){nx}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[](symbol){nx}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){cvacc}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){nan}<LSEP>[](symbol){k}<LSEP>[argument 2; litteral](real){7.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){alltestfit}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){nx}<LEND>[statement 8; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){fold}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){testset}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ind}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){fold}<LSEP>[](symbol){i}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){trainset}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ind}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){fold}<LSEP>[](symbol){i}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){trainmodel}<LEND>[call](){}<LSEP>[](symbol){FUN}<LSEP>[](symbol){y}<LSEP>[](symbol){trainset}<LSEP>[](symbol){...}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){testmodel}<LEND>[call](){}<LSEP>[](symbol){FUN}<LSEP>[](symbol){y}<LSEP>[](symbol){trainmodel}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){trainmodel}<LSEP>[](symbol){xreg}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){testfit}<LEND>[call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){testmodel}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){acc}<LEND>[call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){y}<LSEP>[](symbol){testfit}<LSEP>[](symbol){testset}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){cvacc}<LSEP>[](symbol){i}<LSEP>[](symbol){}<LEND>[](symbol){acc}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){fold}<LSEP>[](symbol){i}<LEND>[](symbol){model}<LEND>[](symbol){trainmodel}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){fold}<LSEP>[](symbol){i}<LEND>[](symbol){accuracy}<LEND>[](symbol){acc}<LEND>[statement 10; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){fold}<LSEP>[](symbol){i}<LEND>[](symbol){testfit}<LEND>[](symbol){testfit}<LEND>[statement 11; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){fold}<LSEP>[](symbol){i}<LEND>[](symbol){testset}<LEND>[](symbol){testset}<LEND>[statement 12; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){alltestfit}<LSEP>[](symbol){testset}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testfit}<LSEP>[](symbol){testset}<LEND>[statement 13; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){isTRUE}<LSEP>[](symbol){cvtrace}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Fold}<LSEP>[](symbol){i}<LSEP>[argument 2; litteral](str){\n}<LEND>[statement 1; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){acc}<LEND>[statement 2; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){testfit}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){alltestfit}<LEND>[statement 10; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){testfit}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){y}<LEND>[statement 11; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){residuals}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){testfit}<LEND>[](symbol){y}<LEND>[statement 12; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){LBpvalue}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){Box.test}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){residuals}<LEND>[argument 1; litteral](str){Ljung}<LSEP>[](symbol){LBlags}<LEND>[](symbol){p.value}<LEND>[statement 13; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){k}<LEND>[](symbol){k}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){CVmean}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){cvacc}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){mean}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[argument 1; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){acc}<LEND>[argument 1; litteral](str){Mean}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){CVsd}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){cvacc}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){sd}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[argument 1; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){acc}<LEND>[argument 1; litteral](str){SD}<LEND>[statement 16; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){CVsummary}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){CVmean}<LSEP>[](symbol){CVsd}<LEND>[statement 17; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 18; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 19; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){out}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){CVar}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){trainmodel}<LEND>[assign](){<-}<LSEP>[](symbol){print.CVar}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Series:}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){series}<LEND>[argument 2; litteral](str){\n}<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Call: }<LEND>[statement 2; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){call}<LEND>[statement 3; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){k}<LEND>[argument 2; litteral](str){-fold cross-validation\n}<LSEP>[argument 3; litteral](str){}<LEND>[statement 4; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){CVsummary}<LEND>[statement 5; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n}<LEND>[statement 6; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){p-value of Ljung-Box test of r...}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){LBpvalue}<LEND>[argument 2; litteral](str){\n}<LEND>[statement 7; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){if this value is significant (...}<LEND>[statement 8; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){the result of the cross-valida...}<LEND>[statement 9; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){as the model is underfitting t...}<LEND>[statement 10; call](){}<LSEP>[](symbol){invisible}<LSEP>[](symbol){x} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){fitPreviousBATSModel}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){model}<LSEP>[](symbol){biasadj}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){seasonal.periods}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 1; litteral](logical){FALSE}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LEND>[call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){sort}<LSEP>[](symbol){seasonal.periods}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){paramz}<LEND>[call](){}<LSEP>[](symbol){unParameterise}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){parameters}<LEND>[](symbol){vect}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){parameters}<LEND>[](symbol){control}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){lambda}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){alpha}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){beta.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){beta}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){small.phi}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){small.phi}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){gamma.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){gamma.v}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){ar.coefs}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ar.coefs}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){ma.coefs}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ma.coefs}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ar.coefs}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ma.coefs}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){w}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){makeBATSWMatrix}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[argument 4; litteral](str){forecast}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){g}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){makeBATSGMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){alpha}<LEND>[](symbol){beta.v}<LSEP>[](symbol){gamma.v}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 4; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){p}<LEND>[argument 5; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){q}<LEND>[argument 6; litteral](str){forecast}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){makeFMatrix}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LEND>[argument 2; assign](){<-}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){small.phi}<LEND>[](symbol){seasonal.periods}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){g}<LSEP>[](symbol){gamma.bold.matrix}<LEND>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){y.touse}<LSEP>[](symbol){y}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y.touse}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){y}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){y.touse}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){fitted.values.and.errors}<LEND>[call](){}<LSEP>[](symbol){calcModel}<LSEP>[](symbol){y.touse}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){seed.states}<LEND>[](symbol){F}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){g}<LSEP>[](symbol){g}<LEND>[](symbol){w}<LEND>[statement 18; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fitted.values.and.errors}<LSEP>[](symbol){e}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){fitted.values}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fitted.values.and.errors}<LSEP>[](symbol){y.hat}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){variance}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){e}<LSEP>[](symbol){e}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[statement 21; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fitted.values}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){fitted.values}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){variance}<LEND>[statement 22; assign](){<-}<LSEP>[](symbol){model.for.output}<LSEP>[](symbol){model}<LEND>[statement 23; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model.for.output}<LSEP>[](symbol){variance}<LEND>[](symbol){variance}<LEND>[statement 24; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model.for.output}<LSEP>[](symbol){fitted.values}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){fitted.values}<LEND>[statement 25; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model.for.output}<LSEP>[](symbol){errors}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){e}<LEND>[statement 26; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model.for.output}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fitted.values.and.errors}<LSEP>[](symbol){x}<LEND>[statement 27; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model.for.output}<LSEP>[](symbol){y}<LEND>[](symbol){y}<LEND>[statement 28; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attributes}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model.for.output}<LSEP>[](symbol){fitted.values}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attributes}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model.for.output}<LSEP>[](symbol){errors}<LEND>[call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){y}<LEND>[statement 29; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){model.for.output}<LEND>[assign](){<-}<LSEP>[](symbol){fitSpecificBATS}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){use.box.cox}<LSEP>[](symbol){use.beta}<LSEP>[](symbol){use.damping}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){starting.params}<LSEP>[](symbol){x.nought}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LEND>[call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){sort}<LSEP>[](symbol){seasonal.periods}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){starting.params}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ar.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ar.coefs}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LSEP>[litteral](real){0.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ma.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ma.coefs}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){q}<LSEP>[litteral](real){0.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 1; litteral](real){16.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){(}<LSEP>[argument 0; litteral](real){0.000001}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){alpha}<LSEP>[litteral](real){0.090000}<LEND>[statement 3; control flow](){if}<LSEP>[](symbol){use.beta}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 1; litteral](real){16.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta.v}<LEND>[call](){}<LSEP>[](symbol){(}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta.v}<LSEP>[litteral](real){0.050000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){b}<LSEP>[litteral](real){0.000000}<LEND>[statement 2; control flow](){if}<LSEP>[](symbol){use.damping}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){small.phi}<LSEP>[litteral](real){0.999000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){small.phi}<LSEP>[litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta.v}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){b}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){small.phi}<LSEP>[litteral](NULL){NULL}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){use.damping}<LSEP>[litteral](logical){FALSE}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma.v}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.001000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){seasonal.periods}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){s.vector}<LEND>[call](){}<LSEP>[](symbol){numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){seasonal.periods}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma.v}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){s.vector}<LSEP>[litteral](NULL){NULL}<LEND>[statement 5; control flow](){if}<LSEP>[](symbol){use.box.cox}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){init.box.cox}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lambda}<LSEP>[](symbol){init.box.cox}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){BoxCox.lambda}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.500000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){y.transformed}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){y}<LSEP>[](symbol){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){y.transformed}<LSEP>[argument 1; litteral](str){lambda}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lambda}<LSEP>[litteral](NULL){NULL}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){paramz}<LEND>[call](){}<LSEP>[](symbol){unParameterise}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){starting.params}<LSEP>[](symbol){vect}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){starting.params}<LSEP>[](symbol){control}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){alpha}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){beta.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){beta}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){b}<LSEP>[litteral](real){0.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){small.phi}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){small.phi}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){gamma.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){gamma.v}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){s.vector}<LEND>[call](){}<LSEP>[](symbol){numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){seasonal.periods}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){s.vector}<LSEP>[litteral](NULL){NULL}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ar.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ar.coefs}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LSEP>[litteral](real){0.000000}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ma.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ma.coefs}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){q}<LSEP>[litteral](real){0.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){x.nought}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ar.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){d.vector}<LEND>[call](){}<LSEP>[](symbol){numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ar.coefs}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){d.vector}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ma.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){epsilon.vector}<LEND>[call](){}<LSEP>[](symbol){numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ma.coefs}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){epsilon.vector}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){x.nought}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){makeXMatrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){b}<LSEP>[](symbol){s.vector}<LSEP>[](symbol){d.vector}<LSEP>[](symbol){epsilon.vector}<LEND>[](symbol){x}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){param.vector}<LEND>[call](){}<LSEP>[](symbol){parameterise}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){gamma.v}<LSEP>[](symbol){lambda}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){par.scale}<LEND>[call](){}<LSEP>[](symbol){makeParscaleBATS}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){control}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){w}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){makeBATSWMatrix}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[argument 4; litteral](str){forecast}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){g}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){makeBATSGMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){alpha}<LEND>[](symbol){beta.v}<LSEP>[](symbol){gamma.v}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 4; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){p}<LEND>[argument 5; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){q}<LEND>[argument 6; litteral](str){forecast}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){makeFMatrix}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){g}<LSEP>[](symbol){gamma.bold.matrix}<LEND>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){D}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){F}<LEND>[argument 1; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){g}<LSEP>[](symbol){g}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){w}<LSEP>[](symbol){w.transpose}<LEND>[statement 9; control flow](){if}<LSEP>[](symbol){use.box.cox}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y.transformed}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){y}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){y.transformed}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){y.tilda}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){calcModel}<LSEP>[](symbol){y.transformed}<LSEP>[](symbol){x.nought}<LSEP>[](symbol){F}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){g}<LSEP>[](symbol){g}<LEND>[](symbol){w}<LEND>[](symbol){e}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y.tilda}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){calcModel}<LSEP>[](symbol){y}<LSEP>[](symbol){x.nought}<LSEP>[](symbol){F}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){g}<LSEP>[](symbol){g}<LEND>[](symbol){w}<LEND>[](symbol){e}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){w.tilda.transpose}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[argument 2; call](){}<LSEP>[](symbol){ncol}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){w}<LSEP>[](symbol){w.transpose}<LEND>[statement 11; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){w.tilda.transpose}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){w}<LSEP>[](symbol){w.transpose}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){w.tilda.transpose}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){calcWTilda}<LSEP>[](symbol){w.tilda.transpose}<LSEP>[](symbol){D}<LSEP>[argument 2; litteral](str){forecast}<LEND>[statement 13; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){list.cut.w}<LEND>[call](){}<LSEP>[](symbol){cutW}<LSEP>[](symbol){use.beta}<LSEP>[](symbol){w.tilda.transpose}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){p}<LSEP>[](symbol){q}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){w.tilda.transpose}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){list.cut.w}<LSEP>[](symbol){matrix}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){mask.vector}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){list.cut.w}<LSEP>[](symbol){mask.vector}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){coefs}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){y.tilda}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){w.tilda.transpose}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){coefficients}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){x.nought}<LEND>[call](){}<LSEP>[](symbol){calcSeasonalSeeds}<LSEP>[](symbol){use.beta}<LSEP>[](symbol){coefs}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){mask.vector}<LSEP>[](symbol){p}<LSEP>[](symbol){q}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){end.cut}<LEND>[call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){w.tilda.transpose}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){start.cut}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){end.cut}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[](symbol){q}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){w.tilda.transpose}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){w.tilda.transpose}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){start.cut}<LSEP>[](symbol){end.cut}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x.nought}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){y.tilda}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){w.tilda.transpose}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){coefficients}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){x.nought}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){x.nought}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x.nought}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){arma.seed.states}<LEND>[call](){}<LSEP>[](symbol){numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[](symbol){q}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){arma.seed.states}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){arma.seed.states}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){arma.seed.states}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){x.nought}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){x.nought}<LSEP>[](symbol){arma.seed.states}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){opt.env}<LEND>[call](){}<LSEP>[](symbol){new.env}<LEND>[statement 15; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){F}<LSEP>[](symbol){F}<LSEP>[](symbol){opt.env}<LEND>[statement 16; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){w.transpose}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){w}<LSEP>[](symbol){w.transpose}<LEND>[](symbol){opt.env}<LEND>[statement 17; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){g}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){g}<LSEP>[](symbol){g}<LEND>[](symbol){opt.env}<LEND>[statement 18; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){gamma.bold.matrix}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){g}<LSEP>[](symbol){gamma.bold.matrix}<LEND>[](symbol){opt.env}<LEND>[statement 19; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[](symbol){opt.env}<LEND>[statement 20; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){y.hat}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[](symbol){opt.env}<LEND>[statement 21; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){e}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[](symbol){opt.env}<LEND>[statement 22; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x.nought}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[](symbol){opt.env}<LEND>[statement 23; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tau}<LEND>[call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){seasonal.periods}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tau}<LSEP>[litteral](real){0.000000}<LEND>[statement 24; control flow](){if}<LSEP>[](symbol){use.box.cox}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){x.nought.untransformed}<LEND>[argument 1; call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){x.nought}<LSEP>[](symbol){lambda}<LEND>[](symbol){opt.env}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){optim.like}<LEND>[call](){}<LSEP>[](symbol){optim}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){vect}<LEND>[](symbol){calcLikelihood}<LSEP>[argument 2; litteral](str){Nelder-Mead}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){use.beta}<LSEP>[](symbol){use.damping}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){p}<LSEP>[](symbol){q}<LSEP>[](symbol){tau}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LEND>[argument 12; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){100.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){vect}<LEND>[argument 1; litteral](real){2.000000}<LEND>[](symbol){par.scale}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){paramz}<LEND>[call](){}<LSEP>[](symbol){unParameterise}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optim.like}<LSEP>[](symbol){par}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){control}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){lambda}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){alpha}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){beta.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){beta}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){small.phi}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){small.phi}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){gamma.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){gamma.v}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){ar.coefs}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ar.coefs}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){ma.coefs}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ma.coefs}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){x.nought}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){x.nought.untransformed}<LEND>[](symbol){lambda}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x.nought}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){w}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){makeBATSWMatrix}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[argument 4; litteral](str){forecast}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){g}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){makeBATSGMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){alpha}<LEND>[](symbol){beta.v}<LSEP>[](symbol){gamma.v}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 4; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){p}<LEND>[argument 5; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){q}<LEND>[argument 6; litteral](str){forecast}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){makeFMatrix}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){g}<LSEP>[](symbol){gamma.bold.matrix}<LEND>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){y.transformed}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){y}<LSEP>[](symbol){lambda}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){y.transformed}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){fitted.values.and.errors}<LEND>[call](){}<LSEP>[](symbol){calcModel}<LSEP>[](symbol){y.transformed}<LSEP>[](symbol){x.nought}<LSEP>[](symbol){F}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){g}<LSEP>[](symbol){g}<LEND>[](symbol){w}<LEND>[statement 18; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fitted.values.and.errors}<LSEP>[](symbol){e}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){variance}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){e}<LSEP>[](symbol){e}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){fitted.values}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fitted.values.and.errors}<LSEP>[](symbol){y.hat}<LEND>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){variance}<LEND>[statement 21; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](str){biasadj}<LEND>[](symbol){biasadj}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){vect}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){optim.like}<LEND>[call](){}<LSEP>[](symbol){optim}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){vect}<LEND>[](symbol){calcLikelihoodNOTransformed}<LSEP>[argument 2; litteral](str){Nelder-Mead}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){x.nought}<LSEP>[](symbol){use.beta}<LSEP>[](symbol){use.damping}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){p}<LSEP>[](symbol){q}<LSEP>[](symbol){tau}<LEND>[argument 11; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){100.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){vect}<LEND>[argument 1; litteral](real){2.000000}<LEND>[](symbol){par.scale}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){optim.like}<LEND>[call](){}<LSEP>[](symbol){optim}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){vect}<LEND>[](symbol){calcLikelihoodNOTransformed}<LSEP>[argument 2; litteral](str){BFGS}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){x.nought}<LSEP>[](symbol){use.beta}<LSEP>[](symbol){use.damping}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){p}<LSEP>[](symbol){q}<LSEP>[](symbol){tau}<LEND>[argument 11; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){par.scale}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){paramz}<LEND>[call](){}<LSEP>[](symbol){unParameterise}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optim.like}<LSEP>[](symbol){par}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){control}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){lambda}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){alpha}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){beta.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){beta}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){small.phi}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){small.phi}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){gamma.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){gamma.v}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){ar.coefs}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ar.coefs}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){ma.coefs}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ma.coefs}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){w}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){makeBATSWMatrix}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[argument 4; litteral](str){forecast}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){g}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){makeBATSGMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){alpha}<LEND>[](symbol){beta.v}<LSEP>[](symbol){gamma.v}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 4; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){p}<LEND>[argument 5; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){q}<LEND>[argument 6; litteral](str){forecast}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){makeFMatrix}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LEND>[argument 2; assign](){<-}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){small.phi}<LEND>[](symbol){seasonal.periods}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){g}<LSEP>[](symbol){gamma.bold.matrix}<LEND>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){fitted.values.and.errors}<LEND>[call](){}<LSEP>[](symbol){calcModel}<LSEP>[](symbol){y}<LSEP>[](symbol){x.nought}<LSEP>[](symbol){F}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){g}<LSEP>[](symbol){g}<LEND>[](symbol){w}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fitted.values.and.errors}<LSEP>[](symbol){e}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){fitted.values}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fitted.values.and.errors}<LSEP>[](symbol){y.hat}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){variance}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){e}<LSEP>[](symbol){e}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[statement 25; assign](){<-}<LSEP>[](symbol){likelihood}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optim.like}<LSEP>[](symbol){value}<LEND>[statement 26; assign](){<-}<LSEP>[](symbol){aic}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){likelihood}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){vect}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){x.nought}<LEND>[statement 27; assign](){<-}<LSEP>[](symbol){model.for.output}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){lambda}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){gamma.v}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[](symbol){likelihood}<LEND>[argument 8; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optim.like}<LSEP>[](symbol){convergence}<LEND>[](symbol){variance}<LSEP>[](symbol){aic}<LEND>[argument 11; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optim.like}<LSEP>[](symbol){par}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){control}<LEND>[](symbol){x.nought}<LEND>[argument 13; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){fitted.values}<LEND>[argument 14; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){e}<LEND>[argument 15; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fitted.values.and.errors}<LSEP>[](symbol){x}<LEND>[](symbol){seasonal.periods}<LSEP>[](symbol){y}<LEND>[statement 28; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){model.for.output}<LEND>[litteral](str){bats}<LEND>[statement 29; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){model.for.output}<LEND>[assign](){<-}<LSEP>[](symbol){calcModel}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){x.nought}<LSEP>[](symbol){F}<LSEP>[](symbol){g}<LSEP>[](symbol){w}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){length.ts}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x.nought}<LEND>[](symbol){length.ts}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){y.hat}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){length.ts}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){length.ts}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y.hat}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){w}<LSEP>[](symbol){w.transpose}<LEND>[](symbol){x.nought}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){e}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y.hat}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){F}<LSEP>[](symbol){x.nought}<LEND>[argument 1; call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){g}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){e}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){length.ts}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){loop}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){calcBATS}<LSEP>[](symbol){y}<LSEP>[](symbol){y.hat}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){w}<LSEP>[](symbol){w.transpose}<LEND>[](symbol){F}<LSEP>[](symbol){x}<LSEP>[](symbol){g}<LSEP>[](symbol){e}<LSEP>[argument 7; litteral](str){forecast}<LEND>[statement 9; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){loop}<LSEP>[](symbol){y.hat}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){loop}<LSEP>[](symbol){e}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){loop}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){calcLikelihood}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){use.beta}<LSEP>[](symbol){use.small.phi}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){p}<LSEP>[](symbol){q}<LSEP>[](symbol){tau}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){box.cox.parameter}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 2; control flow](){if}<LSEP>[](symbol){use.beta}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){use.small.phi}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){small.phi}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta.v}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){gamma.start}<LSEP>[litteral](real){5.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){small.phi}<LSEP>[litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta.v}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){gamma.start}<LSEP>[litteral](real){4.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){small.phi}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta.v}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){gamma.start}<LSEP>[litteral](real){3.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma.vector}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){gamma.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){gamma.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){final.gamma.pos}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){gamma.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){gamma.vector}<LEND>[argument 1; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma.vector}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){final.gamma.pos}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){gamma.start}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){final.gamma.pos}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){final.gamma.pos}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){final.gamma.pos}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){param.vector}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){q}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){x.nought}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){x.nought.untransformed}<LEND>[](symbol){box.cox.parameter}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x.nought}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 8; call](){.Call}<LSEP>[call name; litteral](str){updateWtransposeMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){w.transpose}<LEND>[](symbol){small.phi}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){tau}<LEND>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LEND>[argument 5; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){p}<LEND>[argument 6; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){q}<LEND>[argument 7; litteral](str){forecast}<LEND>[statement 9; call](){.Call}<LSEP>[call name; litteral](str){updateGMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){g}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){gamma.bold.matrix}<LEND>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LSEP>[](symbol){gamma.vector}<LSEP>[](symbol){seasonal.periods}<LSEP>[argument 6; litteral](str){forecast}<LEND>[statement 10; call](){.Call}<LSEP>[call name; litteral](str){updateFMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){F}<LEND>[](symbol){small.phi}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){gamma.bold.matrix}<LEND>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[](symbol){tau}<LSEP>[argument 8; litteral](str){forecast}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){mat.transformed.y}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){y}<LEND>[](symbol){box.cox.parameter}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){mat.transformed.y}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){ncol}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){y}<LEND>[statement 14; call](){.Call}<LSEP>[call name; litteral](str){calcBATSFaster}<LSEP>[](symbol){mat.transformed.y}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){y.hat}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){w.transpose}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){F}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){x}<LEND>[argument 5; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){g}<LEND>[argument 6; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){e}<LEND>[](symbol){x.nought}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){beta.v}<LEND>[argument 10; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){tau}<LEND>[argument 11; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){p}<LEND>[argument 12; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){q}<LEND>[argument 13; litteral](str){forecast}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){log.likelihood}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){e}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){box.cox.parameter}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){y}<LEND>[statement 16; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){D}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){F}<LEND>[argument 1; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){g}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){w.transpose}<LEND>[](symbol){opt.env}<LEND>[statement 17; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){checkAdmissibility}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){box.cox.parameter}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[](symbol){tau}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){log.likelihood}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[argument 1; litteral](real){20.000000}<LEND>[assign](){<-}<LSEP>[](symbol){calcLikelihoodNOTransformed}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){x.nought}<LSEP>[](symbol){use.beta}<LSEP>[](symbol){use.small.phi}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){p}<LSEP>[](symbol){q}<LSEP>[](symbol){tau}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){use.beta}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){use.small.phi}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){small.phi}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta.v}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){gamma.start}<LSEP>[litteral](real){4.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){small.phi}<LSEP>[litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta.v}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){gamma.start}<LSEP>[litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){small.phi}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta.v}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){gamma.start}<LSEP>[litteral](real){2.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma.vector}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){gamma.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){gamma.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){final.gamma.pos}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){gamma.start}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){gamma.vector}<LEND>[argument 1; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma.vector}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){final.gamma.pos}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){gamma.start}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){final.gamma.pos}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){final.gamma.pos}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){param.vector}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){final.gamma.pos}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){param.vector}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){q}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 5; call](){.Call}<LSEP>[call name; litteral](str){updateWtransposeMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){w.transpose}<LEND>[](symbol){small.phi}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){tau}<LEND>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LEND>[argument 5; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){p}<LEND>[argument 6; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){q}<LEND>[argument 7; litteral](str){forecast}<LEND>[statement 6; call](){.Call}<LSEP>[call name; litteral](str){updateGMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){g}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){gamma.bold.matrix}<LEND>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LSEP>[](symbol){gamma.vector}<LSEP>[](symbol){seasonal.periods}<LSEP>[argument 6; litteral](str){forecast}<LEND>[statement 7; call](){.Call}<LSEP>[call name; litteral](str){updateFMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){F}<LEND>[](symbol){small.phi}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){gamma.bold.matrix}<LEND>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[](symbol){tau}<LSEP>[argument 8; litteral](str){forecast}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){ncol}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){y}<LEND>[statement 9; call](){.Call}<LSEP>[call name; litteral](str){calcBATSFaster}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){y.hat}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){w.transpose}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){F}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){x}<LEND>[argument 5; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){g}<LEND>[argument 6; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){e}<LEND>[](symbol){x.nought}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){beta.v}<LEND>[argument 10; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){tau}<LEND>[argument 11; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){p}<LEND>[argument 12; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){q}<LEND>[argument 13; litteral](str){forecast}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){log.likelihood}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){e}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){e}<LEND>[statement 11; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){D}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){F}<LEND>[argument 1; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){g}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){w.transpose}<LEND>[](symbol){opt.env}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){checkAdmissibility}<LSEP>[](symbol){opt.env}<LSEP>[argument 1; litteral](NULL){NULL}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[](symbol){tau}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){log.likelihood}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[argument 1; litteral](real){20.000000} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){ets}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){model}<LSEP>[](symbol){damped}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){phi}<LSEP>[](symbol){additive.only}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){lower}<LSEP>[](symbol){upper}<LSEP>[](symbol){opt.crit}<LSEP>[](symbol){nmse}<LSEP>[](symbol){bounds}<LSEP>[](symbol){ic}<LSEP>[](symbol){restrict}<LSEP>[](symbol){allow.multiplicative.trend}<LSEP>[](symbol){use.initial.values}<LSEP>[](symbol){na.action}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){opt.crit}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){opt.crit}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){bounds}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){bounds}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){ic}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){ic}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.function}<LSEP>[](symbol){na.action}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){na.fn_name}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){na.action}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){na.action}<LEND>[call](){}<LSEP>[](symbol){get}<LSEP>[](symbol){na.fn_name}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){seriesname}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){data.frame}<LSEP>[argument 1; litteral](str){list}<LSEP>[argument 2; litteral](str){matrix}<LSEP>[argument 3; litteral](str){mts}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){y should be a univariate time ...}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){y}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){model}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.constant}<LSEP>[](symbol){y}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){ses}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](real){0.999990}<LSEP>[argument 2; litteral](str){simple}<LEND>[](symbol){model}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){ny}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){na.action}<LSEP>[](symbol){y}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){ny}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){na.fn_name}<LSEP>[argument 1; litteral](str){na.contiguous}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Missing values encountered. Us...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ny}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){orig.y}<LSEP>[](symbol){y}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){model}<LEND>[argument 1; litteral](str){ets}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){lambda}<LEND>[statement 13; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){y}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){additive.only}<LSEP>[litteral](logical){TRUE}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){nmse}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){nmse}<LSEP>[argument 1; litteral](real){30.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){nmse out of range}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){y}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){upper}<LSEP>[](symbol){lower}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Lower limits must be less than...}<LEND>[statement 17; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){model}<LEND>[argument 1; litteral](str){ets}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){par}<LEND>[argument 1; litteral](str){alpha}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){par}<LEND>[argument 1; litteral](str){beta}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta}<LSEP>[litteral](NULL){NULL}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){gamma}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){par}<LEND>[argument 1; litteral](str){gamma}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){gamma}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma}<LSEP>[litteral](NULL){NULL}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){phi}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){par}<LEND>[argument 1; litteral](str){phi}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){phi}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){phi}<LSEP>[litteral](NULL){NULL}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){modelcomponents}<LEND>[call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 3; litteral](str){}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){damped}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](str){TRUE}<LEND>[statement 9; control flow](){if}<LSEP>[](symbol){use.initial.values}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){errortype}<LEND>[call](){}<LSEP>[](symbol){substr}<LSEP>[](symbol){modelcomponents}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){trendtype}<LEND>[call](){}<LSEP>[](symbol){substr}<LSEP>[](symbol){modelcomponents}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){seasontype}<LEND>[call](){}<LSEP>[](symbol){substr}<LSEP>[](symbol){modelcomponents}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){pegelsresid.C}<LSEP>[](symbol){y}<LSEP>[](symbol){m}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){initstate}<LEND>[](symbol){errortype}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){seasontype}<LSEP>[](symbol){damped}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){phi}<LSEP>[](symbol){nmse}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){np}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){par}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){loglik}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){lik}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){aic}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){lik}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){np}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){bic}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){lik}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){log}<LSEP>[](symbol){ny}<LEND>[](symbol){np}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){aicc}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){aic}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){np}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){np}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){ny}<LSEP>[](symbol){np}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){mse}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){amse}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 10; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){amse}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){amse}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){tsp.y}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){y}<LEND>[statement 12; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){states}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){states}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp.y}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp.y}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp.y}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 13; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){states}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){l}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){states}<LEND>[argument 1; litteral](real){2.000000}<LEND>[litteral](str){b}<LEND>[statement 15; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){states}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){N}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){states}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){s}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){m}<LEND>[argument 2; litteral](str){}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){errortype}<LSEP>[argument 1; litteral](str){A}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){e}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp.y}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp.y}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){e}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp.y}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp.y}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 17; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){residuals}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){e}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp.y}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp.y}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 18; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){sigma2}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){residuals}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){ny}<LSEP>[](symbol){np}<LEND>[statement 19; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){x}<LEND>[](symbol){orig.y}<LEND>[statement 20; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){series}<LEND>[](symbol){seriesname}<LEND>[statement 21; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){fitted}<LEND>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[argument 3; call](){}<LSEP>[](symbol){var}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){residuals}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](str){biasadj}<LEND>[](symbol){biasadj}<LEND>[statement 22; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){lambda}<LEND>[](symbol){lambda}<LEND>[statement 23; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){model}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){model}<LSEP>[](symbol){modelcomponents}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){use.initial.values}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){message}<LSEP>[argument 0; litteral](str){Model is being refit with curr...}<LEND>[statement 18; assign](){<-}<LSEP>[](symbol){errortype}<LEND>[call](){}<LSEP>[](symbol){substr}<LSEP>[](symbol){model}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){trendtype}<LEND>[call](){}<LSEP>[](symbol){substr}<LSEP>[](symbol){model}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){seasontype}<LEND>[call](){}<LSEP>[](symbol){substr}<LSEP>[](symbol){model}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[statement 21; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[](symbol){errortype}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){M}<LSEP>[argument 1; litteral](str){A}<LSEP>[argument 2; litteral](str){Z}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Invalid error type}<LEND>[statement 22; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[](symbol){trendtype}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){N}<LSEP>[argument 1; litteral](str){A}<LSEP>[argument 2; litteral](str){M}<LSEP>[argument 3; litteral](str){Z}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Invalid trend type}<LEND>[statement 23; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[](symbol){seasontype}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){N}<LSEP>[argument 1; litteral](str){A}<LSEP>[argument 2; litteral](str){M}<LSEP>[argument 3; litteral](str){Z}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Invalid season type}<LEND>[statement 24; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[](symbol){m}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasontype}<LSEP>[litteral](str){N}<LEND>[statement 25; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){A}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){M}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Nonseasonal data}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){substr}<LSEP>[](symbol){model}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[assign](){<-}<LSEP>[](symbol){seasontype}<LSEP>[litteral](str){N}<LEND>[statement 26; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){24.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[](symbol){seasontype}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){A}<LSEP>[argument 1; litteral](str){M}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Frequency too high}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){Z}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){I can't handle data with frequ...}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){substr}<LSEP>[](symbol){model}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[assign](){<-}<LSEP>[](symbol){seasontype}<LSEP>[litteral](str){N}<LEND>[statement 27; control flow](){if}<LSEP>[](symbol){restrict}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){errortype}<LSEP>[argument 1; litteral](str){A}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){M}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){M}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){errortype}<LSEP>[argument 1; litteral](str){M}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){M}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){A}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LSEP>[](symbol){additive.only}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){errortype}<LSEP>[argument 1; litteral](str){M}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){M}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){M}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Forbidden model combination}<LEND>[statement 28; assign](){<-}<LSEP>[](symbol){data.positive}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 29; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){data.positive}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){errortype}<LSEP>[argument 1; litteral](str){M}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Inappropriate model for data w...}<LEND>[statement 30; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){damped}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LSEP>[](symbol){damped}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Forbidden model combination}<LEND>[statement 31; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[statement 32; assign](){<-}<LSEP>[](symbol){npars}<LSEP>[litteral](integer){2}<LEND>[statement 33; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){A}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){M}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){npars}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){npars}<LSEP>[argument 1; litteral](integer){2}<LEND>[statement 34; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){A}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){M}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){npars}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){npars}<LSEP>[](symbol){m}<LEND>[statement 35; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){damped}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){npars}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){npars}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){damped}<LEND>[statement 36; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){npars}<LSEP>[argument 1; litteral](integer){4}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){damped}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){damped}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Not enough data to use damping}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){A}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){M}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){HoltWintersZZ}<LSEP>[](symbol){orig.y}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){phi}<LEND>[argument 5; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){M}<LEND>[argument 6; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){A}<LEND>[argument 1; litteral](str){multiplicative}<LSEP>[argument 2; litteral](str){additive}<LEND>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[argument 9; litteral](logical){FALSE}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){fit}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){fit}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 3; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fit}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Seasonal component could not b...}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){A}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){M}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){HoltWintersZZ}<LSEP>[](symbol){orig.y}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[argument 3; litteral](logical){FALSE}<LSEP>[](symbol){phi}<LEND>[argument 5; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){M}<LEND>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[argument 8; litteral](logical){FALSE}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){fit}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){fit}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 3; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fit}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Trend component could not be e...}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){N}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){HoltWintersZZ}<LSEP>[](symbol){orig.y}<LSEP>[](symbol){alpha}<LSEP>[argument 2; litteral](logical){FALSE}<LSEP>[argument 3; litteral](logical){FALSE}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[argument 6; litteral](logical){FALSE}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){fit}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){fit}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 3; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fit}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fit1}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){HoltWintersZZ}<LSEP>[](symbol){orig.y}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[argument 3; litteral](logical){FALSE}<LSEP>[](symbol){phi}<LEND>[argument 5; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){M}<LEND>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[argument 8; litteral](logical){FALSE}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){fit2}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){HoltWintersZZ}<LSEP>[](symbol){orig.y}<LSEP>[](symbol){alpha}<LSEP>[argument 2; litteral](logical){FALSE}<LSEP>[argument 3; litteral](logical){FALSE}<LSEP>[](symbol){phi}<LEND>[argument 5; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){M}<LEND>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[argument 8; litteral](logical){FALSE}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){fit1}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LSEP>[](symbol){fit2}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit1}<LSEP>[](symbol){sigma2}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){sigma2}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LSEP>[](symbol){fit1}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LSEP>[](symbol){fit2}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){fit}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Unable to estimate a model.}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){fit}<LEND>[statement 10; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 11; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fit}<LEND>[statement 37; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){errortype}<LSEP>[argument 1; litteral](str){Z}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){errortype}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){A}<LSEP>[argument 1; litteral](str){M}<LEND>[statement 38; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){Z}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){allow.multiplicative.trend}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){trendtype}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){N}<LSEP>[argument 1; litteral](str){A}<LSEP>[argument 2; litteral](str){M}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){trendtype}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){N}<LSEP>[argument 1; litteral](str){A}<LEND>[statement 39; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){Z}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasontype}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){N}<LSEP>[argument 1; litteral](str){A}<LSEP>[argument 2; litteral](str){M}<LEND>[statement 40; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){damped}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){damped}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](logical){TRUE}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[statement 41; assign](){<-}<LSEP>[](symbol){best.ic}<LSEP>[litteral](real){inf}<LEND>[statement 42; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){errortype}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){trendtype}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){seasontype}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){l}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){damped}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){j}<LEND>[argument 1; litteral](str){N}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){damped}<LSEP>[](symbol){l}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){next}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){restrict}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){errortype}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](str){A}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){j}<LEND>[argument 1; litteral](str){M}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasontype}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](str){M}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){next}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){errortype}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](str){M}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){j}<LEND>[argument 1; litteral](str){M}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasontype}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](str){A}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){next}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LSEP>[](symbol){additive.only}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){errortype}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](str){M}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){j}<LEND>[argument 1; litteral](str){M}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasontype}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](str){M}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){next}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){data.positive}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){errortype}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](str){M}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){next}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){etsmodel}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){errortype}<LSEP>[](symbol){i}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){j}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasontype}<LSEP>[](symbol){k}<LEND>[argument 4; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){damped}<LSEP>[](symbol){l}<LEND>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){phi}<LSEP>[](symbol){lower}<LSEP>[](symbol){upper}<LSEP>[](symbol){opt.crit}<LSEP>[](symbol){nmse}<LSEP>[](symbol){bounds}<LSEP>[](symbol){...}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){fit}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){fit.ic}<LSEP>[litteral](real){inf}<LEND>[false branch; assign](){<-}<LSEP>[](symbol){fit.ic}<LEND>[call](){}<LSEP>[](symbol){switch}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){aic}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){bic}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){aicc}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){fit.ic}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){fit.ic}<LSEP>[](symbol){best.ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){model}<LSEP>[](symbol){fit}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){best.ic}<LSEP>[](symbol){fit.ic}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){best.e}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){errortype}<LSEP>[](symbol){i}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){best.t}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){j}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){best.s}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seasontype}<LSEP>[](symbol){k}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){best.d}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){damped}<LSEP>[](symbol){l}<LEND>[statement 43; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){best.ic}<LSEP>[argument 1; litteral](real){inf}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){No model able to be fitted}<LEND>[statement 44; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){m}<LEND>[](symbol){m}<LEND>[statement 45; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){ETS(}<LSEP>[](symbol){best.e}<LSEP>[argument 2; litteral](str){,}<LSEP>[](symbol){best.t}<LEND>[argument 4; call](){}<LSEP>[](symbol){ifelse}<LSEP>[](symbol){best.d}<LSEP>[argument 1; litteral](str){d}<LSEP>[argument 2; litteral](str){}<LEND>[argument 5; litteral](str){,}<LSEP>[](symbol){best.s}<LSEP>[argument 7; litteral](str){)}<LSEP>[argument 8; litteral](str){}<LEND>[statement 46; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){series}<LEND>[](symbol){seriesname}<LEND>[statement 47; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){components}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){best.e}<LSEP>[](symbol){best.t}<LSEP>[](symbol){best.s}<LSEP>[](symbol){best.d}<LEND>[statement 48; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 49; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){initstate}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){states}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){}<LEND>[statement 50; assign](){<-}<LSEP>[](symbol){np}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){par}<LEND>[statement 51; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){sigma2}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){residuals}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){ny}<LSEP>[](symbol){np}<LEND>[statement 52; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){x}<LEND>[](symbol){orig.y}<LEND>[statement 53; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){fitted}<LEND>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){sigma2}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](str){biasadj}<LEND>[](symbol){biasadj}<LEND>[statement 54; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){lambda}<LEND>[](symbol){lambda}<LEND>[statement 55; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){model}<LSEP>[argument 1; litteral](str){ets}<LEND>[assign](){<-}<LSEP>[](symbol){as.character.ets}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){ETS(}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](str){,}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](str){d}<LSEP>[argument 2; litteral](str){}<LEND>[argument 5; litteral](str){,}<LEND>[argument 6; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 7; litteral](str){)}<LSEP>[argument 8; litteral](str){}<LEND>[assign](){<-}<LSEP>[](symbol){etsmodel}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){errortype}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){seasontype}<LSEP>[](symbol){damped}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){phi}<LSEP>[](symbol){lower}<LSEP>[](symbol){upper}<LSEP>[](symbol){opt.crit}<LSEP>[](symbol){nmse}<LSEP>[](symbol){bounds}<LSEP>[](symbol){maxit}<LSEP>[](symbol){control}<LSEP>[](symbol){seed}<LSEP>[](symbol){trace}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tsp.y}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){y}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){tsp.y}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tsp.y}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp.y}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){m}<LSEP>[litteral](real){1.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){alpha}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){gamma}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){par}<LEND>[call](){}<LSEP>[](symbol){initparam}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){phi}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){seasontype}<LSEP>[](symbol){damped}<LSEP>[](symbol){lower}<LSEP>[](symbol){upper}<LSEP>[](symbol){m}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){alpha}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){beta}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){gamma}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){phi}<LEND>[litteral](NULL){NULL}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){par.noopt}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){phi}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){par.noopt}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){par.noopt}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){na.omit}<LSEP>[](symbol){par.noopt}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){alpha}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){alpha}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){beta}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){gamma}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){gamma}<LEND>[statement 13; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){phi}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){phi}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){phi}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){check.param}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){phi}<LSEP>[](symbol){lower}<LSEP>[](symbol){upper}<LSEP>[](symbol){bounds}<LSEP>[](symbol){m}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Model: ETS(}<LSEP>[](symbol){errortype}<LSEP>[argument 2; litteral](str){,}<LSEP>[](symbol){trendtype}<LEND>[argument 4; call](){}<LSEP>[](symbol){ifelse}<LSEP>[](symbol){damped}<LSEP>[argument 1; litteral](str){d}<LSEP>[argument 2; litteral](str){}<LEND>[argument 5; litteral](str){,}<LSEP>[](symbol){seasontype}<LSEP>[argument 7; litteral](str){)}<LSEP>[argument 8; litteral](str){}<LEND>[statement 1; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Parameters out of range}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){init.state}<LEND>[call](){}<LSEP>[](symbol){initstate}<LSEP>[](symbol){y}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){seasontype}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){nstate}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){init.state}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){par}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){par}<LSEP>[](symbol){init.state}<LEND>[statement 18; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){lower}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[](symbol){nstate}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){upper}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){inf}<LSEP>[](symbol){nstate}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){np}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){par}<LEND>[statement 21; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>=}<LSEP>[](symbol){np}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](real){inf}<LSEP>[argument 1; litteral](real){inf}<LSEP>[argument 2; litteral](real){inf}<LSEP>[argument 3; litteral](real){inf}<LSEP>[argument 4; litteral](real){inf}<LSEP>[argument 5; litteral](NULL){NULL}<LSEP>[](symbol){par}<LSEP>[](symbol){init.state}<LEND>[statement 22; assign](){<-}<LSEP>[](symbol){env}<LEND>[call](){}<LSEP>[](symbol){etsTargetFunctionInit}<LSEP>[](symbol){par}<LSEP>[](symbol){y}<LSEP>[](symbol){nstate}<LSEP>[](symbol){errortype}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){seasontype}<LSEP>[](symbol){damped}<LSEP>[](symbol){par.noopt}<LSEP>[](symbol){lower}<LSEP>[](symbol){upper}<LSEP>[](symbol){opt.crit}<LEND>[argument 11; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){nmse}<LEND>[](symbol){bounds}<LSEP>[](symbol){m}<LEND>[argument 14; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){par}<LEND>[argument 15; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){par.noopt}<LEND>[statement 23; assign](){<-}<LSEP>[](symbol){fred}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){etsNelderMead}<LSEP>[](symbol){par}<LSEP>[](symbol){env}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 3; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){.Machine}<LSEP>[](symbol){double.eps}<LEND>[argument 4; litteral](real){1.000000}<LSEP>[argument 5; litteral](real){0.500000}<LSEP>[argument 6; litteral](real){2.000000}<LSEP>[](symbol){trace}<LSEP>[](symbol){maxit}<LSEP>[argument 9; litteral](str){forecast}<LEND>[statement 24; assign](){<-}<LSEP>[](symbol){fit.par}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fred}<LSEP>[](symbol){par}<LEND>[statement 25; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){fit.par}<LEND>[call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){par}<LEND>[statement 26; assign](){<-}<LSEP>[](symbol){init.state}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fit.par}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){np}<LSEP>[](symbol){nstate}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){np}<LEND>[statement 27; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){init.state}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){init.state}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){m}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){M}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){init.state}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){N}<LEND>[](symbol){nstate}<LEND>[statement 28; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fit.par}<LSEP>[argument 1; litteral](str){alpha}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fit.par}<LSEP>[argument 1; litteral](str){alpha}<LEND>[statement 29; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fit.par}<LSEP>[argument 1; litteral](str){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fit.par}<LSEP>[argument 1; litteral](str){beta}<LEND>[statement 30; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fit.par}<LSEP>[argument 1; litteral](str){gamma}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fit.par}<LSEP>[argument 1; litteral](str){gamma}<LEND>[statement 31; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fit.par}<LSEP>[argument 1; litteral](str){phi}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){phi}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fit.par}<LSEP>[argument 1; litteral](str){phi}<LEND>[statement 32; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){pegelsresid.C}<LSEP>[](symbol){y}<LSEP>[](symbol){m}<LSEP>[](symbol){init.state}<LSEP>[](symbol){errortype}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){seasontype}<LSEP>[](symbol){damped}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){phi}<LSEP>[](symbol){nmse}<LEND>[statement 33; assign](){<-}<LSEP>[](symbol){np}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){np}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 34; assign](){<-}<LSEP>[](symbol){ny}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[statement 35; assign](){<-}<LSEP>[](symbol){aic}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){lik}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){np}<LEND>[statement 36; assign](){<-}<LSEP>[](symbol){bic}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){lik}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){log}<LSEP>[](symbol){ny}<LEND>[](symbol){np}<LEND>[statement 37; assign](){<-}<LSEP>[](symbol){aicc}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){aic}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){np}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){np}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){ny}<LSEP>[](symbol){np}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 38; assign](){<-}<LSEP>[](symbol){mse}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){amse}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 39; assign](){<-}<LSEP>[](symbol){amse}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){amse}<LEND>[statement 40; assign](){<-}<LSEP>[](symbol){states}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){states}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp.y}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp.y}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp.y}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 41; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){states}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){l}<LEND>[statement 42; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){states}<LEND>[argument 1; litteral](real){2.000000}<LEND>[litteral](str){b}<LEND>[statement 43; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){states}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){N}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){states}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){s}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){m}<LEND>[argument 2; litteral](str){}<LEND>[statement 44; assign](){<-}<LSEP>[](symbol){tmp}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](str){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){N}<LEND>[argument 2; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](str){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){N}<LEND>[argument 3; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](str){phi}<LSEP>[](symbol){damped}<LEND>[statement 45; assign](){<-}<LSEP>[](symbol){fit.par}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){fit.par}<LSEP>[](symbol){par.noopt}<LEND>[statement 46; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){errortype}<LSEP>[argument 1; litteral](str){A}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){e}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){e}<LEND>[statement 47; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){lik}<LEND>[](symbol){aic}<LSEP>[](symbol){bic}<LSEP>[](symbol){aicc}<LSEP>[](symbol){mse}<LSEP>[](symbol){amse}<LSEP>[](symbol){fred}<LEND>[argument 7; call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){e}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp.y}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp.y}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 8; call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){fits}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp.y}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsp.y}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){states}<LSEP>[](symbol){fit.par}<LEND>[assign](){<-}<LSEP>[](symbol){etsTargetFunctionInit}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){par}<LSEP>[](symbol){y}<LSEP>[](symbol){nstate}<LSEP>[](symbol){errortype}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){seasontype}<LSEP>[](symbol){damped}<LSEP>[](symbol){par.noopt}<LSEP>[](symbol){lowerb}<LSEP>[](symbol){upperb}<LSEP>[](symbol){opt.crit}<LSEP>[](symbol){nmse}<LSEP>[](symbol){bounds}<LSEP>[](symbol){m}<LSEP>[](symbol){pnames}<LSEP>[](symbol){pnames2}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){par}<LEND>[](symbol){pnames}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){par.noopt}<LEND>[](symbol){pnames2}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par.noopt}<LSEP>[argument 1; litteral](str){alpha}<LEND>[argument 1; litteral](str){alpha}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){alpha}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){alpha problem!}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par.noopt}<LSEP>[argument 1; litteral](str){beta}<LEND>[argument 1; litteral](str){beta}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){beta Problem!}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta}<LSEP>[litteral](NULL){NULL}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par.noopt}<LSEP>[argument 1; litteral](str){gamma}<LEND>[argument 1; litteral](str){gamma}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){gamma}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){gamma Problem!}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){m}<LSEP>[litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){gamma}<LSEP>[litteral](NULL){NULL}<LEND>[statement 6; control flow](){if}<LSEP>[](symbol){damped}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){phi}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par.noopt}<LSEP>[argument 1; litteral](str){phi}<LEND>[argument 1; litteral](str){phi}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){phi}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){phi Problem!}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){phi}<LSEP>[litteral](NULL){NULL}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){optAlpha}<LEND>[call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){alpha}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){optBeta}<LEND>[call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){beta}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){optGamma}<LEND>[call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){gamma}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){optPhi}<LEND>[call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){phi}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){givenAlpha}<LSEP>[litteral](logical){FALSE}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){givenBeta}<LSEP>[litteral](logical){FALSE}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){givenGamma}<LSEP>[litteral](logical){FALSE}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){givenPhi}<LSEP>[litteral](logical){FALSE}<LEND>[statement 15; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par.noopt}<LSEP>[argument 1; litteral](str){alpha}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par.noopt}<LSEP>[argument 1; litteral](str){alpha}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){optAlpha}<LSEP>[litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){givenAlpha}<LSEP>[litteral](logical){TRUE}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par.noopt}<LSEP>[argument 1; litteral](str){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par.noopt}<LSEP>[argument 1; litteral](str){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){optBeta}<LSEP>[litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){givenBeta}<LSEP>[litteral](logical){TRUE}<LEND>[statement 17; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par.noopt}<LSEP>[argument 1; litteral](str){gamma}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par.noopt}<LSEP>[argument 1; litteral](str){gamma}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){optGamma}<LSEP>[litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){givenGamma}<LSEP>[litteral](logical){TRUE}<LEND>[statement 18; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par.noopt}<LSEP>[argument 1; litteral](str){phi}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par.noopt}<LSEP>[argument 1; litteral](str){phi}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){optPhi}<LSEP>[litteral](logical){FALSE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){givenPhi}<LSEP>[litteral](logical){TRUE}<LEND>[statement 19; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){damped}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){phi}<LSEP>[litteral](real){1.000000}<LEND>[statement 20; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta}<LSEP>[litteral](real){0.000000}<LEND>[statement 21; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma}<LSEP>[litteral](real){0.000000}<LEND>[statement 22; assign](){<-}<LSEP>[](symbol){env}<LEND>[call](){}<LSEP>[](symbol){new.env}<LEND>[statement 23; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){etsTargetFunctionInit}<LSEP>[](symbol){y}<LSEP>[](symbol){nstate}<LEND>[argument 2; call](){}<LSEP>[](symbol){switch}<LSEP>[](symbol){errortype}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){switch}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){2.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){switch}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){2.000000}<LEND>[](symbol){damped}<LSEP>[](symbol){lowerb}<LSEP>[](symbol){upperb}<LSEP>[](symbol){opt.crit}<LEND>[argument 9; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){nmse}<LEND>[](symbol){bounds}<LSEP>[](symbol){m}<LSEP>[](symbol){optAlpha}<LSEP>[](symbol){optBeta}<LSEP>[](symbol){optGamma}<LSEP>[](symbol){optPhi}<LSEP>[](symbol){givenAlpha}<LSEP>[](symbol){givenBeta}<LSEP>[](symbol){givenGamma}<LSEP>[](symbol){givenPhi}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){phi}<LSEP>[](symbol){env}<LSEP>[argument 25; litteral](str){forecast}<LEND>[](symbol){res}<LEND>[assign](){<-}<LSEP>[](symbol){initparam}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){phi}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){seasontype}<LSEP>[](symbol){damped}<LSEP>[](symbol){lower}<LSEP>[](symbol){upper}<LSEP>[](symbol){m}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){lower}<LSEP>[](symbol){upper}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Inconsistent parameter boundaries}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){alpha}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.200000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){m}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){alpha}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){alpha}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.002000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){par}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){alpha}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){par}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){N}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){alpha}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.100000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){beta}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){beta}<LSEP>[](symbol){alpha}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){alpha}<LSEP>[argument 1; litteral](real){0.001000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){par}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){par}<LSEP>[](symbol){beta}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){N}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){gamma}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){alpha}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){gamma}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.050000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){gamma}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){alpha}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){alpha}<LEND>[argument 1; litteral](real){0.001000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){par}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){par}<LSEP>[](symbol){gamma}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LSEP>[](symbol){damped}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){phi}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){phi}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.990000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){phi}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){phi}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){phi}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](real){0.001000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){par}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){par}<LSEP>[](symbol){phi}<LEND>[statement 5; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){par}<LEND>[assign](){<-}<LSEP>[](symbol){check.param}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){phi}<LSEP>[](symbol){lower}<LSEP>[](symbol){upper}<LSEP>[](symbol){bounds}<LSEP>[](symbol){m}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){bounds}<LSEP>[argument 1; litteral](str){admissible}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){alpha}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){beta}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){phi}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){gamma}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){bounds}<LSEP>[argument 1; litteral](str){usual}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){admissible}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){phi}<LSEP>[](symbol){m}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){initstate}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){seasontype}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){y}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){You've got to be joking (not e...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[](symbol){m}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fouriery}<LEND>[call](){}<LSEP>[](symbol){fourier}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){tslm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){trend}<LSEP>[](symbol){fouriery}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){A}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y.d}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){coefficients}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){coefficients}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y.d}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){coefficients}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){coefficients}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y.d}<LEND>[call](){}<LSEP>[](symbol){decompose}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){switch}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){additive}<LSEP>[argument 2; litteral](str){multiplicative}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){init.seas}<LEND>[call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){y.d}<LSEP>[](symbol){seasonal}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){m}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){init.seas}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){s}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 2; litteral](str){}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){A}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y.sa}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){y.d}<LSEP>[](symbol){seasonal}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){init.seas}<LEND>[call](){}<LSEP>[](symbol){pmax}<LSEP>[](symbol){init.seas}<LSEP>[argument 1; litteral](real){0.010000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){init.seas}<LEND>[](symbol){m}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){init.seas}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){init.seas}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){init.seas}<LSEP>[argument 1; litteral](real){0.010000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){y.sa}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){pmax}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){y.d}<LSEP>[](symbol){seasonal}<LEND>[argument 1; litteral](real){0.010000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){m}<LSEP>[litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){init.seas}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){y.sa}<LSEP>[](symbol){y}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){maxn}<LEND>[call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){m}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y.sa}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){l0}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y.sa}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){maxn}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){b0}<LSEP>[litteral](NULL){NULL}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){lsfit}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){maxn}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y.sa}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){maxn}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){A}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){l0}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){coefficients}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){b0}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){coefficients}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){l0}<LSEP>[](symbol){b0}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){l0}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){l0}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){0.001000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){b0}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){b0}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){0.001000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){l0}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){coefficients}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){coefficients}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){l0}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){l0}<LSEP>[litteral](real){0.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){b0}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){coefficients}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){coefficients}<LEND>[argument 1; litteral](real){2.000000}<LEND>[](symbol){l0}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){l0}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){l0}<LSEP>[](symbol){b0}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){b0}<LEND>[argument 1; litteral](real){10000000000.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){b0}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){sign}<LSEP>[](symbol){b0}<LEND>[argument 1; litteral](real){10000000000.000000}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){l0}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){b0}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){l0}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y.sa}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.001000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){b0}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y.sa}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y.sa}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.001000}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){l0}<LEND>[litteral](str){l}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){b0}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){b0}<LEND>[litteral](str){b}<LEND>[statement 5; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){l0}<LSEP>[](symbol){b0}<LSEP>[](symbol){init.seas}<LEND>[assign](){<-}<LSEP>[](symbol){lik}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){par}<LSEP>[](symbol){y}<LSEP>[](symbol){nstate}<LSEP>[](symbol){errortype}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){seasontype}<LSEP>[](symbol){damped}<LSEP>[](symbol){par.noopt}<LSEP>[](symbol){lowerb}<LSEP>[](symbol){upperb}<LSEP>[](symbol){opt.crit}<LSEP>[](symbol){nmse}<LSEP>[](symbol){bounds}<LSEP>[](symbol){m}<LSEP>[](symbol){pnames}<LSEP>[](symbol){pnames2}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){par}<LEND>[](symbol){pnames}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){par.noopt}<LEND>[](symbol){pnames2}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par.noopt}<LSEP>[argument 1; litteral](str){alpha}<LEND>[argument 1; litteral](str){alpha}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){alpha}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){alpha problem!}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par.noopt}<LSEP>[argument 1; litteral](str){beta}<LEND>[argument 1; litteral](str){beta}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){beta Problem!}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta}<LSEP>[litteral](NULL){NULL}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par.noopt}<LSEP>[argument 1; litteral](str){gamma}<LEND>[argument 1; litteral](str){gamma}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){gamma}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){gamma Problem!}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){m}<LSEP>[litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){gamma}<LSEP>[litteral](NULL){NULL}<LEND>[statement 6; control flow](){if}<LSEP>[](symbol){damped}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){phi}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LSEP>[argument 1; litteral](str){phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par.noopt}<LSEP>[argument 1; litteral](str){phi}<LEND>[argument 1; litteral](str){phi}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){phi}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){phi Problem!}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){phi}<LSEP>[litteral](NULL){NULL}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){check.param}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){phi}<LSEP>[](symbol){lowerb}<LSEP>[](symbol){upperb}<LSEP>[](symbol){bounds}<LSEP>[](symbol){m}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){inf}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){np}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){par}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){init.state}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){par}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){np}<LSEP>[](symbol){nstate}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){np}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){init.state}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){init.state}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){m}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){M}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){init.state}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){N}<LEND>[](symbol){nstate}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){M}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seas.states}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){init.state}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){N}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){seas.states}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){inf}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){pegelsresid.C}<LSEP>[](symbol){y}<LSEP>[](symbol){m}<LSEP>[](symbol){init.state}<LSEP>[](symbol){errortype}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){seasontype}<LSEP>[](symbol){damped}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){phi}<LSEP>[](symbol){nmse}<LEND>[statement 13; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){lik}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){inf}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){lik}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){10000000000.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){10000000000.000000}<LEND>[statement 15; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){opt.crit}<LSEP>[argument 1; litteral](str){lik}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){lik}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){opt.crit}<LSEP>[argument 1; litteral](str){mse}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){amse}<LEND>[argument 1; litteral](real){1.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){opt.crit}<LSEP>[argument 1; litteral](str){amse}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){amse}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){opt.crit}<LSEP>[argument 1; litteral](str){sigma}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){e}<LEND>[argument 1; litteral](real){2.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){opt.crit}<LSEP>[argument 1; litteral](str){mae}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){e}<LSEP>[](symbol){e}<LEND>[assign](){<-}<LSEP>[](symbol){print.ets}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){method}<LEND>[argument 1; litteral](str){\n\n}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){call}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Call:\n}<LEND>[argument 1; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){call}<LEND>[argument 2; litteral](str){\n\n}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){ncoef}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){initstate}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){ Box-Cox transformation: lambda=}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 2; litteral](str){\n\n}<LEND>[statement 4; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){ Smoothing parameters:\n}<LEND>[statement 5; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){ alpha =}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){par}<LEND>[argument 1; litteral](str){alpha}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 2; litteral](str){\n}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){ beta =}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){par}<LEND>[argument 1; litteral](str){beta}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 2; litteral](str){\n}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){ gamma =}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){par}<LEND>[argument 1; litteral](str){gamma}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 2; litteral](str){\n}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](str){FALSE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){ phi =}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){par}<LEND>[argument 1; litteral](str){phi}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 2; litteral](str){\n}<LEND>[statement 9; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n Initial states:\n}<LEND>[statement 10; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){ l =}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){initstate}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 2; litteral](str){\n}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){ b =}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){initstate}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 2; litteral](str){\n}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){initstate}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){initstate}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](logical){NA}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){initstate}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){ncoef}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ncoef}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){ncoef}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){ s = }<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){ncoef}<LSEP>[argument 1; litteral](real){8.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){initstate}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[](symbol){ncoef}<LEND>[argument 1; litteral](real){4.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){initstate}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[argument 1; litteral](real){8.000000}<LEND>[argument 1; litteral](real){4.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n }<LEND>[statement 2; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){initstate}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){9.000000}<LSEP>[](symbol){ncoef}<LEND>[argument 1; litteral](real){4.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n}<LEND>[statement 13; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n sigma: }<LEND>[statement 14; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){sigma2}<LEND>[argument 1; litteral](real){4.000000}<LEND>[statement 15; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){aic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){stats}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){aic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){aicc}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){bic}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){stats}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){AIC}<LSEP>[argument 1; litteral](str){AICc}<LSEP>[argument 2; litteral](str){BIC}<LEND>[statement 2; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n\n}<LEND>[statement 3; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){stats}<LEND>[assign](){<-}<LSEP>[](symbol){pegelsresid.C}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){m}<LSEP>[](symbol){init.state}<LSEP>[](symbol){errortype}<LSEP>[](symbol){trendtype}<LSEP>[](symbol){seasontype}<LSEP>[](symbol){damped}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){phi}<LSEP>[](symbol){nmse}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){init.state}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[](symbol){init.state}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){n}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){lik}<LSEP>[litteral](real){0.000000}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){damped}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){phi}<LSEP>[litteral](real){1.000000}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta}<LSEP>[litteral](real){0.000000}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma}<LSEP>[litteral](real){0.000000}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){amse}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){nmse}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){Cout}<LEND>[call](){}<LSEP>[](symbol){.C}<LSEP>[argument 0; litteral](str){etscalc}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.double}<LSEP>[](symbol){y}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){n}<LEND>[argument 3; call](){}<LSEP>[](symbol){as.double}<LSEP>[](symbol){x}<LEND>[argument 4; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){m}<LEND>[argument 5; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){switch}<LSEP>[](symbol){errortype}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 6; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){switch}<LSEP>[](symbol){trendtype}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){2.000000}<LEND>[argument 7; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){switch}<LSEP>[](symbol){seasontype}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){2.000000}<LEND>[argument 8; call](){}<LSEP>[](symbol){as.double}<LSEP>[](symbol){alpha}<LEND>[argument 9; call](){}<LSEP>[](symbol){as.double}<LSEP>[](symbol){beta}<LEND>[argument 10; call](){}<LSEP>[](symbol){as.double}<LSEP>[](symbol){gamma}<LEND>[argument 11; call](){}<LSEP>[](symbol){as.double}<LSEP>[](symbol){phi}<LEND>[argument 12; call](){}<LSEP>[](symbol){as.double}<LSEP>[](symbol){e}<LEND>[argument 13; call](){}<LSEP>[](symbol){as.double}<LSEP>[](symbol){lik}<LEND>[argument 14; call](){}<LSEP>[](symbol){as.double}<LSEP>[](symbol){amse}<LEND>[argument 15; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){nmse}<LEND>[argument 16; litteral](str){forecast}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){Cout}<LSEP>[argument 1; litteral](real){13.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){Cout}<LSEP>[argument 1; litteral](real){13.000000}<LEND>[argument 1; litteral](real){99999.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){Cout}<LSEP>[argument 1; litteral](real){13.000000}<LEND>[litteral](logical){NA}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){tsp.y}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){y}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){Cout}<LSEP>[argument 1; litteral](real){12.000000}<LEND>[statement 14; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){e}<LEND>[](symbol){tsp.y}<LEND>[statement 15; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){Cout}<LSEP>[argument 1; litteral](real){13.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){Cout}<LSEP>[argument 1; litteral](real){14.000000}<LEND>[](symbol){e}<LEND>[argument 3; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){Cout}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){p}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){admissible}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){phi}<LSEP>[](symbol){m}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){phi}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){phi}<LSEP>[litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){phi}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){gamma}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){phi}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){phi}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){alpha}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){beta}<LSEP>[litteral](real){0.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){phi}<LEND>[](symbol){alpha}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){phi}<LEND>[](symbol){alpha}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){m}<LEND>[](symbol){phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){phi}<LSEP>[](symbol){m}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){phi}<LEND>[](symbol){m}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){gamma}<LSEP>[](symbol){m}<LEND>[](symbol){alpha}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){P}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){alpha}<LEND>[](symbol){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LSEP>[](symbol){phi}<LEND>[](symbol){gamma}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LSEP>[](symbol){phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LEND>[](symbol){phi}<LEND>[argument 4; litteral](real){1.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){roots}<LEND>[call](){}<LSEP>[](symbol){polyroot}<LSEP>[](symbol){P}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){roots}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){plot.ets}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){x}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](str){N}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){states}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Decomposition by}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){method}<LEND>[argument 2; litteral](str){method}<LEND>[](symbol){...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){states}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){states}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){b}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Decomposition by}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){method}<LEND>[argument 2; litteral](str){method}<LEND>[](symbol){...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){components}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](str){N}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){states}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){states}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){s1}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Decomposition by}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){method}<LEND>[argument 2; litteral](str){method}<LEND>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){states}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){states}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){b}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){states}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){s1}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Decomposition by}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){method}<LEND>[argument 2; litteral](str){method}<LEND>[](symbol){...}<LEND>[assign](){<-}<LSEP>[](symbol){summary.ets}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){summary.ets}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[](symbol){object}<LEND>[assign](){<-}<LSEP>[](symbol){print.summary.ets}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){NextMethod}<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\nTraining set error measures:\n}<LEND>[statement 2; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){coef.ets}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){par}<LEND>[assign](){<-}<LSEP>[](symbol){fitted.ets}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){hfitted}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[argument 2; litteral](str){ets}<LSEP>[](symbol){...}<LEND>[assign](){<-}<LSEP>[](symbol){logLik.ets}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){loglik}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){par}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](str){logLik}<LEND>[assign](){<-}<LSEP>[](symbol){nobs.ets}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){is.ets}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){ets} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){fitPreviousTBATSModel}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){model}<LSEP>[](symbol){biasadj}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){seasonal.periods}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 1; litteral](logical){FALSE}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LEND>[call](){}<LSEP>[](symbol){sort}<LSEP>[](symbol){seasonal.periods}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){paramz}<LEND>[call](){}<LSEP>[](symbol){unParameteriseTBATS}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){parameters}<LEND>[](symbol){vect}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){parameters}<LEND>[](symbol){control}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){lambda}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){alpha}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){beta.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){beta}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){beta.v}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){adj.beta}<LSEP>[litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){adj.beta}<LSEP>[litteral](real){0.000000}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){small.phi}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){small.phi}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){gamma.one.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){gamma.one.v}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){gamma.two.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){gamma.two.v}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ar.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ar.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ar.coefs}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ar.coefs}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LSEP>[litteral](real){0.000000}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ma.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ma.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ma.coefs}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ma.coefs}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){q}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){q}<LSEP>[litteral](real){0.000000}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tau}<LEND>[call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){k.vector}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){gamma.bold}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){k.vector}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tau}<LEND>[call](){}<LSEP>[](symbol){as.integer}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){gamma.bold}<LSEP>[litteral](NULL){NULL}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){g}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){k.vector}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){adj.beta}<LEND>[](symbol){p}<LEND>[](symbol){q}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){g}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){adj.beta}<LEND>[](symbol){tau}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](real){1.000000}<LEND>[litteral](real){1.000000}<LEND>[statement 15; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){g}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){adj.beta}<LEND>[](symbol){tau}<LEND>[](symbol){p}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](real){1.000000}<LEND>[litteral](real){1.000000}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){y.touse}<LSEP>[](symbol){y}<LEND>[statement 17; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[argument 1; litteral](logical){FALSE}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y.touse}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){y}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){y.touse}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 18; assign](){<-}<LSEP>[](symbol){w}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){makeTBATSWMatrix}<LSEP>[](symbol){small.phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){k.vector}<LEND>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[](symbol){tau}<LSEP>[argument 5; litteral](str){forecast}<LEND>[statement 19; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){gamma.bold}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){.Call}<LSEP>[call name; litteral](str){updateTBATSGammaBold}<LSEP>[](symbol){gamma.bold}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){k.vector}<LEND>[](symbol){gamma.one.v}<LSEP>[](symbol){gamma.two.v}<LSEP>[argument 4; litteral](str){forecast}<LEND>[statement 20; call](){.Call}<LSEP>[call name; litteral](str){updateTBATSGMatrix}<LSEP>[](symbol){g}<LSEP>[](symbol){gamma.bold}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LSEP>[argument 4; litteral](str){forecast}<LEND>[statement 21; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){makeTBATSFMatrix}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){k.vector}<LEND>[](symbol){gamma.bold}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LEND>[statement 22; call](){.Call}<LSEP>[call name; litteral](str){updateFMatrix}<LSEP>[](symbol){F}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LSEP>[](symbol){gamma.bold}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[](symbol){tau}<LSEP>[argument 8; litteral](str){forecast}<LEND>[statement 23; assign](){<-}<LSEP>[](symbol){fitted.values.and.errors}<LEND>[call](){}<LSEP>[](symbol){calcModel}<LSEP>[](symbol){y.touse}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){seed.states}<LEND>[](symbol){F}<LSEP>[](symbol){g}<LSEP>[](symbol){w}<LEND>[statement 24; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fitted.values.and.errors}<LSEP>[](symbol){e}<LEND>[statement 25; assign](){<-}<LSEP>[](symbol){fitted.values}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fitted.values.and.errors}<LSEP>[](symbol){y.hat}<LEND>[statement 26; assign](){<-}<LSEP>[](symbol){variance}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){e}<LSEP>[](symbol){e}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[statement 27; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fitted.values}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){fitted.values}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){variance}<LEND>[statement 28; assign](){<-}<LSEP>[](symbol){model.for.output}<LSEP>[](symbol){model}<LEND>[statement 29; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model.for.output}<LSEP>[](symbol){variance}<LEND>[](symbol){variance}<LEND>[statement 30; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model.for.output}<LSEP>[](symbol){fitted.values}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){fitted.values}<LEND>[statement 31; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model.for.output}<LSEP>[](symbol){errors}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){e}<LEND>[statement 32; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model.for.output}<LSEP>[](symbol){fitted.values}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model.for.output}<LSEP>[](symbol){errors}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){y}<LEND>[statement 33; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model.for.output}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fitted.values.and.errors}<LSEP>[](symbol){x}<LEND>[statement 34; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model.for.output}<LSEP>[](symbol){y}<LEND>[](symbol){y}<LEND>[statement 35; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){model.for.output}<LEND>[assign](){<-}<LSEP>[](symbol){fitSpecificTBATS}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){use.box.cox}<LSEP>[](symbol){use.beta}<LSEP>[](symbol){use.damping}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){starting.params}<LSEP>[](symbol){x.nought}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[](symbol){init.box.cox}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LSEP>[](symbol){biasadj}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal.periods}<LEND>[call](){}<LSEP>[](symbol){sort}<LSEP>[](symbol){seasonal.periods}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){starting.params}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ar.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ar.coefs}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LSEP>[litteral](real){0.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ma.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ma.coefs}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){q}<LSEP>[litteral](real){0.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){alpha}<LSEP>[litteral](real){0.090000}<LEND>[statement 3; control flow](){if}<LSEP>[](symbol){use.beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){adj.beta}<LSEP>[litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta.v}<LSEP>[litteral](real){0.050000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){b}<LSEP>[litteral](real){0.000000}<LEND>[statement 3; control flow](){if}<LSEP>[](symbol){use.damping}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){small.phi}<LSEP>[litteral](real){0.999000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){small.phi}<LSEP>[litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){adj.beta}<LSEP>[litteral](real){0.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta.v}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){b}<LSEP>[litteral](NULL){NULL}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){small.phi}<LSEP>[litteral](NULL){NULL}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){use.damping}<LSEP>[litteral](logical){FALSE}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma.one.v}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){k.vector}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){gamma.two.v}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){k.vector}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){s.vector}<LEND>[call](){}<LSEP>[](symbol){numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){k.vector}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){k.vector}<LEND>[call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){k.vector}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma.one.v}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){gamma.two.v}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){s.vector}<LSEP>[litteral](NULL){NULL}<LEND>[statement 5; control flow](){if}<LSEP>[](symbol){use.box.cox}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){init.box.cox}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lambda}<LSEP>[](symbol){init.box.cox}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){BoxCox.lambda}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.500000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){y.transformed}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){y}<LSEP>[](symbol){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){y.transformed}<LSEP>[argument 1; litteral](str){lambda}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lambda}<LSEP>[litteral](NULL){NULL}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){paramz}<LEND>[call](){}<LSEP>[](symbol){unParameteriseTBATS}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){starting.params}<LSEP>[](symbol){vect}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){starting.params}<LSEP>[](symbol){control}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){alpha}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){beta.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){beta}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){beta.v}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){adj.beta}<LSEP>[litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){adj.beta}<LSEP>[litteral](real){0.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){b}<LSEP>[litteral](real){0.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){small.phi}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){small.phi}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){gamma.one.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){gamma.one.v}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){gamma.two.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){gamma.two.v}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){s.vector}<LEND>[call](){}<LSEP>[](symbol){numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){k.vector}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){s.vector}<LSEP>[litteral](NULL){NULL}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ar.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ar.coefs}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LSEP>[litteral](real){0.000000}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ma.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ma.coefs}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){q}<LSEP>[litteral](real){0.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){x.nought}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ar.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){d.vector}<LEND>[call](){}<LSEP>[](symbol){numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ar.coefs}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){d.vector}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){ma.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){epsilon.vector}<LEND>[call](){}<LSEP>[](symbol){numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){ma.coefs}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){epsilon.vector}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){x.nought}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){makeXMatrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){b}<LSEP>[](symbol){s.vector}<LSEP>[](symbol){d.vector}<LSEP>[](symbol){epsilon.vector}<LEND>[](symbol){x}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){param.vector}<LEND>[call](){}<LSEP>[](symbol){parameterise}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LSEP>[](symbol){small.phi}<LEND>[argument 3; call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){gamma.one.v}<LSEP>[](symbol){gamma.two.v}<LEND>[](symbol){lambda}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){par.scale}<LEND>[call](){}<LSEP>[](symbol){makeParscale}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){control}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tau}<LEND>[call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){k.vector}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tau}<LEND>[call](){}<LSEP>[](symbol){as.integer}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){w}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){makeTBATSWMatrix}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[](symbol){tau}<LSEP>[argument 5; litteral](str){forecast}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){seasonal.periods}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma.bold}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){k.vector}<LEND>[statement 1; call](){.Call}<LSEP>[call name; litteral](str){updateTBATSGammaBold}<LSEP>[](symbol){gamma.bold}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){gamma.one.v}<LSEP>[](symbol){gamma.two.v}<LSEP>[argument 4; litteral](str){forecast}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){gamma.bold}<LSEP>[litteral](NULL){NULL}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){g}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){k.vector}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){adj.beta}<LEND>[](symbol){p}<LEND>[](symbol){q}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){g}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){adj.beta}<LEND>[](symbol){tau}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](real){1.000000}<LEND>[litteral](real){1.000000}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){g}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){adj.beta}<LEND>[](symbol){tau}<LEND>[](symbol){p}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](real){1.000000}<LEND>[litteral](real){1.000000}<LEND>[statement 11; call](){.Call}<LSEP>[call name; litteral](str){updateTBATSGMatrix}<LSEP>[](symbol){g}<LSEP>[](symbol){gamma.bold}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LSEP>[argument 4; litteral](str){forecast}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){makeTBATSFMatrix}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){gamma.bold}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){D}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){F}<LEND>[argument 1; call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){g}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){w}<LSEP>[](symbol){w.transpose}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){opt.env}<LEND>[call](){}<LSEP>[](symbol){new.env}<LEND>[statement 15; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){F}<LSEP>[](symbol){F}<LSEP>[](symbol){opt.env}<LEND>[statement 16; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){w.transpose}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){w}<LSEP>[](symbol){w.transpose}<LEND>[](symbol){opt.env}<LEND>[statement 17; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){g}<LSEP>[](symbol){g}<LSEP>[](symbol){opt.env}<LEND>[statement 18; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){gamma.bold}<LSEP>[](symbol){gamma.bold}<LSEP>[](symbol){opt.env}<LEND>[statement 19; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){k.vector}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){opt.env}<LEND>[statement 20; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[](symbol){opt.env}<LEND>[statement 21; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){y.hat}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[](symbol){opt.env}<LEND>[statement 22; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){e}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[](symbol){opt.env}<LEND>[statement 23; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x.nought}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[](symbol){opt.env}<LEND>[statement 24; control flow](){if}<LSEP>[](symbol){use.box.cox}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y.transformed}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){y}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){y.transformed}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 2; call](){.Call}<LSEP>[call name; litteral](str){calcTBATSFaster}<LEND>[argument 0; call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){y.transformed}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y.transformed}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){y.hat}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){w.transpose}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){F}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){x}<LEND>[argument 5; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){g}<LEND>[argument 6; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){e}<LEND>[](symbol){x.nought}<LSEP>[argument 8; litteral](str){forecast}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){y.tilda}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){e}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){.Call}<LSEP>[call name; litteral](str){calcTBATSFaster}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){y.hat}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){w.transpose}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){F}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){x}<LEND>[argument 5; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){g}<LEND>[argument 6; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){e}<LEND>[](symbol){x.nought}<LSEP>[argument 8; litteral](str){forecast}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){y.tilda}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){e}<LEND>[statement 25; assign](){<-}<LSEP>[](symbol){w.tilda.transpose}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[argument 2; call](){}<LSEP>[](symbol){ncol}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){w}<LSEP>[](symbol){w.transpose}<LEND>[statement 26; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){w.tilda.transpose}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){w}<LSEP>[](symbol){w.transpose}<LEND>[statement 27; assign](){<-}<LSEP>[](symbol){w.tilda.transpose}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){calcWTilda}<LSEP>[](symbol){w.tilda.transpose}<LSEP>[](symbol){D}<LSEP>[argument 2; litteral](str){forecast}<LEND>[statement 28; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){end.cut}<LEND>[call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){w.tilda.transpose}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){start.cut}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){end.cut}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[](symbol){q}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){w.tilda.transpose}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){w.tilda.transpose}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){start.cut}<LSEP>[](symbol){end.cut}<LEND>[statement 29; assign](){<-}<LSEP>[](symbol){x.nought}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){y.tilda}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){w.tilda.transpose}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){coefficients}<LEND>[statement 30; assign](){<-}<LSEP>[](symbol){x.nought}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){x.nought}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x.nought}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 31; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){arma.seed.states}<LEND>[call](){}<LSEP>[](symbol){numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[](symbol){q}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){arma.seed.states}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){arma.seed.states}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){arma.seed.states}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){x.nought}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){x.nought}<LSEP>[](symbol){arma.seed.states}<LEND>[statement 32; control flow](){if}<LSEP>[](symbol){use.box.cox}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){x.nought.untransformed}<LEND>[argument 1; call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){x.nought}<LSEP>[](symbol){lambda}<LEND>[](symbol){opt.env}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){optim.like}<LEND>[call](){}<LSEP>[](symbol){optim}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){vect}<LEND>[](symbol){calcLikelihoodTBATS}<LSEP>[argument 2; litteral](str){Nelder-Mead}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){use.beta}<LSEP>[](symbol){use.damping}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){control}<LEND>[](symbol){p}<LSEP>[](symbol){q}<LSEP>[](symbol){tau}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LEND>[argument 13; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){100.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){vect}<LEND>[argument 1; litteral](real){2.000000}<LEND>[](symbol){par.scale}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){paramz}<LEND>[call](){}<LSEP>[](symbol){unParameteriseTBATS}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optim.like}<LSEP>[](symbol){par}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){control}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){lambda}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){alpha}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){beta.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){beta}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){small.phi}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){small.phi}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){gamma.one.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){gamma.one.v}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){gamma.two.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){gamma.two.v}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ar.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ar.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ar.coefs}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ar.coefs}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LSEP>[litteral](real){0.000000}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ma.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ma.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ma.coefs}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ma.coefs}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){q}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){q}<LSEP>[litteral](real){0.000000}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){x.nought}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){x.nought.untransformed}<LEND>[](symbol){lambda}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x.nought}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){w}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){makeTBATSWMatrix}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[](symbol){tau}<LSEP>[argument 5; litteral](str){forecast}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){gamma.bold}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){.Call}<LSEP>[call name; litteral](str){updateTBATSGammaBold}<LSEP>[](symbol){gamma.bold}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){gamma.one.v}<LSEP>[](symbol){gamma.two.v}<LSEP>[argument 4; litteral](str){forecast}<LEND>[statement 15; call](){.Call}<LSEP>[call name; litteral](str){updateTBATSGMatrix}<LSEP>[](symbol){g}<LSEP>[](symbol){gamma.bold}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LSEP>[argument 4; litteral](str){forecast}<LEND>[statement 16; call](){.Call}<LSEP>[call name; litteral](str){updateFMatrix}<LSEP>[](symbol){F}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LSEP>[](symbol){gamma.bold}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[](symbol){tau}<LSEP>[argument 8; litteral](str){forecast}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){y.transformed}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){y}<LSEP>[](symbol){lambda}<LEND>[statement 18; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){y.transformed}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){fitted.values.and.errors}<LEND>[call](){}<LSEP>[](symbol){calcModel}<LSEP>[](symbol){y.transformed}<LSEP>[](symbol){x.nought}<LSEP>[](symbol){F}<LSEP>[](symbol){g}<LSEP>[](symbol){w}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fitted.values.and.errors}<LSEP>[](symbol){e}<LEND>[statement 21; assign](){<-}<LSEP>[](symbol){variance}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){e}<LSEP>[](symbol){e}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[statement 22; assign](){<-}<LSEP>[](symbol){fitted.values}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fitted.values.and.errors}<LSEP>[](symbol){y.hat}<LEND>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){variance}<LEND>[statement 23; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](str){biasadj}<LEND>[](symbol){biasadj}<LEND>[statement 24; assign](){<-}<LSEP>[](symbol){ee}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){y}<LSEP>[](symbol){fitted.values}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){vect}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){optim.like}<LEND>[call](){}<LSEP>[](symbol){optim}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){vect}<LEND>[](symbol){calcLikelihoodNOTransformedTBATS}<LSEP>[argument 2; litteral](str){Nelder-Mead}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){x.nought}<LSEP>[](symbol){use.beta}<LSEP>[](symbol){use.damping}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 8; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){control}<LEND>[](symbol){p}<LSEP>[](symbol){q}<LSEP>[](symbol){tau}<LEND>[argument 12; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){100.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){vect}<LEND>[argument 1; litteral](real){2.000000}<LEND>[](symbol){par.scale}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){optim.like}<LEND>[call](){}<LSEP>[](symbol){optim}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){vect}<LEND>[](symbol){calcLikelihoodNOTransformedTBATS}<LSEP>[argument 2; litteral](str){BFGS}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){x.nought}<LSEP>[](symbol){use.beta}<LSEP>[](symbol){use.damping}<LSEP>[](symbol){seasonal.periods}<LEND>[argument 8; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){control}<LEND>[](symbol){p}<LSEP>[](symbol){q}<LSEP>[](symbol){tau}<LEND>[argument 12; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){par.scale}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){paramz}<LEND>[call](){}<LSEP>[](symbol){unParameteriseTBATS}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optim.like}<LSEP>[](symbol){par}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){control}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){lambda}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){alpha}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){beta.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){beta}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){small.phi}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){small.phi}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){gamma.one.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){gamma.one.v}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){gamma.two.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){gamma.two.v}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ar.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ar.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ar.coefs}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ar.coefs}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LSEP>[litteral](real){0.000000}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ma.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ma.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ma.coefs}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ma.coefs}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){q}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){q}<LSEP>[litteral](real){0.000000}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){w}<LEND>[call](){.Call}<LSEP>[call name; litteral](str){makeTBATSWMatrix}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[](symbol){tau}<LSEP>[argument 5; litteral](str){forecast}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){gamma.bold}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){.Call}<LSEP>[call name; litteral](str){updateTBATSGammaBold}<LSEP>[](symbol){gamma.bold}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){gamma.one.v}<LSEP>[](symbol){gamma.two.v}<LSEP>[argument 4; litteral](str){forecast}<LEND>[statement 12; call](){.Call}<LSEP>[call name; litteral](str){updateTBATSGMatrix}<LSEP>[](symbol){g}<LSEP>[](symbol){gamma.bold}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LSEP>[argument 4; litteral](str){forecast}<LEND>[statement 13; call](){.Call}<LSEP>[call name; litteral](str){updateFMatrix}<LSEP>[](symbol){F}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LSEP>[](symbol){gamma.bold}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[](symbol){tau}<LSEP>[argument 8; litteral](str){forecast}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){fitted.values.and.errors}<LEND>[call](){}<LSEP>[](symbol){calcModel}<LSEP>[](symbol){y}<LSEP>[](symbol){x.nought}<LSEP>[](symbol){F}<LSEP>[](symbol){g}<LSEP>[](symbol){w}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fitted.values.and.errors}<LSEP>[](symbol){e}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){fitted.values}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fitted.values.and.errors}<LSEP>[](symbol){y.hat}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){variance}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){e}<LSEP>[](symbol){e}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[statement 33; assign](){<-}<LSEP>[](symbol){likelihood}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optim.like}<LSEP>[](symbol){value}<LEND>[statement 34; assign](){<-}<LSEP>[](symbol){aic}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){likelihood}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){vect}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){x.nought}<LEND>[statement 35; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){fitted.values}<LEND>[statement 36; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){e}<LEND>[statement 37; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){fits}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){y}<LEND>[statement 38; assign](){<-}<LSEP>[](symbol){model.for.output}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){lambda}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){gamma.one.v}<LSEP>[](symbol){gamma.two.v}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[](symbol){likelihood}<LEND>[argument 9; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optim.like}<LSEP>[](symbol){convergence}<LEND>[](symbol){variance}<LSEP>[](symbol){aic}<LEND>[argument 12; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optim.like}<LSEP>[](symbol){par}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){control}<LEND>[](symbol){x.nought}<LSEP>[](symbol){fits}<LSEP>[](symbol){e}<LEND>[argument 16; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fitted.values.and.errors}<LSEP>[](symbol){x}<LEND>[](symbol){seasonal.periods}<LSEP>[](symbol){k.vector}<LSEP>[](symbol){y}<LSEP>[](symbol){p}<LSEP>[](symbol){q}<LEND>[statement 39; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){model.for.output}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){tbats}<LSEP>[argument 1; litteral](str){bats}<LEND>[statement 40; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){model.for.output}<LEND>[assign](){<-}<LSEP>[](symbol){calcLikelihoodTBATS}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){use.beta}<LSEP>[](symbol){use.small.phi}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){param.control}<LSEP>[](symbol){p}<LSEP>[](symbol){q}<LSEP>[](symbol){tau}<LSEP>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){paramz}<LEND>[call](){}<LSEP>[](symbol){unParameteriseTBATS}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){param.control}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){box.cox.parameter}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){alpha}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){beta.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){beta}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){small.phi}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){small.phi}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){gamma.one.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){gamma.one.v}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){gamma.two.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){gamma.two.v}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){ar.coefs}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ar.coefs}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){ma.coefs}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ma.coefs}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ar.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ar.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ar.coefs}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ar.coefs}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LSEP>[litteral](real){0.000000}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ma.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ma.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ma.coefs}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ma.coefs}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){q}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){q}<LSEP>[litteral](real){0.000000}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){x.nought}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){x.nought.untransformed}<LEND>[](symbol){box.cox.parameter}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x.nought}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 13; call](){.Call}<LSEP>[call name; litteral](str){updateWtransposeMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){w.transpose}<LEND>[](symbol){small.phi}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){tau}<LEND>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LEND>[argument 5; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){p}<LEND>[argument 6; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){q}<LEND>[argument 7; litteral](str){forecast}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){gamma.bold}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){.Call}<LSEP>[call name; litteral](str){updateTBATSGammaBold}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){gamma.bold}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){k.vector}<LEND>[](symbol){gamma.one.v}<LSEP>[](symbol){gamma.two.v}<LEND>[statement 15; call](){.Call}<LSEP>[call name; litteral](str){updateTBATSGMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){g}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){gamma.bold}<LEND>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LSEP>[argument 4; litteral](str){forecast}<LEND>[statement 16; call](){.Call}<LSEP>[call name; litteral](str){updateFMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){F}<LEND>[](symbol){small.phi}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){gamma.bold}<LEND>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[](symbol){tau}<LSEP>[argument 8; litteral](str){forecast}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){mat.transformed.y}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){y}<LEND>[](symbol){box.cox.parameter}<LEND>[statement 18; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){mat.transformed.y}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){ncol}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){y}<LEND>[statement 20; call](){.Call}<LSEP>[call name; litteral](str){calcTBATSFaster}<LSEP>[](symbol){mat.transformed.y}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){y.hat}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){w.transpose}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){F}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){x}<LEND>[argument 5; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){g}<LEND>[argument 6; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){e}<LEND>[](symbol){x.nought}<LSEP>[argument 8; litteral](str){forecast}<LEND>[statement 21; assign](){<-}<LSEP>[](symbol){log.likelihood}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){e}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){box.cox.parameter}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){y}<LEND>[statement 22; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){log.likelihood}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){inf}<LEND>[statement 23; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){D}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){F}<LEND>[argument 1; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){g}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){w.transpose}<LEND>[](symbol){opt.env}<LEND>[statement 24; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){checkAdmissibility}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){box.cox.parameter}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LEND>[argument 5; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){seasonal.periods}<LEND>[](symbol){bc.lower}<LSEP>[](symbol){bc.upper}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){log.likelihood}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){inf}<LEND>[assign](){<-}<LSEP>[](symbol){calcLikelihoodNOTransformedTBATS}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){x.nought}<LSEP>[](symbol){use.beta}<LSEP>[](symbol){use.small.phi}<LSEP>[](symbol){seasonal.periods}<LSEP>[](symbol){param.control}<LSEP>[](symbol){p}<LSEP>[](symbol){q}<LSEP>[](symbol){tau}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){paramz}<LEND>[call](){}<LSEP>[](symbol){unParameteriseTBATS}<LSEP>[](symbol){param.vector}<LSEP>[](symbol){param.control}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){box.cox.parameter}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){alpha}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){beta.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){beta}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){small.phi}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){small.phi}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){gamma.one.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){gamma.one.v}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){gamma.two.v}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){gamma.two.v}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ar.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ar.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ar.coefs}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ar.coefs}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ar.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LSEP>[litteral](real){0.000000}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ma.coefs}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ma.coefs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ma.coefs}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){paramz}<LSEP>[](symbol){ma.coefs}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){q}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ma.coefs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){q}<LSEP>[litteral](real){0.000000}<LEND>[statement 9; call](){.Call}<LSEP>[call name; litteral](str){updateWtransposeMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){w.transpose}<LEND>[](symbol){small.phi}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){tau}<LEND>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LEND>[argument 5; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){p}<LEND>[argument 6; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){q}<LEND>[argument 7; litteral](str){forecast}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){gamma.bold}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){.Call}<LSEP>[call name; litteral](str){updateTBATSGammaBold}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){gamma.bold}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){k.vector}<LEND>[](symbol){gamma.one.v}<LSEP>[](symbol){gamma.two.v}<LEND>[statement 11; call](){.Call}<LSEP>[call name; litteral](str){updateTBATSGMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){g}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){gamma.bold}<LEND>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LSEP>[argument 4; litteral](str){forecast}<LEND>[statement 12; call](){.Call}<LSEP>[call name; litteral](str){updateFMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){F}<LEND>[](symbol){small.phi}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta.v}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){gamma.bold}<LEND>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[](symbol){tau}<LSEP>[argument 8; litteral](str){forecast}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){ncol}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){y}<LEND>[statement 14; call](){.Call}<LSEP>[call name; litteral](str){calcTBATSFaster}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){y.hat}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){w.transpose}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){F}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){x}<LEND>[argument 5; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){g}<LEND>[argument 6; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){e}<LEND>[](symbol){x.nought}<LSEP>[argument 8; litteral](str){forecast}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){log.likelihood}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){e}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){e}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){log.likelihood}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){inf}<LEND>[statement 17; call](){}<LSEP>[](symbol){assign}<LSEP>[argument 0; litteral](str){D}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){F}<LEND>[argument 1; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){g}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){opt.env}<LSEP>[](symbol){w.transpose}<LEND>[](symbol){opt.env}<LEND>[statement 18; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){checkAdmissibility}<LSEP>[](symbol){opt.env}<LSEP>[argument 1; litteral](NULL){NULL}<LSEP>[](symbol){small.phi}<LSEP>[](symbol){ar.coefs}<LSEP>[](symbol){ma.coefs}<LSEP>[](symbol){tau}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){log.likelihood}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){inf} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){na.interp}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LSEP>[](symbol){linear}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){missng}<LEND>[call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){missng}<LEND>[argument 1; litteral](integer){0}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){origx}<LSEP>[](symbol){x}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){rangex}<LEND>[call](){}<LSEP>[](symbol){range}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){drangex}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){rangex}<LSEP>[argument 1; litteral](integer){2}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){rangex}<LSEP>[argument 1; litteral](integer){1}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){x}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){The time series is not univari...}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){tt}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){idx}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tt}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){missng}<LEND>[statement 13; control flow](){if}<LSEP>[](symbol){linear}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){approx}<LSEP>[](symbol){idx}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){idx}<LEND>[](symbol){tt}<LSEP>[argument 3; litteral](real){2.000000}<LEND>[](symbol){y}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){msts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){K}<LEND>[call](){}<LSEP>[](symbol){pmin}<LEND>[argument 0; call](){}<LSEP>[](symbol){trunc}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){x}<LEND>[](symbol){msts}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](integer){20}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){K}<LEND>[call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){trunc}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){freq}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){5.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){X}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){fourier}<LSEP>[](symbol){x}<LSEP>[](symbol){K}<LEND>[argument 1; call](){}<LSEP>[](symbol){poly}<LSEP>[](symbol){tt}<LEND>[argument 1; call](){}<LSEP>[](symbol){pmin}<LEND>[argument 0; call](){}<LSEP>[](symbol){pmax}<LEND>[argument 0; call](){}<LSEP>[](symbol){trunc}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](integer){6}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){x}<LSEP>[](symbol){X}<LEND>[](symbol){na.exclude}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){X}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){missng}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pred}<LSEP>[](symbol){missng}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){mstl}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){sa}<LEND>[call](){}<LSEP>[](symbol){seasadj}<LSEP>[](symbol){fit}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){sa}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){approx}<LSEP>[](symbol){idx}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sa}<LSEP>[](symbol){idx}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[argument 3; litteral](real){2.000000}<LEND>[](symbol){y}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){seas}<LEND>[call](){}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){fit}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){seas}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seas}<LEND>[call](){}<LSEP>[](symbol){rowSums}<LSEP>[](symbol){seas}<LEND>[statement 10; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){missng}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sa}<LSEP>[](symbol){missng}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){seas}<LSEP>[](symbol){missng}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 15; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[](symbol){tspx}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){linear}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){rangex}<LSEP>[argument 1; litteral](integer){2}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.500000}<LSEP>[](symbol){drangex}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){rangex}<LSEP>[argument 1; litteral](integer){1}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.500000}<LSEP>[](symbol){drangex}<LEND>[true branch; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){na.interp}<LSEP>[](symbol){origx}<LSEP>[](symbol){lambda}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[false branch; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){tsclean}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){replace.missing}<LSEP>[](symbol){iterate}<LSEP>[](symbol){lambda}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){outliers}<LEND>[call](){}<LSEP>[](symbol){tsoutliers}<LSEP>[](symbol){x}<LSEP>[](symbol){iterate}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){outliers}<LSEP>[](symbol){index}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){outliers}<LSEP>[](symbol){replacements}<LEND>[statement 2; control flow](){if}<LSEP>[](symbol){replace.missing}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){na.interp}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 3; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){tsoutliers}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){iterate}<LSEP>[](symbol){lambda}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){missng}<LEND>[call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){nmiss}<LEND>[call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){missng}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){nmiss}<LSEP>[argument 1; litteral](integer){0}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){na.interp}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LSEP>[](symbol){x}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.constant}<LSEP>[](symbol){xx}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){integer}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){numeric}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){xx}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){xx}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){freq}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){freq}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){mstl}<LSEP>[](symbol){xx}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){rem}<LEND>[call](){}<LSEP>[](symbol){remainder}<LSEP>[](symbol){fit}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){detrend}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){trendcycle}<LSEP>[](symbol){fit}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){strength}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){var}<LSEP>[](symbol){rem}<LEND>[argument 1; call](){}<LSEP>[](symbol){var}<LSEP>[](symbol){detrend}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>=}<LSEP>[](symbol){strength}<LSEP>[argument 1; litteral](real){0.600000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){seasadj}<LSEP>[](symbol){fit}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){tt}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){mod}<LEND>[call](){}<LSEP>[](symbol){supsmu}<LSEP>[](symbol){tt}<LSEP>[](symbol){xx}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){resid}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){mod}<LSEP>[](symbol){y}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){nmiss}<LSEP>[argument 1; litteral](integer){0}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){resid}<LSEP>[](symbol){missng}<LEND>[litteral](logical){NA}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){resid.q}<LEND>[call](){}<LSEP>[](symbol){quantile}<LSEP>[](symbol){resid}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.250000}<LSEP>[argument 1; litteral](real){0.750000}<LEND>[argument 2; litteral](logical){TRUE}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){iqr}<LEND>[call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){resid.q}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){limits}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){resid.q}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[](symbol){iqr}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 15; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){limits}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){limits}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){outliers}<LEND>[call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){resid}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){limits}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){resid}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){limits}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){outliers}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[statement 16; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){outliers}<LEND>[litteral](logical){NA}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){na.interp}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 18; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){iterate}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tmp}<LEND>[call](){}<LSEP>[](symbol){tsoutliers}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){lambda}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){index}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){outliers}<LEND>[call](){}<LSEP>[](symbol){sort}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){outliers}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){index}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){outliers}<LEND>[litteral](logical){NA}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){1}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[false branch; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){na.interp}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 19; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){outliers}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){outliers} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){seasonal}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){mstl}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){cols}<LEND>[call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){Season}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){object}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){object}<LSEP>[](symbol){}<LSEP>[](symbol){cols}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){stl}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){time.series}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){seasonal}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){decomposed.ts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){seasonal}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){tbats}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){comp}<LEND>[call](){}<LSEP>[](symbol){tbats.components}<LSEP>[](symbol){object}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){scols}<LEND>[call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){season}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){comp}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){season}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){rowSums}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){comp}<LSEP>[](symbol){}<LSEP>[](symbol){scols}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){season}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){season}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){season}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){comp}<LEND>[statement 5; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){season}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){seas}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){data}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){seasonal}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Unknown object type}<LEND>[assign](){<-}<LSEP>[](symbol){trendcycle}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){mstl}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){object}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](str){Trend}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){stl}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){time.series}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){trend}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){decomposed.ts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){trend}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){seas}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){seasextract_w_na_action}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](str){trend}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Unknown object type}<LEND>[assign](){<-}<LSEP>[](symbol){remainder}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){mstl}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){object}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](str){Remainder}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){stl}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){time.series}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){remainder}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){decomposed.ts}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){random}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){seas}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){seasextract_w_na_action}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](str){irregular}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Unknown object type}<LEND>[assign](){<-}<LSEP>[](symbol){seasextract_w_na_action}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){name}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){data}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){z}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){data}<LEND>[](symbol){}<LSEP>[](symbol){name}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){na.action}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){na.action}<LEND>[argument 1; litteral](str){class}<LEND>[argument 1; litteral](str){exclude}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){z}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){napredict}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){na.action}<LEND>[](symbol){z}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){z}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){x}<LEND>[](symbol){z} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){WhichModels}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){max.p}<LSEP>[](symbol){max.q}<LSEP>[](symbol){max.P}<LSEP>[](symbol){max.Q}<LSEP>[](symbol){maxK}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){total.models}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){max.p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){max.q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){max.P}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){max.Q}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){maxK}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){total.models}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){i}<LSEP>[litteral](real){1.000000}<LEND>[statement 3; control flow](){for}<LSEP>[](symbol){x1}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){max.p}<LEND>[body; control flow](){for}<LSEP>[](symbol){x2}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){max.q}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){x3}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){max.P}<LEND>[body; control flow](){for}<LSEP>[](symbol){x4}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){max.Q}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){K}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){maxK}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){x1}<LSEP>[argument 1; litteral](str){f}<LSEP>[](symbol){x2}<LSEP>[argument 3; litteral](str){f}<LSEP>[](symbol){x3}<LSEP>[argument 5; litteral](str){f}<LSEP>[](symbol){x4}<LSEP>[argument 7; litteral](str){f}<LSEP>[](symbol){K}<LSEP>[argument 9; litteral](str){}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 4; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){UndoWhichModels}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){n}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){unlist}<LEND>[argument 0; call](){}<LSEP>[](symbol){strsplit}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](str){f} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){dshw}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){period1}<LSEP>[](symbol){period2}<LSEP>[](symbol){h}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){omega}<LSEP>[](symbol){phi}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){armethod}<LSEP>[](symbol){model}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){dshw not suitable when data co...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){seriesname}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){model}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){method}<LEND>[argument 1; litteral](str){DSHW}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){period1}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){period1}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){period2}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){period2}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](str){msts}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](str){msts}<LEND>[argument 1; litteral](real){2.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){period1}<LEND>[call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){sort}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](str){msts}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){period2}<LEND>[call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){sort}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](str){msts}<LEND>[argument 1; litteral](real){2.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){period1}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){period2}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Error in dshw(): y must either...}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){period1}<LSEP>[](symbol){period2}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tmp}<LSEP>[](symbol){period2}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){period2}<LSEP>[](symbol){period1}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){period1}<LSEP>[](symbol){tmp}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](str){msts}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){msts}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){period1}<LSEP>[](symbol){period2}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){period2}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Insufficient data to estimate ...}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){armethod}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){phi}<LSEP>[litteral](real){0.000000}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){period1}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){period1}<LSEP>[](symbol){period2}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Inappropriate periods}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){ratio}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){period2}<LSEP>[](symbol){period1}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){ratio}<LEND>[argument 1; call](){}<LSEP>[](symbol){trunc}<LSEP>[](symbol){ratio}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Seasonal periods are not nested}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){model}<LEND>[](symbol){lambda}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){origy}<LSEP>[](symbol){y}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){y}<LSEP>[](symbol){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){pars}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){model}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pars}<LSEP>[](symbol){alpha}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){beta}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pars}<LSEP>[](symbol){beta}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){gamma}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pars}<LSEP>[](symbol){gamma}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){omega}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pars}<LSEP>[](symbol){omega}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){phi}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pars}<LSEP>[](symbol){phi}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){pars}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){alpha}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pars}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){alpha}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){beta}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pars}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){beta}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){gamma}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pars}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[](symbol){gamma}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){omega}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pars}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[](symbol){omega}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){phi}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pars}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[](symbol){phi}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){pars}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){pars}<LEND>[call](){}<LSEP>[](symbol){par_dshw}<LSEP>[](symbol){y}<LSEP>[](symbol){period1}<LSEP>[](symbol){period2}<LSEP>[](symbol){pars}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pars}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){beta}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pars}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){gamma}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pars}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){omega}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pars}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){phi}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pars}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){yhat}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){n}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){I}<LEND>[call](){}<LSEP>[](symbol){seasindex}<LSEP>[](symbol){y}<LSEP>[](symbol){period1}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){wstart}<LEND>[call](){}<LSEP>[](symbol){seasindex}<LSEP>[](symbol){y}<LSEP>[](symbol){period2}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){wstart}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){wstart}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){I}<LSEP>[](symbol){ratio}<LEND>[statement 18; assign](){<-}<LSEP>[](symbol){w}<LSEP>[](symbol){wstart}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){diff}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){period2}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){t}<LEND>[assign](){<-}<LSEP>[](symbol){t.start}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){period2}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){period2}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){period2}<LEND>[](symbol){period2}<LEND>[](symbol){x}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 21; assign](){<-}<LSEP>[](symbol){s}<LEND>[assign](){<-}<LSEP>[](symbol){s.start}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){period2}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){period2}<LSEP>[argument 1; litteral](real){0.500000}<LEND>[](symbol){t}<LEND>[statement 22; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){yhat}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){s}<LSEP>[](symbol){t}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){I}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){w}<LSEP>[](symbol){i}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){snew}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){I}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){w}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){s}<LSEP>[](symbol){t}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){tnew}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){snew}<LSEP>[](symbol){s}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){beta}<LEND>[](symbol){t}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){I}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[](symbol){period1}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){snew}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){w}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){gamma}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){I}<LSEP>[](symbol){i}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){w}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[](symbol){period2}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){omega}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){snew}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){I}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){omega}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){w}<LSEP>[](symbol){i}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){s}<LSEP>[](symbol){snew}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){t}<LSEP>[](symbol){tnew}<LEND>[statement 23; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){s}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[](symbol){t}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){I}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){period1}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){h}<LSEP>[](symbol){period1}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){w}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){period2}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){h}<LSEP>[](symbol){period2}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[statement 24; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){msts}<LSEP>[](symbol){fcast}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){period1}<LSEP>[](symbol){period2}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](real){3.000000}<LEND>[statement 25; assign](){<-}<LSEP>[](symbol){yhat}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){yhat}<LEND>[statement 26; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){yhat}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){y}<LEND>[statement 27; assign](){<-}<LSEP>[](symbol){yhat}<LEND>[call](){}<LSEP>[](symbol){msts}<LSEP>[](symbol){yhat}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){period1}<LSEP>[](symbol){period2}<LEND>[statement 28; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){y}<LSEP>[](symbol){yhat}<LEND>[statement 29; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){msts}<LSEP>[](symbol){e}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){period1}<LSEP>[](symbol){period2}<LEND>[statement 30; control flow](){if}<LSEP>[](symbol){armethod}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){yhat}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){yhat}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){e}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){fcast}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){e}<LSEP>[](symbol){n}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){y}<LSEP>[](symbol){yhat}<LEND>[statement 31; assign](){<-}<LSEP>[](symbol){mse}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){e}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 32; assign](){<-}<LSEP>[](symbol){mape}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){e}<LEND>[](symbol){y}<LEND>[argument 1; litteral](real){100.000000}<LEND>[statement 33; assign](){<-}<LSEP>[](symbol){end.y}<LEND>[call](){}<LSEP>[](symbol){end}<LSEP>[](symbol){y}<LEND>[statement 34; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){end.y}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){y}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){end.y}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){end.y}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){end.y}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){end.y}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){end.y}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 35; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){msts}<LSEP>[](symbol){fcast}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){period1}<LSEP>[](symbol){period2}<LEND>[statement 36; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LSEP>[](symbol){origy}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){fcast}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[argument 3; call](){}<LSEP>[](symbol){var}<LSEP>[](symbol){e}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](str){biasadj}<LEND>[](symbol){biasadj}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){yhat}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){yhat}<LSEP>[](symbol){lambda}<LEND>[statement 37; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){fcast}<LSEP>[argument 1; litteral](str){DSHW}<LSEP>[](symbol){y}<LSEP>[](symbol){e}<LSEP>[](symbol){yhat}<LSEP>[](symbol){seriesname}<LEND>[argument 6; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){mape}<LSEP>[](symbol){mse}<LSEP>[](symbol){alpha}<LSEP>[](symbol){beta}<LSEP>[](symbol){gamma}<LSEP>[](symbol){omega}<LSEP>[](symbol){phi}<LSEP>[](symbol){lambda}<LSEP>[](symbol){s.start}<LSEP>[](symbol){t.start}<LSEP>[](symbol){wstart}<LSEP>[](symbol){I}<LEND>[](symbol){period1}<LSEP>[](symbol){period2}<LEND>[argument 1; litteral](str){forecast}<LEND>[assign](){<-}<LSEP>[](symbol){par_dshw}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){period1}<LSEP>[](symbol){period2}<LSEP>[](symbol){pars}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){start}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.100000}<LSEP>[argument 1; litteral](real){0.010000}<LSEP>[argument 2; litteral](real){0.001000}<LSEP>[argument 3; litteral](real){0.001000}<LSEP>[argument 4; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){pars}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){optim}<LSEP>[](symbol){start}<LSEP>[](symbol){dshw.mse}<LSEP>[](symbol){y}<LSEP>[](symbol){period1}<LSEP>[](symbol){period2}<LSEP>[](symbol){pars}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pars}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){pars}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){par}<LEND>[statement 3; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){pars}<LEND>[assign](){<-}<LSEP>[](symbol){dshw.mse}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){par}<LSEP>[](symbol){y}<LSEP>[](symbol){period1}<LSEP>[](symbol){period2}<LSEP>[](symbol){pars}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pars}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){pars}<LEND>[](symbol){par}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){pars}<LEND>[argument 1; litteral](real){0.990000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){pars}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pars}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[argument 1; litteral](real){0.900000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){inf}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){dshw}<LSEP>[](symbol){y}<LSEP>[](symbol){period1}<LSEP>[](symbol){period2}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pars}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 5; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pars}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 6; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pars}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 7; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pars}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 8; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pars}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[argument 9; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pars}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){model}<LEND>[](symbol){mse}<LEND>[assign](){<-}<LSEP>[](symbol){seasindex}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){p}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){n2}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){p}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){shorty}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n2}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){average}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){n}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){simplema}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){zoo}<LSEP>[](symbol){rollmean.default}<LEND>[](symbol){shorty}<LSEP>[](symbol){p}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){%%}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){centeredma}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){zoo}<LSEP>[](symbol){rollmean.default}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){simplema}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n2}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){average}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){shorty}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){centeredma}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){si}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){average}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){p}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){average}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){shorty}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){simplema}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){si}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){average}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[](symbol){p}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){si} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){tsdisplay}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){plot.type}<LSEP>[](symbol){points}<LSEP>[](symbol){ci.type}<LSEP>[](symbol){lag.max}<LSEP>[](symbol){na.action}<LSEP>[](symbol){main}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){pch}<LSEP>[](symbol){cex}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){plot.type}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){plot.type}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ci.type}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){ci.type}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){def.par}<LEND>[call](){}<LSEP>[](symbol){par}<LSEP>[argument 0; litteral](logical){TRUE}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){nf}<LEND>[call](){}<LSEP>[](symbol){layout}<LEND>[argument 0; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){3.000000}<LEND>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){main}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){main}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){x}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.ts}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){x}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){lag.max}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lag.max}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){log10}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){3.000000}<LEND>[statement 7; call](){}<LSEP>[](symbol){plot.ts}<LSEP>[](symbol){x}<LSEP>[](symbol){main}<LSEP>[](symbol){ylab}<LSEP>[](symbol){xlab}<LEND>[argument 4; call](){}<LSEP>[](symbol){range}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[](symbol){...}<LEND>[statement 8; control flow](){if}<LSEP>[](symbol){points}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){points}<LSEP>[](symbol){x}<LSEP>[](symbol){pch}<LSEP>[](symbol){cex}<LSEP>[](symbol){...}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){ylim}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){junk1}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){acf}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){x}<LEND>[](symbol){lag.max}<LSEP>[argument 2; litteral](logical){FALSE}<LSEP>[](symbol){na.action}<LEND>[statement 11; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){junk1}<LSEP>[](symbol){acf}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[litteral](real){0.000000}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){ci.type}<LSEP>[argument 1; litteral](str){ma}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ylim}<LEND>[call](){}<LSEP>[](symbol){range}<LSEP>[](symbol){ylim}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.660000}<LSEP>[](symbol){ylim}<LEND>[argument 1; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){cumsum}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){junk1}<LSEP>[](symbol){acf}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){ylim}<LEND>[call](){}<LSEP>[](symbol){range}<LSEP>[](symbol){ylim}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){junk1}<LSEP>[](symbol){acf}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){plot.type}<LSEP>[argument 1; litteral](str){partial}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){junk2}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){pacf}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){x}<LEND>[](symbol){lag.max}<LSEP>[argument 2; litteral](logical){FALSE}<LSEP>[](symbol){na.action}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ylim}<LEND>[call](){}<LSEP>[](symbol){range}<LSEP>[](symbol){ylim}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){junk2}<LSEP>[](symbol){acf}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){oldpar}<LEND>[call](){}<LSEP>[](symbol){par}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){5.000000}<LSEP>[argument 1; litteral](real){4.100000}<LSEP>[argument 2; litteral](real){1.500000}<LSEP>[argument 3; litteral](real){2.000000}<LEND>[statement 16; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){junk1}<LSEP>[](symbol){ylim}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){lag.max}<LEND>[argument 3; litteral](str){ACF}<LSEP>[argument 4; litteral](str){}<LSEP>[](symbol){ci.type}<LSEP>[](symbol){...}<LEND>[statement 17; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){plot.type}<LSEP>[argument 1; litteral](str){scatter}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 1; call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){n}<LEND>[argument 2; call](){}<LSEP>[](symbol){expression}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Y}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){t}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){expression}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Y}<LSEP>[](symbol){t}<LEND>[](symbol){...}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){plot.type}<LSEP>[argument 1; litteral](str){spectrum}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){spec.ar}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){}<LSEP>[](symbol){na.action}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){plot.type}<LSEP>[argument 1; litteral](str){histogram}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){graphics}<LSEP>[](symbol){hist}<LEND>[](symbol){x}<LSEP>[argument 1; litteral](str){FD}<LSEP>[argument 2; litteral](str){}<LSEP>[](symbol){main}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){junk2}<LSEP>[](symbol){ylim}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){lag.max}<LEND>[argument 3; litteral](str){PACF}<LSEP>[argument 4; litteral](str){}<LSEP>[](symbol){...}<LEND>[statement 18; call](){}<LSEP>[](symbol){par}<LSEP>[](symbol){def.par}<LEND>[statement 19; call](){}<LSEP>[](symbol){layout}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 20; call](){}<LSEP>[](symbol){invisible}<LEND>[assign](){<-}<LSEP>[](symbol){seasonplot}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){s}<LSEP>[](symbol){season.labels}<LSEP>[](symbol){year.labels}<LSEP>[](symbol){year.labels.left}<LSEP>[](symbol){type}<LSEP>[](symbol){main}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){col}<LSEP>[](symbol){labelgap}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){main}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){main}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Seasonal plot:}<LEND>[argument 1; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){x}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){s}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){s}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Data are not seasonal}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){s}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){tsx}<LSEP>[](symbol){x}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){startperiod}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){cycle}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){startperiod}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){startperiod}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){x}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){s}<LEND>[argument 1; call](){}<LSEP>[](symbol){%%}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[](symbol){s}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){Season}<LEND>[call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){s}<LEND>[argument 1; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[](symbol){s}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){xnew}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 11; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xnew}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){Season}<LEND>[](symbol){x}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){12.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){labs}<LSEP>[](symbol){month.abb}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xLab}<LSEP>[litteral](str){Month}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){labs}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Q}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 2; litteral](str){}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xLab}<LSEP>[litteral](str){Quarter}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){7.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){labs}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Sun}<LSEP>[argument 1; litteral](str){Mon}<LSEP>[argument 2; litteral](str){Tue}<LSEP>[argument 3; litteral](str){Wed}<LSEP>[argument 4; litteral](str){Thu}<LSEP>[argument 5; litteral](str){Fri}<LSEP>[argument 6; litteral](str){Sat}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xLab}<LSEP>[litteral](str){Day}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){52.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){labs}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){s}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xLab}<LSEP>[litteral](str){Week}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){24.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){labs}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xLab}<LSEP>[litteral](str){Hour}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){48.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){labs}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){23.500000}<LSEP>[argument 2; litteral](real){0.500000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xLab}<LSEP>[litteral](str){Half-hour}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){20.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){labs}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){s}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){labs}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xLab}<LSEP>[litteral](str){Season}<LEND>[statement 13; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xlab}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xlab}<LSEP>[](symbol){xLab}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){season.labels}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){season.labels}<LSEP>[](symbol){labs}<LEND>[statement 15; control flow](){if}<LSEP>[](symbol){year.labels}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xlim}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){labelgap}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){0.400000}<LEND>[](symbol){labelgap}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xlim}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){labelgap}<LEND>[](symbol){s}<LEND>[statement 16; control flow](){if}<LSEP>[](symbol){year.labels.left}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xlim}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.400000}<LSEP>[](symbol){labelgap}<LEND>[statement 17; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){Season}<LSEP>[](symbol){xnew}<LSEP>[argument 2; litteral](str){n}<LSEP>[](symbol){xlab}<LSEP>[](symbol){type}<LSEP>[](symbol){ylab}<LSEP>[](symbol){main}<LSEP>[](symbol){xlim}<LSEP>[argument 8; litteral](real){0.000000}<LSEP>[](symbol){...}<LEND>[statement 18; assign](){<-}<LSEP>[](symbol){nn}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){Season}<LEND>[](symbol){s}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){col}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){col}<LSEP>[](symbol){nn}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nn}<LEND>[statement 20; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){nn}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[body; call](){}<LSEP>[](symbol){lines}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Season}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xnew}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){type}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){col}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){...}<LEND>[statement 21; control flow](){if}<LSEP>[](symbol){year.labels}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){idx}<LEND>[call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Season}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){xnew}<LEND>[](symbol){s}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){year}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){tsx}<LEND>[](symbol){idx}<LEND>[argument 1; call](){}<LSEP>[](symbol){nchar}<LSEP>[](symbol){s}<LEND>[statement 2; call](){}<LSEP>[](symbol){text}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){s}<LSEP>[](symbol){labelgap}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){year}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsx}<LSEP>[](symbol){idx}<LEND>[argument 2; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){trunc}<LSEP>[](symbol){year}<LEND>[argument 3; litteral](real){0.000000}<LSEP>[](symbol){...}<LEND>[argument 5; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){col}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){idx}<LEND>[statement 22; control flow](){if}<LSEP>[](symbol){year.labels.left}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){idx}<LEND>[call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Season}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){xnew}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){year}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){tsx}<LEND>[](symbol){idx}<LEND>[argument 1; call](){}<LSEP>[](symbol){nchar}<LSEP>[](symbol){s}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){idx}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){col}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){col}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){text}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){labelgap}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){year}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tsx}<LSEP>[](symbol){idx}<LEND>[argument 2; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){trunc}<LSEP>[](symbol){year}<LEND>[argument 3; litteral](real){1.000000}<LSEP>[](symbol){...}<LEND>[argument 5; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){col}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){idx}<LEND>[statement 23; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){labs}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){axis}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){axis}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){season.labels}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){s}<LEND>[](symbol){...} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){na.ends}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){nonmiss}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){nonmiss}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){No non-missing data}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){nonmiss}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){nonmiss}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){nonmiss}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){j}<LSEP>[](symbol){k}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){tspx}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){j}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 7; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){undo.na.ends}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){y}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){nonmiss}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){nonmiss}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){nonmiss}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){nonmiss}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){j}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){j}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){y}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){k}<LSEP>[](symbol){n}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[](symbol){k}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){tspx}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 8; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){y}<LEND>[assign](){<-}<LSEP>[](symbol){unfracdiff}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){y}<LSEP>[](symbol){n}<LSEP>[](symbol){h}<LSEP>[](symbol){d}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bin.c}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){n}<LSEP>[](symbol){h}<LEND>[argument 1; call](){}<LSEP>[](symbol){choose}<LSEP>[](symbol){d}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){n}<LSEP>[](symbol){h}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){b}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){n}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){xnew}<LEND>[assign](){<-}<LSEP>[](symbol){LHS}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){h}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){RHS}<LEND>[call](){}<LSEP>[](symbol){cumsum}<LSEP>[](symbol){y}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){bs}<LEND>[call](){}<LSEP>[](symbol){cumsum}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){bin.c}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){b}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){bin.c}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xnew}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){RHS}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){b}<LEND>[argument 1; call](){}<LSEP>[](symbol){rev}<LSEP>[](symbol){x}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){h}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){b}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){b}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){bin.c}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[](symbol){k}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){RHS}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){RHS}<LSEP>[](symbol){k}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){b}<LEND>[argument 1; call](){}<LSEP>[](symbol){rev}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){LHS}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xnew}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){bs}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){k}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xnew}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){RHS}<LSEP>[](symbol){k}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){LHS}<LSEP>[](symbol){k}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){tspx}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 10; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){xnew}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[assign](){<-}<LSEP>[](symbol){arfima}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){drange}<LSEP>[](symbol){estim}<LSEP>[](symbol){model}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){estim}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){estim}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){seriesname}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){orig.x}<LSEP>[](symbol){x}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LSEP>[](symbol){model}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){residuals}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){lambda}<LEND>[litteral](NULL){NULL}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){lambda}<LEND>[](symbol){lambda}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){na.ends}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){meanx}<LEND>[call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){xx}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){xx}<LSEP>[](symbol){meanx}<LEND>[statement 3; call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){fracdiff}<LSEP>[](symbol){fracdiff}<LEND>[](symbol){xx}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){drange}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){d}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){d}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){fracdiff}<LSEP>[](symbol){diffseries}<LEND>[](symbol){xx}<LSEP>[](symbol){d}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){auto.arima}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.000000}<LSEP>[argument 3; litteral](logical){TRUE}<LSEP>[](symbol){...}<LEND>[statement 7; call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){fracdiff}<LSEP>[](symbol){fracdiff}<LEND>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){2.000000}<LEND>[](symbol){drange}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){estim}<LSEP>[argument 1; litteral](str){mle}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){fracdiff}<LSEP>[](symbol){diffseries}<LEND>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){d}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ar}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ma}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){fit2}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[](symbol){q}<LEND>[argument 2; litteral](logical){FALSE}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){fit2}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit2}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[](symbol){q}<LEND>[argument 2; litteral](logical){FALSE}<LSEP>[argument 3; litteral](str){ML}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){try-error}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){fit2}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ar}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){coef}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ma}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){coef}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){q}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){residuals}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit2}<LSEP>[](symbol){residuals}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){MLE estimation failed. Returni...}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){x}<LEND>[](symbol){orig.x}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){residuals}<LEND>[call](){}<LSEP>[](symbol){undo.na.ends}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){fit}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){residuals}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){fitted}<LEND>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[argument 3; call](){}<LSEP>[](symbol){var}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){residuals}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](str){biasadj}<LEND>[](symbol){biasadj}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){lambda}<LEND>[](symbol){lambda}<LEND>[statement 10; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 11; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){series}<LEND>[](symbol){seriesname}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){ARFIMA}<LSEP>[argument 1; litteral](str){fracdiff}<LEND>[statement 13; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fit}<LEND>[assign](){<-}<LSEP>[](symbol){forecast.fracdiff}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){object}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Unable to find original time s...}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){na.ends}<LSEP>[](symbol){x}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){xx}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){meanx}<LEND>[call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){xx}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){xx}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){xx}<LSEP>[](symbol){meanx}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){fracdiff}<LSEP>[](symbol){diffseries}<LEND>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){d}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ar}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ma}<LEND>[argument 2; litteral](logical){FALSE}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ar}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ma}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){fcast.y}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){fit}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){fcast.x}<LEND>[call](){}<LSEP>[](symbol){unfracdiff}<LSEP>[](symbol){xx}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast.y}<LSEP>[](symbol){mean}<LEND>[](symbol){n}<LSEP>[](symbol){h}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){d}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){bin.c}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){n}<LSEP>[](symbol){h}<LEND>[argument 1; call](){}<LSEP>[](symbol){choose}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){d}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){n}<LSEP>[](symbol){h}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){phi}<LEND>[assign](){<-}<LSEP>[](symbol){theta}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){h}<LEND>[statement 15; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){coef}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){q}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){theta}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){q}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){coef}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){q}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){new.phi}<LEND>[assign](){<-}<LSEP>[](symbol){psi}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){h}<LEND>[statement 18; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){psi}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){new.phi}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[litteral](real){1.000000}<LEND>[statement 19; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){new.phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){h}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){bin.c}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){h}<LEND>[statement 1; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){h}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){new.phi}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){bin.c}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){bin.c}<LSEP>[](symbol){i}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){psi}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){new.phi}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){psi}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){theta}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){fse}<LEND>[call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){cumsum}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){psi}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){sigma2}<LEND>[statement 21; control flow](){if}<LSEP>[](symbol){fan}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){51.000000}<LSEP>[argument 1; litteral](real){99.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){100.000000}<LSEP>[](symbol){level}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){99.990000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Confidence limit out of range}<LEND>[statement 22; assign](){<-}<LSEP>[](symbol){nint}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){level}<LEND>[statement 23; assign](){<-}<LSEP>[](symbol){upper}<LEND>[assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){nint}<LSEP>[](symbol){h}<LEND>[statement 24; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nint}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){qq}<LEND>[call](){}<LSEP>[](symbol){qnorm}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){level}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){100.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){fcast.x}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){qq}<LSEP>[](symbol){fse}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){fcast.x}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){qq}<LSEP>[](symbol){fse}<LEND>[statement 25; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){lower}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](str){%}<LSEP>[argument 2; litteral](str){}<LEND>[statement 26; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){undo.na.ends}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){fit}<LEND>[statement 27; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){x}<LSEP>[](symbol){res}<LEND>[statement 28; assign](){<-}<LSEP>[](symbol){data.tsp}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 29; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){data.tsp}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){data.tsp}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 2; litteral](real){1.000000}<LEND>[statement 30; assign](){<-}<LSEP>[](symbol){mean.fcast}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){fcast.x}<LSEP>[](symbol){meanx}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.tsp}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.tsp}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.tsp}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 31; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){lower}<LSEP>[](symbol){meanx}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.tsp}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.tsp}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.tsp}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 32; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){upper}<LSEP>[](symbol){meanx}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.tsp}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.tsp}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.tsp}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 33; assign](){<-}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){ARFIMA(}<LSEP>[](symbol){p}<LSEP>[argument 2; litteral](str){,}<LEND>[argument 3; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){d}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 4; litteral](str){,}<LSEP>[](symbol){q}<LSEP>[argument 6; litteral](str){)}<LSEP>[argument 7; litteral](str){}<LEND>[statement 34; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){fits}<LSEP>[](symbol){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){mean.fcast}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){mean.fcast}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[argument 3; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){level}<LSEP>[](symbol){upper}<LSEP>[](symbol){lower}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){lower}<LSEP>[](symbol){lambda}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){upper}<LSEP>[](symbol){lambda}<LEND>[statement 35; assign](){<-}<LSEP>[](symbol){seriesname}<LEND>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){call}<LEND>[](symbol){x}<LEND>[statement 36; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){x}<LSEP>[](symbol){mean.fcast}<LSEP>[](symbol){upper}<LSEP>[](symbol){lower}<LSEP>[](symbol){level}<LSEP>[](symbol){method}<LSEP>[](symbol){object}<LSEP>[](symbol){seriesname}<LSEP>[](symbol){res}<LSEP>[](symbol){fits}<LEND>[argument 1; litteral](str){forecast}<LEND>[assign](){<-}<LSEP>[](symbol){fitted.ARFIMA}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){hfitted}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[argument 2; litteral](str){arfima}<LSEP>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){h-step fits are not supported ...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){object}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){object} |
[](){expression}<LSEP>[litteral](str){gas}<LSEP>[litteral](str){gold}<LSEP>[litteral](str){taylor}<LSEP>[litteral](str){wineind}<LSEP>[litteral](str){woolyrnq} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){search.arima}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){d}<LSEP>[](symbol){D}<LSEP>[](symbol){max.p}<LSEP>[](symbol){max.q}<LSEP>[](symbol){max.P}<LSEP>[](symbol){max.Q}<LSEP>[](symbol){max.order}<LSEP>[](symbol){stationary}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[](symbol){approximation}<LSEP>[](symbol){xreg}<LSEP>[](symbol){offset}<LSEP>[](symbol){allowdrift}<LSEP>[](symbol){allowmean}<LSEP>[](symbol){parallel}<LSEP>[](symbol){num.cores}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ic}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){ic}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){allowdrift}<LEND>[call](){}<LSEP>[](symbol){&}<LSEP>[](symbol){allowdrift}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){d}<LSEP>[](symbol){D}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){allowmean}<LEND>[call](){}<LSEP>[](symbol){&}<LSEP>[](symbol){allowmean}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){d}<LSEP>[](symbol){D}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){maxK}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){|}<LSEP>[](symbol){allowdrift}<LSEP>[](symbol){allowmean}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){parallel}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){best.ic}<LSEP>[litteral](real){inf}<LEND>[statement 1; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){max.p}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){max.q}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){I}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){max.P}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){J}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){max.Q}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[](symbol){j}<LEND>[](symbol){I}<LEND>[](symbol){J}<LEND>[](symbol){max.order}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){K}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){maxK}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){i}<LSEP>[](symbol){d}<LSEP>[](symbol){j}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){I}<LSEP>[](symbol){D}<LSEP>[](symbol){J}<LEND>[argument 3; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){K}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){trace}<LSEP>[](symbol){ic}<LSEP>[](symbol){approximation}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[](symbol){best.ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){best.ic}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){ic}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){fit}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){constant}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){K}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){parallel}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){to.check}<LEND>[call](){}<LSEP>[](symbol){WhichModels}<LSEP>[](symbol){max.p}<LSEP>[](symbol){max.q}<LSEP>[](symbol){max.P}<LSEP>[](symbol){max.Q}<LSEP>[](symbol){maxK}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){par.all.arima}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){l}<LSEP>[](symbol){max.order}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){.tmp}<LEND>[call](){}<LSEP>[](symbol){UndoWhichModels}<LSEP>[](symbol){l}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){.tmp}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){.tmp}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){I}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){.tmp}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){J}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){.tmp}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){K}<LEND>[call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){.tmp}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[](symbol){j}<LEND>[](symbol){I}<LEND>[](symbol){J}<LEND>[](symbol){max.order}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){i}<LSEP>[](symbol){d}<LSEP>[](symbol){j}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){I}<LSEP>[](symbol){D}<LSEP>[](symbol){J}<LEND>[argument 3; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){K}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){trace}<LSEP>[](symbol){ic}<LSEP>[](symbol){approximation}<LSEP>[](symbol){offset}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){exists}<LSEP>[argument 0; litteral](str){fit}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){fit}<LSEP>[](symbol){K}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](NULL){NULL}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){num.cores}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){num.cores}<LEND>[call](){}<LSEP>[](symbol){detectCores}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){all.models}<LEND>[call](){}<LSEP>[](symbol){mclapply}<LSEP>[](symbol){to.check}<LSEP>[](symbol){par.all.arima}<LSEP>[](symbol){max.order}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){all.models}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){all.models}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){all.models}<LSEP>[](symbol){is.null}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){best.ic}<LSEP>[litteral](real){inf}<LEND>[statement 6; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){all.models}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){all.models}<LSEP>[](symbol){i}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){all.models}<LSEP>[](symbol){i}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[](symbol){ic}<LEND>[](symbol){best.ic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){all.models}<LSEP>[](symbol){i}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){best.ic}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){constant}<LEND>[call](){}<LSEP>[](symbol){unlist}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){all.models}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){bestfit}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){forecast_ARIMA}<LSEP>[argument 1; litteral](str){ARIMA}<LSEP>[argument 2; litteral](str){Arima}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){exists}<LSEP>[argument 0; litteral](str){bestfit}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){approximation}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){trace}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n\n Now re-fitting the best m...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){newbestfit}<LEND>[call](){}<LSEP>[](symbol){myarima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){6.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[argument 1; litteral](real){7.000000}<LSEP>[argument 2; litteral](real){4.000000}<LEND>[](symbol){constant}<LSEP>[](symbol){ic}<LSEP>[argument 5; litteral](logical){FALSE}<LSEP>[argument 6; litteral](logical){FALSE}<LSEP>[](symbol){xreg}<LSEP>[](symbol){...}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){newbestfit}<LSEP>[](symbol){ic}<LEND>[argument 1; litteral](real){inf}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LEND>[call](){}<LSEP>[](symbol){search.arima}<LSEP>[](symbol){x}<LSEP>[](symbol){d}<LSEP>[](symbol){D}<LSEP>[](symbol){max.p}<LSEP>[](symbol){max.q}<LSEP>[](symbol){max.P}<LSEP>[](symbol){max.Q}<LSEP>[](symbol){max.order}<LSEP>[](symbol){stationary}<LSEP>[](symbol){ic}<LSEP>[](symbol){trace}<LSEP>[argument 11; litteral](logical){FALSE}<LSEP>[](symbol){xreg}<LSEP>[](symbol){offset}<LSEP>[](symbol){allowdrift}<LSEP>[](symbol){allowmean}<LSEP>[](symbol){parallel}<LSEP>[](symbol){num.cores}<LSEP>[](symbol){...}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[call](){}<LSEP>[](symbol){switch}<LSEP>[](symbol){ic}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){bic}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){aic}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){aicc}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){newbestfit}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){No ARIMA model able to be esti...}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){x}<LEND>[](symbol){x}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){x}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){ic}<LEND>[litteral](NULL){NULL}<LEND>[statement 10; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestfit}<LSEP>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 11; control flow](){if}<LSEP>[](symbol){trace}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n\n}<LEND>[statement 12; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){bestfit}<LEND>[assign](){<-}<LSEP>[](symbol){SeasDummy}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Non-seasonal data}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){tt}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fmat}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){n}<LEND>[argument 2; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){m}<LEND>[statement 5; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){m}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fmat}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[](symbol){i}<LEND>[](symbol){tt}<LEND>[](symbol){m}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fmat}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){cos}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){pi}<LEND>[](symbol){i}<LEND>[](symbol){tt}<LEND>[](symbol){m}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fmat}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){SD.test}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){wts}<LSEP>[](symbol){s}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){wts}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Series contains missing values...}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Not seasonal data}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){t0}<LEND>[call](){}<LSEP>[](symbol){start}<LSEP>[](symbol){wts}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){N}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){wts}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){N}<LSEP>[](symbol){s}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Insufficient data}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){frec}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){ltrunc}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){s}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){N}<LSEP>[argument 1; litteral](real){100.000000}<LEND>[argument 1; litteral](real){0.250000}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){R1}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){SeasDummy}<LSEP>[](symbol){wts}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){lmch}<LEND>[call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){wts}<LSEP>[](symbol){R1}<LEND>[](symbol){na.exclude}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){Fhat}<LEND>[assign](){<-}<LSEP>[](symbol){Fhataux}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){N}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 10; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[body; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Fhataux}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){R1}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){lmch}<LEND>[statement 11; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){N}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){n}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[body; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Fhat}<LSEP>[](symbol){i}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Fhataux}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){i}<LEND>[](symbol){n}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){wnw}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){ltrunc}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){ltrunc}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){Ne}<LEND>[call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){Fhataux}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){Omnw}<LSEP>[litteral](real){0.000000}<LEND>[statement 15; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){ltrunc}<LEND>[body; assign](){<-}<LSEP>[](symbol){Omnw}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Omnw}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){Fhataux}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){Ne}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Fhataux}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){Ne}<LSEP>[](symbol){k}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){wnw}<LSEP>[](symbol){k}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){Omfhat}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){crossprod}<LSEP>[](symbol){Fhataux}<LEND>[](symbol){Omnw}<LEND>[argument 1; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){Omnw}<LEND>[](symbol){Ne}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){sq}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](real){2.000000}<LEND>[statement 18; assign](){<-}<LSEP>[](symbol){frecob}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 19; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){frec}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){frec}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){frecob}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sq}<LSEP>[](symbol){i}<LEND>[litteral](real){1.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){frec}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){frecob}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sq}<LSEP>[](symbol){i}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){frecob}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sq}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](real){1.000000}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){a}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){frecob}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 21; assign](){<-}<LSEP>[](symbol){A}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){a}<LEND>[statement 22; assign](){<-}<LSEP>[](symbol){j}<LSEP>[litteral](real){1.000000}<LEND>[statement 23; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){s}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){frecob}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){A}<LSEP>[](symbol){i}<LSEP>[](symbol){j}<LEND>[litteral](real){1.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){frecob}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; assign](){<-}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){j}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; assign](){<-}<LSEP>[](symbol){j}<LSEP>[](symbol){j}<LEND>[statement 24; assign](){<-}<LSEP>[](symbol){tmp}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){A}<LEND>[](symbol){Omfhat}<LEND>[](symbol){A}<LEND>[statement 25; assign](){<-}<LSEP>[](symbol){problems}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){svd}<LSEP>[](symbol){tmp}<LEND>[](symbol){d}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){.Machine}<LSEP>[](symbol){double.eps}<LEND>[statement 26; control flow](){if}<LSEP>[](symbol){problems}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){stL}<LSEP>[litteral](real){0.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){stL}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){N}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){diag}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){solve}<LSEP>[](symbol){tmp}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){A}<LEND>[argument 1; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){Fhat}<LEND>[](symbol){Fhat}<LEND>[](symbol){A}<LEND>[statement 27; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){stL}<LEND>[assign](){<-}<LSEP>[](symbol){forecast.Arima}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){xreg}<LSEP>[](symbol){lambda}<LSEP>[](symbol){bootstrap}<LSEP>[](symbol){npaths}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){all.args}<LEND>[call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){formals}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){user.args}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){match.call}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](integer){1}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){check}<LEND>[call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){user.args}<LSEP>[](symbol){all.args}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LSEP>[](symbol){check}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){error.args}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){user.args}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){check}<LEND>[statement 1; call](){}<LSEP>[](symbol){warning}<LEND>[argument 0; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){The non-existent %s arguments ...}<LSEP>[](symbol){error.args}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){use.drift}<LEND>[call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){drift}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coef}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){object}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){usexreg}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){|}<LSEP>[](symbol){use.drift}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){object}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[](symbol){usexreg}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.numeric}<LSEP>[](symbol){xreg}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){xreg should be a numeric matri...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){xreg}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){xreg}<LEND>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){xreg}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; litteral](str){xreg}<LEND>[false branch; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){xreg}<LEND>[argument 2; litteral](str){}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){origxreg}<LEND>[assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){xreg}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){h}<LEND>[call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){xreg}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){xreg not required by this mode...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xreg}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){origxreg}<LSEP>[litteral](NULL){NULL}<LEND>[statement 8; control flow](){if}<LSEP>[](symbol){fan}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){51.000000}<LSEP>[argument 1; litteral](real){99.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){100.000000}<LSEP>[](symbol){level}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){99.990000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Confidence limit out of range}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){sort}<LSEP>[](symbol){level}<LEND>[statement 10; control flow](){if}<LSEP>[](symbol){use.drift}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){colnames<-}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[](symbol){n}<LEND>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){make.unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){drift}<LEND>[argument 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](str){}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){xreg}<LEND>[false branch; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){xreg}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){colnames<-}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){h}<LEND>[](symbol){n}<LEND>[argument 1; litteral](str){drift}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){constant}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){constant}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){h}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){h}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Strange value of object$constant}<LEND>[false branch; control flow](){if}<LSEP>[](symbol){usexreg}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){No regressors provided}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){call}<LEND>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){getxreg}<LSEP>[](symbol){object}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){call}<LEND>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Number of regressors does not ...}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){call}<LEND>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){xreg contains different column...}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){xreg}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LEND>[statement 12; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){nx}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){nx}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){se}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){x}<LEND>[](symbol){nx}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){start.f}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[](symbol){start.f}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){se}<LEND>[call](){}<LSEP>[](symbol){ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){se}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[](symbol){start.f}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){nint}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){level}<LEND>[statement 14; control flow](){if}<LSEP>[](symbol){bootstrap}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){sim}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){npaths}<LSEP>[](symbol){h}<LEND>[statement 1; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){npaths}<LEND>[body; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sim}<LSEP>[](symbol){i}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){simulate}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[argument 2; litteral](logical){TRUE}<LSEP>[](symbol){origxreg}<LSEP>[](symbol){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){sim}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){quantile}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](real){200.000000}<LEND>[argument 4; litteral](real){8.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){sim}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){quantile}<LEND>[argument 3; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](real){200.000000}<LEND>[argument 4; litteral](real){8.000000}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){nint}<LSEP>[argument 1; litteral](integer){1}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){lower}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){upper}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){lower}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){upper}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){nint}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){pred}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){upper}<LSEP>[](symbol){lower}<LEND>[statement 2; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nint}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){qq}<LEND>[call](){}<LSEP>[](symbol){qnorm}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){level}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){100.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){qq}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){se}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){qq}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){se}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.finite}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){upper}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){Upper prediction intervals are...}<LEND>[statement 15; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){lower}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](str){%}<LSEP>[argument 2; litteral](str){}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){lower}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){upper}<LEND>[statement 18; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){lower}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){pred}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){arima.string}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){seriesname}<LEND>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){series}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){call}<LEND>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){call}<LEND>[](symbol){x}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){call}<LEND>[](symbol){y}<LEND>[statement 21; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){fitted.Arima}<LSEP>[](symbol){object}<LEND>[statement 22; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){constant}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){pred}<LEND>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[argument 3; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){se}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){bootstrap}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){lower}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){upper}<LSEP>[](symbol){lambda}<LEND>[statement 23; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){method}<LSEP>[](symbol){object}<LSEP>[](symbol){level}<LEND>[argument 3; call](){}<LSEP>[](symbol){future_msts}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){pred}<LEND>[argument 4; call](){}<LSEP>[](symbol){future_msts}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[argument 5; call](){}<LSEP>[](symbol){future_msts}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[](symbol){x}<LSEP>[](symbol){seriesname}<LEND>[argument 8; call](){}<LSEP>[](symbol){copy_msts}<LSEP>[](symbol){x}<LSEP>[](symbol){fits}<LEND>[argument 9; call](){}<LSEP>[](symbol){copy_msts}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){residuals.Arima}<LSEP>[](symbol){object}<LEND>[argument 1; litteral](str){forecast}<LEND>[assign](){<-}<LSEP>[](symbol){forecast.forecast_ARIMA}<LSEP>[](symbol){forecast.Arima}<LEND>[assign](){<-}<LSEP>[](symbol){forecast.ar}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){lambda}<LSEP>[](symbol){bootstrap}<LSEP>[](symbol){npaths}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){object}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){object}<LSEP>[](symbol){x}<LSEP>[](symbol){h}<LEND>[statement 2; control flow](){if}<LSEP>[](symbol){bootstrap}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){sim}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){npaths}<LSEP>[](symbol){h}<LEND>[statement 1; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){npaths}<LEND>[body; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sim}<LSEP>[](symbol){i}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){simulate}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){se}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){sim}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){sd}<LEND>[statement 3; control flow](){if}<LSEP>[](symbol){fan}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){51.000000}<LSEP>[argument 1; litteral](real){99.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){level}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){100.000000}<LSEP>[](symbol){level}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){level}<LEND>[argument 1; litteral](real){99.990000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Confidence limit out of range}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){nint}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){level}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){nint}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){pred}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){upper}<LSEP>[](symbol){lower}<LEND>[statement 7; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nint}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){qq}<LEND>[call](){}<LSEP>[](symbol){qnorm}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){level}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){100.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lower}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){qq}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){se}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){upper}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){qq}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){se}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){lower}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){level}<LSEP>[argument 1; litteral](str){%}<LSEP>[argument 2; litteral](str){}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){AR(}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){order}<LEND>[argument 2; litteral](str){)}<LSEP>[argument 3; litteral](str){}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){f}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){residuals.ar}<LSEP>[](symbol){object}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){fitted.ar}<LSEP>[](symbol){object}<LEND>[statement 13; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){pred}<LEND>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LEND>[argument 3; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){level}<LSEP>[](symbol){upper}<LSEP>[](symbol){lower}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lower}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){lower}<LSEP>[](symbol){lambda}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){upper}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){upper}<LSEP>[](symbol){lambda}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){fits}<LSEP>[](symbol){lambda}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 14; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){method}<LSEP>[](symbol){object}<LSEP>[](symbol){level}<LEND>[argument 3; call](){}<LSEP>[](symbol){future_msts}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){pred}<LEND>[argument 4; call](){}<LSEP>[](symbol){future_msts}<LSEP>[](symbol){x}<LSEP>[](symbol){lower}<LEND>[argument 5; call](){}<LSEP>[](symbol){future_msts}<LSEP>[](symbol){x}<LSEP>[](symbol){upper}<LEND>[](symbol){x}<LEND>[argument 7; call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){call}<LEND>[](symbol){x}<LEND>[argument 8; call](){}<LSEP>[](symbol){copy_msts}<LSEP>[](symbol){x}<LSEP>[](symbol){fits}<LEND>[argument 9; call](){}<LSEP>[](symbol){copy_msts}<LSEP>[](symbol){x}<LSEP>[](symbol){res}<LEND>[argument 1; litteral](str){forecast}<LEND>[assign](){<-}<LSEP>[](symbol){getxreg}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){z}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){z}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){z}<LSEP>[](symbol){xreg}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){z}<LSEP>[](symbol){coef}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){eval.parent}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){z}<LSEP>[](symbol){coef}<LEND>[](symbol){xreg}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){z}<LSEP>[](symbol){call}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){eval.parent}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){z}<LSEP>[](symbol){call}<LEND>[](symbol){xreg}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){armapar}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){z}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){intercept}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){z}<LSEP>[](symbol){coef}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){npar}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){z}<LSEP>[](symbol){coef}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){npar}<LSEP>[](symbol){armapar}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){It looks like you have an xreg...}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[](symbol){arima.errors}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){message}<LSEP>[argument 0; litteral](str){Deprecated, use residuals.Arim...}<LEND>[statement 1; call](){}<LSEP>[](symbol){residuals.Arima}<LSEP>[](symbol){object}<LSEP>[argument 1; litteral](str){regression}<LEND>[assign](){<-}<LSEP>[](symbol){fitted.Arima}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){object}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){fitted}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](NULL){NULL}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){residuals}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fits}<LEND>[call](){}<LSEP>[](symbol){InvBoxCox}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){residuals}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){lambda}<LEND>[argument 2; litteral](NULL){NULL}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){sigma2}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fits}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){hfitted}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[argument 2; litteral](str){Arima}<LSEP>[](symbol){...}<LEND>[assign](){<-}<LSEP>[](symbol){fitted.forecast_ARIMA}<LSEP>[](symbol){fitted.Arima}<LEND>[assign](){<-}<LSEP>[](symbol){Arima}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){y}<LSEP>[](symbol){order}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){xreg}<LSEP>[](symbol){include.mean}<LSEP>[](symbol){include.drift}<LSEP>[](symbol){include.constant}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){method}<LSEP>[](symbol){model}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){deparse}<LEND>[argument 0; call](){}<LSEP>[](symbol){substitute}<LSEP>[](symbol){y}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){origx}<LSEP>[](symbol){y}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){BoxCox}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){lambda}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](str){biasadj}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](str){biasadj}<LEND>[](symbol){biasadj}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.numeric}<LSEP>[](symbol){xreg}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){xreg should be a numeric matri...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){xreg}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){xreg}<LEND>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){xreg}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; litteral](str){xreg}<LEND>[false branch; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){xreg}<LEND>[argument 2; litteral](str){}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.list}<LSEP>[](symbol){seasonal}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[argument 1; litteral](logical){NA}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](integer){2}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Not enough data to fit the model}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){seasonal}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){seasonal}<LEND>[argument 1; call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](integer){2}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){order}<LEND>[argument 1; litteral](integer){2}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){period}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Not enough data to fit the model}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){missing}<LSEP>[](symbol){include.constant}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){include.constant}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){include.mean}<LSEP>[litteral](logical){TRUE}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){order}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){include.drift}<LSEP>[litteral](logical){TRUE}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){include.mean}<LEND>[assign](){<-}<LSEP>[](symbol){include.drift}<LSEP>[litteral](logical){FALSE}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){order}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){include.drift}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){warning}<LSEP>[argument 0; litteral](str){No drift term fitted as the or...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){include.drift}<LSEP>[litteral](logical){FALSE}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tmp}<LEND>[call](){}<LSEP>[](symbol){arima2}<LSEP>[](symbol){x}<LSEP>[](symbol){model}<LSEP>[](symbol){xreg}<LSEP>[](symbol){method}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){xreg}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){fitted}<LEND>[litteral](NULL){NULL}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){lambda}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){lambda}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){include.drift}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){colnames<-}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){make.unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){drift}<LEND>[argument 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](str){}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){xreg}<LEND>[false branch; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){xreg}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){tmp}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){arima}<LEND>[](symbol){x}<LSEP>[](symbol){order}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){include.mean}<LSEP>[](symbol){method}<LSEP>[](symbol){...}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){suppressWarnings}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){tmp}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){arima}<LEND>[](symbol){x}<LSEP>[](symbol){order}<LSEP>[](symbol){seasonal}<LSEP>[](symbol){xreg}<LSEP>[](symbol){include.mean}<LSEP>[](symbol){method}<LSEP>[](symbol){...}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){npar}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){coef}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){mask}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){missing}<LEND>[call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){residuals}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){firstnonmiss}<LEND>[call](){}<LSEP>[](symbol){head}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){missing}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){lastnonmiss}<LEND>[call](){}<LSEP>[](symbol){tail}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){missing}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){missing}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){firstnonmiss}<LSEP>[](symbol){lastnonmiss}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){nstar}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){6.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){7.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){5.000000}<LEND>[statement 14; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){aicc}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){aic}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){npar}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){nstar}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){nstar}<LSEP>[](symbol){npar}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 15; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){bic}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){aic}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){npar}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){log}<LSEP>[](symbol){nstar}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 16; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){series}<LEND>[](symbol){series}<LEND>[statement 17; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){xreg}<LEND>[](symbol){xreg}<LEND>[statement 18; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){call}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 19; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){lambda}<LEND>[](symbol){lambda}<LEND>[statement 20; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){x}<LEND>[](symbol){origx}<LEND>[statement 21; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){sigma2}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp}<LSEP>[](symbol){residuals}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){nstar}<LSEP>[](symbol){npar}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 22; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){tmp}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){forecast_ARIMA}<LSEP>[argument 1; litteral](str){ARIMA}<LSEP>[argument 2; litteral](str){Arima}<LEND>[statement 23; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){fitted.Arima}<LSEP>[](symbol){out}<LEND>[statement 24; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){series}<LEND>[](symbol){series}<LEND>[statement 25; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){out}<LEND>[assign](){<-}<LSEP>[](symbol){arima2}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){model}<LSEP>[](symbol){xreg}<LSEP>[](symbol){method}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){use.drift}<LEND>[call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){drift}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){coef}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){use.intercept}<LEND>[call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){intercept}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){coef}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){use.xreg}<LEND>[call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){call}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){sigma2}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){sigma2}<LEND>[statement 4; control flow](){if}<LSEP>[](symbol){use.drift}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){driftmod}<LEND>[call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){xreg}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){drift}<LEND>[argument 1; call](){}<LSEP>[](symbol){I}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.ts}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){newxreg}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){driftmod}<LSEP>[](symbol){coefficients}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){driftmod}<LSEP>[](symbol){coefficients}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){time}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.ts}<LSEP>[](symbol){x}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){origColNames}<LEND>[call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){xreg}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){newxreg}<LSEP>[](symbol){xreg}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){drift}<LSEP>[](symbol){origColNames}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){xreg}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){newxreg}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){use.xreg}<LSEP>[litteral](logical){TRUE}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){No regressors provided}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Number of regressors does not ...}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){5.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){7.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){use.xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){refit}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){6.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[argument 1; litteral](real){7.000000}<LSEP>[argument 2; litteral](real){4.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){5.000000}<LEND>[](symbol){use.intercept}<LSEP>[](symbol){xreg}<LSEP>[](symbol){method}<LEND>[argument 6; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){coef}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){refit}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){6.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[argument 1; litteral](real){7.000000}<LSEP>[argument 2; litteral](real){4.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){5.000000}<LEND>[](symbol){use.intercept}<LSEP>[](symbol){method}<LEND>[argument 5; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){coef}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){coef}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){use.xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){refit}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){6.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[](symbol){xreg}<LSEP>[](symbol){use.intercept}<LSEP>[](symbol){method}<LEND>[argument 5; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){coef}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){refit}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){6.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[](symbol){use.intercept}<LSEP>[](symbol){method}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){coef}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){refit}<LEND>[call](){}<LSEP>[](symbol){Arima}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){6.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 2; litteral](logical){FALSE}<LSEP>[](symbol){method}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){var.coef}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){coef}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){coef}<LEND>[statement 8; control flow](){if}<LSEP>[](symbol){use.xreg}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){xreg}<LEND>[](symbol){xreg}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){refit}<LSEP>[](symbol){sigma2}<LEND>[](symbol){sigma2}<LEND>[statement 10; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){refit}<LEND>[assign](){<-}<LSEP>[](symbol){print.forecast_ARIMA}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){digits}<LSEP>[](symbol){se}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Series:}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){series}<LEND>[argument 2; litteral](str){\n}<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){arima.string}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[argument 1; litteral](str){\n}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Box Cox transformation: lambda=}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){lambda}<LEND>[argument 2; litteral](str){\n}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){coef}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\nCoefficients:\n}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){coef}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){coef}<LEND>[](symbol){digits}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LSEP>[](symbol){se}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){var.coef}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ses}<LEND>[call](){}<LSEP>[](symbol){rep.int}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){coef}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ses}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){mask}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){diag}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){var.coef}<LEND>[](symbol){digits}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){coef}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){coef}<LSEP>[argument 1; litteral](integer){1}<LEND>[argument 2; call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](NULL){NULL}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){coef}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){coef}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){coef}<LSEP>[](symbol){ses}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){match}<LSEP>[argument 0; litteral](str){intercept}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){coef}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){xreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){j}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){coef}<LEND>[](symbol){j}<LEND>[litteral](str){mean}<LEND>[statement 5; call](){}<LSEP>[](symbol){print.default}<LSEP>[](symbol){coef}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){cm}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){call}<LEND>[](symbol){method}<LEND>[statement 5; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\nsigma^2 = }<LEND>[argument 1; call](){}<LSEP>[](symbol){format}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){sigma2}<LEND>[](symbol){digits}<LEND>[argument 2; litteral](str){}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){loglik}<LEND>[true branch; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){: log likelihood = }<LEND>[argument 1; call](){}<LSEP>[](symbol){format}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){loglik}<LEND>[argument 1; litteral](integer){2}<LEND>[argument 2; litteral](str){}<LEND>[statement 7; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){cm}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){cm}<LSEP>[argument 1; litteral](str){CSS}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){aic}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){npar}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){coef}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){mask}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){missing}<LEND>[call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){residuals}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){firstnonmiss}<LEND>[call](){}<LSEP>[](symbol){head}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){missing}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){lastnonmiss}<LEND>[call](){}<LSEP>[](symbol){tail}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){missing}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){lastnonmiss}<LSEP>[](symbol){firstnonmiss}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){nstar}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){6.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){7.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){arma}<LEND>[argument 1; litteral](real){5.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){bic}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){aic}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){npar}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){log}<LSEP>[](symbol){nstar}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){aicc}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){aic}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){npar}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){nstar}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){nstar}<LSEP>[](symbol){npar}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 8; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){AIC=}<LEND>[argument 1; call](){}<LSEP>[](symbol){format}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){aic}<LEND>[argument 1; litteral](integer){2}<LEND>[argument 2; litteral](str){}<LEND>[statement 9; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){ AICc=}<LEND>[argument 1; call](){}<LSEP>[](symbol){format}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LSEP>[](symbol){aicc}<LSEP>[argument 1; litteral](integer){2}<LEND>[argument 2; litteral](str){}<LEND>[statement 10; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){ BIC=}<LEND>[argument 1; call](){}<LSEP>[](symbol){format}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LSEP>[](symbol){bic}<LSEP>[argument 1; litteral](integer){2}<LEND>[argument 2; litteral](str){\n}<LSEP>[argument 3; litteral](str){}<LEND>[statement 9; call](){}<LSEP>[](symbol){invisible}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){arimaorder}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){Arima}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){order}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){arma}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){6.000000}<LSEP>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){3.000000}<LSEP>[argument 4; litteral](real){7.000000}<LSEP>[argument 5; litteral](real){4.000000}<LSEP>[argument 6; litteral](real){5.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){order}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){p}<LSEP>[argument 1; litteral](str){d}<LSEP>[argument 2; litteral](str){q}<LSEP>[argument 3; litteral](str){P}<LSEP>[argument 4; litteral](str){D}<LSEP>[argument 5; litteral](str){Q}<LSEP>[argument 6; litteral](str){Frequency}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){seasonal}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LSEP>[argument 1; litteral](real){7.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){4.000000}<LSEP>[argument 1; litteral](real){6.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 3; control flow](){if}<LSEP>[](symbol){seasonal}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){order}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){order}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){ar}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){order}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.element}<LSEP>[argument 0; litteral](str){fracdiff}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ar}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){d}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){ma}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){object not of class Arima, ar ...}<LEND>[assign](){<-}<LSEP>[](symbol){as.character.Arima}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){arima.string}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){is.Arima}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){Arima}<LEND>[assign](){<-}<LSEP>[](symbol){fitted.ar}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){getResponse}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){residuals}<LSEP>[](symbol){object} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){as.Date.timeDate}<LEND>[call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){timeDate}<LSEP>[](symbol){as.Date.timeDate}<LEND>[assign](){<-}<LSEP>[](symbol){bizdays}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){FinCenter}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){We cannot handle a time series...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){years}<LEND>[call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){start}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){1}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){end}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){1}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){FinCenter}<LEND>[call](){}<LSEP>[](symbol){match.arg}<LSEP>[](symbol){FinCenter}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){FinCenter}<LSEP>[argument 1; litteral](str){New York}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){holidays}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){timeDate}<LSEP>[](symbol){holidayNYSE}<LEND>[](symbol){years}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){FinCenter}<LSEP>[argument 1; litteral](str){London}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){holidays}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){timeDate}<LSEP>[](symbol){holidayLONDON}<LEND>[](symbol){years}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){FinCenter}<LSEP>[argument 1; litteral](str){NERC}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){holidays}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){timeDate}<LSEP>[](symbol){holidayNERC}<LEND>[](symbol){years}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){FinCenter}<LSEP>[argument 1; litteral](str){Tokyo}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){holidays}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){timeDate}<LSEP>[](symbol){holidayTSX}<LEND>[](symbol){years}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){FinCenter}<LSEP>[argument 1; litteral](str){Zurich}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){holidays}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){timeDate}<LSEP>[](symbol){holidayZURICH}<LEND>[](symbol){years}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){freq}<LSEP>[argument 1; litteral](integer){12}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){date}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){zoo}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){start}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){date}<LSEP>[argument 1; litteral](integer){1}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){end}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){date}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){date}<LEND>[argument 1; litteral](integer){2}<LSEP>[argument 2; litteral](str){month}<LEND>[argument 1; litteral](integer){2}<LEND>[argument 1; litteral](integer){1}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){days.len}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){timeDate}<LSEP>[](symbol){timeSequence}<LEND>[](symbol){start}<LSEP>[](symbol){end}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){biz}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){days.len}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){timeDate}<LSEP>[](symbol){isBizday}<LEND>[](symbol){days.len}<LSEP>[](symbol){holidays}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){bizdays}<LEND>[call](){}<LSEP>[](symbol){format}<LSEP>[](symbol){biz}<LSEP>[argument 1; litteral](str){%Y-%m}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){freq}<LSEP>[argument 1; litteral](integer){4}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){date}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){zoo}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){start}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){date}<LSEP>[argument 1; litteral](integer){1}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){end}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){date}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){date}<LEND>[argument 1; litteral](integer){2}<LSEP>[argument 2; litteral](str){3 month}<LEND>[argument 1; litteral](integer){2}<LEND>[argument 1; litteral](integer){1}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){days.len}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){timeDate}<LSEP>[](symbol){timeSequence}<LEND>[](symbol){start}<LSEP>[](symbol){end}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){biz}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){days.len}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){timeDate}<LSEP>[](symbol){isBizday}<LEND>[](symbol){days.len}<LSEP>[](symbol){holidays}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){bizdays}<LEND>[call](){}<LSEP>[](symbol){format}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){zoo}<LSEP>[](symbol){as.yearqtr}<LEND>[](symbol){biz}<LEND>[argument 1; litteral](str){%Y Qtr%q}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){num.days}<LEND>[call](){}<LSEP>[](symbol){table}<LSEP>[](symbol){bizdays}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){num.days}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){1}<LEND>[](symbol){freq}<LEND>[statement 8; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){out}<LEND>[assign](){<-}<LSEP>[](symbol){easter}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){easter.mon}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){We cannot handle a time series...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){frequency}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){date}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){zoo}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){time}<LSEP>[](symbol){x}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){start.yr}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){start}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){1}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){end.yr}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){end}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){1}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){yr.span}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[](symbol){start.yr}<LSEP>[](symbol){end.yr}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){gd.fri0}<LEND>[call](){}<LSEP>[](symbol){Easter}<LSEP>[](symbol){yr.span}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](integer){2}<LEND>[statement 7; control flow](){if}<LSEP>[](symbol){easter.mon}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){easter0}<LEND>[call](){}<LSEP>[](symbol){Easter}<LSEP>[](symbol){yr.span}<LSEP>[argument 1; litteral](integer){1}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){easter0}<LEND>[call](){}<LSEP>[](symbol){Easter}<LSEP>[](symbol){yr.span}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){freq}<LSEP>[argument 1; litteral](integer){12}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fmat}<LSEP>[litteral](str){%Y-%m}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){yr.mon}<LEND>[call](){}<LSEP>[](symbol){format}<LSEP>[](symbol){date}<LSEP>[](symbol){fmat}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){gd.fri}<LEND>[call](){}<LSEP>[](symbol){format}<LSEP>[](symbol){gd.fri0}<LSEP>[](symbol){fmat}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){easter}<LEND>[call](){}<LSEP>[](symbol){format}<LSEP>[](symbol){easter0}<LSEP>[](symbol){fmat}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){freq}<LSEP>[argument 1; litteral](integer){4}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fmat}<LSEP>[litteral](str){%Y-%q}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){yr.mon}<LEND>[call](){}<LSEP>[](symbol){format}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){zoo}<LSEP>[](symbol){as.yearqtr}<LEND>[](symbol){date}<LEND>[](symbol){fmat}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){gd.fri}<LEND>[call](){}<LSEP>[](symbol){format}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){zoo}<LSEP>[](symbol){as.yearqtr}<LEND>[](symbol){gd.fri0}<LEND>[](symbol){fmat}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){easter}<LEND>[call](){}<LSEP>[](symbol){format}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){zoo}<LSEP>[](symbol){as.yearqtr}<LEND>[](symbol){easter0}<LEND>[](symbol){fmat}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){span}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){gd.fri}<LSEP>[](symbol){easter}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){hdays}<LEND>[call](){}<LSEP>[](symbol){unlist}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){span}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){unique}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){dummies}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){yr.mon}<LSEP>[](symbol){hdays}<LEND>[argument 1; litteral](integer){1}<LSEP>[argument 2; litteral](integer){0}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){denominator}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){easter0}<LSEP>[](symbol){gd.fri0}<LEND>[argument 1; litteral](integer){1}<LEND>[argument 1; litteral](integer){1}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){last.mar}<LEND>[call](){}<LSEP>[](symbol){as.timeDate}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LSEP>[](symbol){yr.span}<LSEP>[argument 1; litteral](str){-03-31}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){dif}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){difftimeDate}<LSEP>[](symbol){last.mar}<LSEP>[](symbol){gd.fri0}<LSEP>[argument 2; litteral](str){days}<LEND>[argument 1; litteral](integer){1}<LEND>[statement 15; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){date}<LSEP>[argument 1; litteral](integer){1}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){last.mar}<LSEP>[argument 1; litteral](integer){1}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){dif}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dif}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](integer){1}<LEND>[statement 16; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){date}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){yr.mon}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){last.mar}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){last.mar}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){dif}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dif}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){dif}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){replace}<LEND>[call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){dif}<LSEP>[](symbol){denominator}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){dif}<LSEP>[argument 1; litteral](integer){0}<LEND>[statement 18; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dif}<LSEP>[](symbol){replace}<LEND>[](symbol){denominator}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){index}<LEND>[call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){dif}<LSEP>[](symbol){denominator}<LEND>[statement 20; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){index}<LEND>[argument 1; litteral](integer){0}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){values}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){denominator}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dif}<LSEP>[](symbol){index}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){new.index}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){index}<LSEP>[argument 1; litteral](integer){1}<LEND>[statement 2; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](integer){1}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){index}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){dif}<LEND>[call](){}<LSEP>[](symbol){append}<LSEP>[](symbol){dif}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){values}<LSEP>[](symbol){i}<LEND>[](symbol){new.index}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){new.index}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){index}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](integer){1}<LEND>[](symbol){i}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dummies}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){dummies}<LSEP>[argument 1; litteral](integer){1}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){dif}<LEND>[argument 1; call](){}<LSEP>[](symbol){unclass}<LSEP>[](symbol){denominator}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 21; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){dummies}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](integer){1}<LEND>[](symbol){freq}<LEND>[statement 22; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){out} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){.onAttach}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){interactive}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stats}<LSEP>[](symbol){runif}<LEND>[argument 0; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.200000}<LEND>[true branch; call](){}<LSEP>[](symbol){return}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){tips}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Use suppressPackageStartupMess...}<LSEP>[argument 1; litteral](str){Stackoverflow is a great place...}<LSEP>[argument 2; litteral](str){Crossvalidated is a great plac...}<LSEP>[argument 3; litteral](str){Need help getting started? Try...}<LSEP>[argument 4; litteral](str){Want to stay up-to-date? Read ...}<LSEP>[argument 5; litteral](str){Want to meet other forecasters...}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){tip}<LEND>[call](){}<LSEP>[](symbol){sample}<LSEP>[](symbol){tips}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){msg}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){This is forecast}<LEND>[argument 1; call](){}<LSEP>[](symbol){packageVersion}<LSEP>[argument 0; litteral](str){forecast}<LEND>[argument 2; litteral](str){\n }<LSEP>[](symbol){tip}<LEND>[statement 4; call](){}<LSEP>[](symbol){packageStartupMessage}<LSEP>[](symbol){msg}<LEND>[assign](){<-}<LSEP>[](symbol){register_s3_method}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){pkg}<LSEP>[](symbol){generic}<LSEP>[](symbol){class}<LSEP>[](symbol){fun}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stopifnot}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.character}<LSEP>[](symbol){pkg}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){pkg}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){stopifnot}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.character}<LSEP>[](symbol){generic}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){generic}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){stopifnot}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.character}<LSEP>[](symbol){class}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){class}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){fun}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fun}<LEND>[call](){}<LSEP>[](symbol){get}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LSEP>[](symbol){generic}<LSEP>[argument 1; litteral](str){.}<LSEP>[](symbol){class}<LEND>[argument 1; call](){}<LSEP>[](symbol){parent.frame}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stopifnot}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.function}<LSEP>[](symbol){fun}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){pkg}<LEND>[argument 1; call](){}<LSEP>[](symbol){loadedNamespaces}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){registerS3method}<LSEP>[](symbol){generic}<LSEP>[](symbol){class}<LSEP>[](symbol){fun}<LEND>[argument 3; call](){}<LSEP>[](symbol){asNamespace}<LSEP>[](symbol){pkg}<LEND>[statement 5; call](){}<LSEP>[](symbol){setHook}<LEND>[argument 0; call](){}<LSEP>[](symbol){packageEvent}<LSEP>[](symbol){pkg}<LSEP>[argument 1; litteral](str){onLoad}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){registerS3method}<LSEP>[](symbol){generic}<LSEP>[](symbol){class}<LSEP>[](symbol){fun}<LEND>[argument 3; call](){}<LSEP>[](symbol){asNamespace}<LSEP>[](symbol){pkg}<LEND>[assign](){<-}<LSEP>[](symbol){overwrite_s3_generic}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){pkg}<LSEP>[](symbol){generic}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){pkg}<LEND>[argument 1; call](){}<LSEP>[](symbol){loadedNamespaces}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){assign}<LSEP>[](symbol){generic}<LEND>[argument 1; call](){}<LSEP>[](symbol){get}<LSEP>[](symbol){generic}<LEND>[argument 1; call](){}<LSEP>[](symbol){asNamespace}<LSEP>[](symbol){pkg}<LEND>[argument 2; call](){}<LSEP>[](symbol){asNamespace}<LSEP>[argument 0; litteral](str){forecast}<LEND>[assign](){<-}<LSEP>[](symbol){.onLoad}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){overwrite_s3_generic}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](str){autolayer}<LEND>[statement 1; call](){}<LSEP>[](symbol){register_s3_method}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](str){autolayer}<LSEP>[argument 2; litteral](str){ts}<LEND>[statement 2; call](){}<LSEP>[](symbol){register_s3_method}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](str){autolayer}<LSEP>[argument 2; litteral](str){mts}<LEND>[statement 3; call](){}<LSEP>[](symbol){register_s3_method}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](str){autolayer}<LSEP>[argument 2; litteral](str){msts}<LEND>[statement 4; call](){}<LSEP>[](symbol){register_s3_method}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](str){autolayer}<LSEP>[argument 2; litteral](str){forecast}<LEND>[statement 5; call](){}<LSEP>[](symbol){register_s3_method}<LSEP>[argument 0; litteral](str){ggplot2}<LSEP>[argument 1; litteral](str){autolayer}<LSEP>[argument 2; litteral](str){mforecast}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){methods}<LEND>[call](){}<LSEP>[](symbol){strsplit}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){utils}<LSEP>[](symbol){.S3methods}<LEND>[](symbol){forecast}<LEND>[argument 1; litteral](str){.}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 7; call](){}<LSEP>[](symbol){overwrite_s3_generic}<LSEP>[argument 0; litteral](str){fabletools}<LSEP>[argument 1; litteral](str){forecast}<LEND>[statement 8; control flow](){for}<LSEP>[](symbol){method}<LSEP>[](symbol){methods}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){register_s3_method}<LSEP>[argument 0; litteral](str){fabletools}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){method}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){method}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){methods}<LEND>[call](){}<LSEP>[](symbol){strsplit}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){utils}<LSEP>[](symbol){.S3methods}<LEND>[](symbol){accuracy}<LEND>[argument 1; litteral](str){.}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 10; call](){}<LSEP>[](symbol){overwrite_s3_generic}<LSEP>[argument 0; litteral](str){fabletools}<LSEP>[argument 1; litteral](str){accuracy}<LEND>[statement 11; control flow](){for}<LSEP>[](symbol){method}<LSEP>[](symbol){methods}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){register_s3_method}<LSEP>[argument 0; litteral](str){fabletools}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){method}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){method}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 12; call](){}<LSEP>[](symbol){invisible} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){is.mforecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){inherits}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){mforecast}<LEND>[assign](){<-}<LSEP>[](symbol){mlmsplit}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){index}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){index}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Must select lm using index=int...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){mfit}<LEND>[call](){}<LSEP>[](symbol){match}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){coefficients}<LSEP>[argument 1; litteral](str){residuals}<LSEP>[argument 2; litteral](str){effects}<LSEP>[argument 3; litteral](str){fitted.values}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){x}<LEND>[argument 2; litteral](integer){0}<LEND>[statement 2; control flow](){for}<LSEP>[](symbol){j}<LSEP>[](symbol){mfit}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){x}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){x}<LSEP>[](symbol){j}<LEND>[](symbol){}<LSEP>[](symbol){index}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){x}<LEND>[litteral](str){lm}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){attr}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){terms}<LEND>[argument 1; litteral](str){response}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){yName}<LEND>[call](){}<LSEP>[](symbol){make.names}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){model}<LEND>[](symbol){y}<LEND>[](symbol){index}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){model}<LEND>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){model}<LEND>[](symbol){y}<LEND>[](symbol){}<LSEP>[](symbol){index}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){model}<LEND>[](symbol){y}<LEND>[](symbol){yName}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){attr}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){model}<LEND>[argument 1; litteral](str){terms}<LEND>[call](){}<LSEP>[](symbol){terms}<LEND>[argument 0; call](){}<LSEP>[](symbol){reformulate}<LEND>[argument 0; call](){}<LSEP>[](symbol){attr}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){terms}<LEND>[argument 1; litteral](str){term.labels}<LEND>[](symbol){yName}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){model}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){data}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tspx}<LEND>[call](){}<LSEP>[](symbol){tsp}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){data}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){lapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){model}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tspx}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){data}<LEND>[litteral](str){data.frame}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){row.names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){data}<LEND>[](symbol){NROW}<LEND>[statement 10; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){terms}<LEND>[call](){}<LSEP>[](symbol){terms}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){model}<LEND>[statement 11; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){forecast.mlm}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){newdata}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){ts}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){object}<LEND>[argument 1; call](){}<LSEP>[](symbol){vector}<LSEP>[argument 0; litteral](str){list}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coefficients}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){cl}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){cl}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){quote}<LSEP>[](symbol){forecast.lm}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){cl}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){quote}<LEND>[argument 0; call](){}<LSEP>[](symbol){mlmsplit}<LSEP>[](symbol){object}<LSEP>[](symbol){i}<LEND>[statement 4; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){seq_along}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){forecast}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){forecast}<LEND>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){eval}<LSEP>[](symbol){cl}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){forecast}<LEND>[](symbol){i}<LEND>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coefficients}<LEND>[](symbol){i}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](str){Multiple linear regression model}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){forecast}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){forecast}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){object}<LSEP>[](symbol){coefficients}<LEND>[statement 7; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){out}<LSEP>[argument 1; litteral](str){mforecast}<LEND>[assign](){<-}<LSEP>[](symbol){forecast.mts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){h}<LSEP>[](symbol){level}<LSEP>[](symbol){fan}<LSEP>[](symbol){robust}<LSEP>[](symbol){lambda}<LSEP>[](symbol){biasadj}<LSEP>[](symbol){find.frequency}<LSEP>[](symbol){allow.multiplicative.trend}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){vector}<LSEP>[argument 0; litteral](str){list}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){object}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){cl}<LEND>[call](){}<LSEP>[](symbol){match.call}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){cl}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){quote}<LSEP>[](symbol){forecast.ts}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){cl}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){quote}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){object}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[statement 4; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){NCOL}<LSEP>[](symbol){object}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){forecast}<LEND>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){eval}<LSEP>[](symbol){cl}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){forecast}<LEND>[](symbol){i}<LEND>[](symbol){series}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){object}<LEND>[](symbol){i}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){vapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){forecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){method}<LEND>[argument 2; call](){}<LSEP>[](symbol){character}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){forecast}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){out}<LSEP>[](symbol){method}<LEND>[call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){object}<LEND>[statement 7; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){structure}<LSEP>[](symbol){out}<LSEP>[argument 1; litteral](str){mforecast}<LEND>[assign](){<-}<LSEP>[](symbol){print.mforecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){lapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){forecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){series}<LEND>[argument 1; litteral](str){\n}<LEND>[statement 1; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){x}<LEND>[statement 2; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){invisible}<LEND>[assign](){<-}<LSEP>[](symbol){plot.mforecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){main}<LSEP>[](symbol){xlab}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){oldpar}<LEND>[call](){}<LSEP>[](symbol){par}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){forecast}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){5.100000}<LSEP>[argument 2; litteral](real){0.000000}<LSEP>[argument 3; litteral](real){2.100000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){6.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){5.000000}<LSEP>[argument 3; litteral](real){0.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){on.exit}<LEND>[argument 0; call](){}<LSEP>[](symbol){par}<LSEP>[](symbol){oldpar}<LEND>[statement 2; control flow](){for}<LSEP>[](symbol){fcast}<LEND>[range; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){forecast}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){fcast}<LSEP>[argument 1; litteral](str){}<LSEP>[argument 2; litteral](str){n}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcast}<LSEP>[](symbol){series}<LEND>[](symbol){...}<LEND>[statement 3; call](){}<LSEP>[](symbol){axis}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 4; call](){}<LSEP>[](symbol){mtext}<LSEP>[](symbol){xlab}<LSEP>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){3.000000}<LEND>[statement 5; call](){}<LSEP>[](symbol){title}<LSEP>[](symbol){main}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){summary.mforecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){object}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){summary.mforecast}<LEND>[argument 1; call](){}<LSEP>[](symbol){class}<LSEP>[](symbol){object}<LEND>[](symbol){object}<LEND>[assign](){<-}<LSEP>[](symbol){print.summary.mforecast}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){\nForecast method:}<LEND>[argument 1; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){method}<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){\n\nModel Information:\n}<LEND>[statement 2; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){model}<LEND>[statement 3; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\nError measures:\n}<LEND>[statement 4; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){x}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){forecast}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n No forecasts\n}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\nForecasts:\n}<LEND>[statement 1; call](){}<LSEP>[](symbol){NextMethod} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){forecast}<LEND>[assign](){<-}<LSEP>[](symbol){bonds}<LEND>[call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){5.830000}<LSEP>[argument 1; litteral](real){6.060000}<LSEP>[argument 2; litteral](real){6.580000}<LSEP>[argument 3; litteral](real){7.090000}<LSEP>[argument 4; litteral](real){7.310000}<LSEP>[argument 5; litteral](real){7.230000}<LSEP>[argument 6; litteral](real){7.430000}<LSEP>[argument 7; litteral](real){7.370000}<LSEP>[argument 8; litteral](real){7.600000}<LSEP>[argument 9; litteral](real){7.890000}<LSEP>[argument 10; litteral](real){8.120000}<LSEP>[argument 11; litteral](real){7.960000}<LSEP>[argument 12; litteral](real){7.930000}<LSEP>[argument 13; litteral](real){7.610000}<LSEP>[argument 14; litteral](real){7.330000}<LSEP>[argument 15; litteral](real){7.180000}<LSEP>[argument 16; litteral](real){6.740000}<LSEP>[argument 17; litteral](real){6.270000}<LSEP>[argument 18; litteral](real){6.380000}<LSEP>[argument 19; litteral](real){6.600000}<LSEP>[argument 20; litteral](real){6.300000}<LSEP>[argument 21; litteral](real){6.130000}<LSEP>[argument 22; litteral](real){6.020000}<LSEP>[argument 23; litteral](real){5.790000}<LSEP>[argument 24; litteral](real){5.730000}<LSEP>[argument 25; litteral](real){5.890000}<LSEP>[argument 26; litteral](real){6.370000}<LSEP>[argument 27; litteral](real){6.620000}<LSEP>[argument 28; litteral](real){6.850000}<LSEP>[argument 29; litteral](real){7.030000}<LSEP>[argument 30; litteral](real){6.990000}<LSEP>[argument 31; litteral](real){6.750000}<LSEP>[argument 32; litteral](real){6.950000}<LSEP>[argument 33; litteral](real){6.640000}<LSEP>[argument 34; litteral](real){6.300000}<LSEP>[argument 35; litteral](real){6.400000}<LSEP>[argument 36; litteral](real){6.690000}<LSEP>[argument 37; litteral](real){6.520000}<LSEP>[argument 38; litteral](real){6.800000}<LSEP>[argument 39; litteral](real){7.010000}<LSEP>[argument 40; litteral](real){6.820000}<LSEP>[argument 41; litteral](real){6.600000}<LSEP>[argument 42; litteral](real){6.320000}<LSEP>[argument 43; litteral](real){6.400000}<LSEP>[argument 44; litteral](real){6.110000}<LSEP>[argument 45; litteral](real){5.820000}<LSEP>[argument 46; litteral](real){5.870000}<LSEP>[argument 47; litteral](real){5.890000}<LSEP>[argument 48; litteral](real){5.630000}<LSEP>[argument 49; litteral](real){5.650000}<LSEP>[argument 50; litteral](real){5.730000}<LSEP>[argument 51; litteral](real){5.720000}<LSEP>[argument 52; litteral](real){5.730000}<LSEP>[argument 53; litteral](real){5.580000}<LSEP>[argument 54; litteral](real){5.530000}<LSEP>[argument 55; litteral](real){5.410000}<LSEP>[argument 56; litteral](real){4.870000}<LSEP>[argument 57; litteral](real){4.580000}<LSEP>[argument 58; litteral](real){4.890000}<LSEP>[argument 59; litteral](real){4.690000}<LSEP>[argument 60; litteral](real){4.780000}<LSEP>[argument 61; litteral](real){4.990000}<LSEP>[argument 62; litteral](real){5.230000}<LSEP>[argument 63; litteral](real){5.180000}<LSEP>[argument 64; litteral](real){5.540000}<LSEP>[argument 65; litteral](real){5.900000}<LSEP>[argument 66; litteral](real){5.800000}<LSEP>[argument 67; litteral](real){5.940000}<LSEP>[argument 68; litteral](real){5.910000}<LSEP>[argument 69; litteral](real){6.100000}<LSEP>[argument 70; litteral](real){6.030000}<LSEP>[argument 71; litteral](real){6.260000}<LSEP>[argument 72; litteral](real){6.660000}<LSEP>[argument 73; litteral](real){6.520000}<LSEP>[argument 74; litteral](real){6.260000}<LSEP>[argument 75; litteral](real){6.000000}<LSEP>[argument 76; litteral](real){6.420000}<LSEP>[argument 77; litteral](real){6.100000}<LSEP>[argument 78; litteral](real){6.040000}<LSEP>[argument 79; litteral](real){5.830000}<LSEP>[argument 80; litteral](real){5.800000}<LSEP>[argument 81; litteral](real){5.740000}<LSEP>[argument 82; litteral](real){5.720000}<LSEP>[argument 83; litteral](real){5.230000}<LSEP>[argument 84; litteral](real){5.140000}<LSEP>[argument 85; litteral](real){5.100000}<LSEP>[argument 86; litteral](real){4.890000}<LSEP>[argument 87; litteral](real){5.130000}<LSEP>[argument 88; litteral](real){5.370000}<LSEP>[argument 89; litteral](real){5.260000}<LSEP>[argument 90; litteral](real){5.230000}<LSEP>[argument 91; litteral](real){4.970000}<LSEP>[argument 92; litteral](real){4.760000}<LSEP>[argument 93; litteral](real){4.550000}<LSEP>[argument 94; litteral](real){4.610000}<LSEP>[argument 95; litteral](real){5.070000}<LSEP>[argument 96; litteral](real){5.000000}<LSEP>[argument 97; litteral](real){4.900000}<LSEP>[argument 98; litteral](real){5.280000}<LSEP>[argument 99; litteral](real){5.210000}<LSEP>[argument 100; litteral](real){5.150000}<LSEP>[argument 101; litteral](real){4.900000}<LSEP>[argument 102; litteral](real){4.620000}<LSEP>[argument 103; litteral](real){4.240000}<LSEP>[argument 104; litteral](real){3.880000}<LSEP>[argument 105; litteral](real){3.910000}<LSEP>[argument 106; litteral](real){4.040000}<LSEP>[argument 107; litteral](real){4.030000}<LSEP>[argument 108; litteral](real){4.020000}<LSEP>[argument 109; litteral](real){3.900000}<LSEP>[argument 110; litteral](real){3.790000}<LSEP>[argument 111; litteral](real){3.940000}<LSEP>[argument 112; litteral](real){3.560000}<LSEP>[argument 113; litteral](real){3.320000}<LSEP>[argument 114; litteral](real){3.930000}<LSEP>[argument 115; litteral](real){4.440000}<LSEP>[argument 116; litteral](real){4.290000}<LSEP>[argument 117; litteral](real){4.270000}<LSEP>[argument 118; litteral](real){4.290000}<LSEP>[argument 119; litteral](real){4.260000}<LSEP>[argument 120; litteral](real){4.130000}<LSEP>[argument 121; litteral](real){4.060000}<LSEP>[argument 122; litteral](real){3.810000}<LSEP>[argument 123; litteral](real){4.320000}<LSEP>[argument 124; litteral](real){4.700000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1994.000000}<LSEP>[argument 1; litteral](real){2004.333333}<LSEP>[argument 2; litteral](real){12.000000}<LEND>[argument 2; litteral](str){ts}<LEND>[assign](){<-}<LSEP>[](symbol){usnetelec}<LEND>[call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){296.100000}<LSEP>[argument 1; litteral](real){334.100000}<LSEP>[argument 2; litteral](real){375.300000}<LSEP>[argument 3; litteral](real){403.800000}<LSEP>[argument 4; litteral](real){447.000000}<LSEP>[argument 5; litteral](real){476.300000}<LSEP>[argument 6; litteral](real){550.300000}<LSEP>[argument 7; litteral](real){603.900000}<LSEP>[argument 8; litteral](real){634.600000}<LSEP>[argument 9; litteral](real){648.500000}<LSEP>[argument 10; litteral](real){713.400000}<LSEP>[argument 11; litteral](real){759.200000}<LSEP>[argument 12; litteral](real){797.100000}<LSEP>[argument 13; litteral](real){857.900000}<LSEP>[argument 14; litteral](real){920.000000}<LSEP>[argument 15; litteral](real){987.200000}<LSEP>[argument 16; litteral](real){1058.400000}<LSEP>[argument 17; litteral](real){1147.500000}<LSEP>[argument 18; litteral](real){1217.800000}<LSEP>[argument 19; litteral](real){1332.800000}<LSEP>[argument 20; litteral](real){1445.500000}<LSEP>[argument 21; litteral](real){1535.100000}<LSEP>[argument 22; litteral](real){1615.900000}<LSEP>[argument 23; litteral](real){1753.000000}<LSEP>[argument 24; litteral](real){1864.100000}<LSEP>[argument 25; litteral](real){1870.300000}<LSEP>[argument 26; litteral](real){1920.800000}<LSEP>[argument 27; litteral](real){2040.900000}<LSEP>[argument 28; litteral](real){2127.400000}<LSEP>[argument 29; litteral](real){2209.400000}<LSEP>[argument 30; litteral](real){2250.700000}<LSEP>[argument 31; litteral](real){2289.600000}<LSEP>[argument 32; litteral](real){2298.000000}<LSEP>[argument 33; litteral](real){2244.400000}<LSEP>[argument 34; litteral](real){2313.400000}<LSEP>[argument 35; litteral](real){2419.500000}<LSEP>[argument 36; litteral](real){2473.000000}<LSEP>[argument 37; litteral](real){2490.500000}<LSEP>[argument 38; litteral](real){2575.300000}<LSEP>[argument 39; litteral](real){2707.400000}<LSEP>[argument 40; litteral](real){2967.300000}<LSEP>[argument 41; litteral](real){3038.000000}<LSEP>[argument 42; litteral](real){3073.800000}<LSEP>[argument 43; litteral](real){3083.900000}<LSEP>[argument 44; litteral](real){3197.200000}<LSEP>[argument 45; litteral](real){3247.500000}<LSEP>[argument 46; litteral](real){3353.500000}<LSEP>[argument 47; litteral](real){3444.200000}<LSEP>[argument 48; litteral](real){3492.200000}<LSEP>[argument 49; litteral](real){3620.300000}<LSEP>[argument 50; litteral](real){3694.800000}<LSEP>[argument 51; litteral](real){3802.100000}<LSEP>[argument 52; litteral](real){3736.600000}<LSEP>[argument 53; litteral](real){3858.500000}<LSEP>[argument 54; litteral](real){3848.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1949.000000}<LSEP>[argument 1; litteral](real){2003.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 2; litteral](str){ts}<LEND>[assign](){<-}<LSEP>[](symbol){ukcars}<LEND>[call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){330.371000}<LSEP>[argument 1; litteral](real){371.051000}<LSEP>[argument 2; litteral](real){270.670000}<LSEP>[argument 3; litteral](real){343.880000}<LSEP>[argument 4; litteral](real){358.491000}<LSEP>[argument 5; litteral](real){362.822000}<LSEP>[argument 6; litteral](real){261.281000}<LSEP>[argument 7; litteral](real){240.355000}<LSEP>[argument 8; litteral](real){325.382000}<LSEP>[argument 9; litteral](real){316.700000}<LSEP>[argument 10; litteral](real){171.153000}<LSEP>[argument 11; litteral](real){257.217000}<LSEP>[argument 12; litteral](real){298.127000}<LSEP>[argument 13; litteral](real){251.464000}<LSEP>[argument 14; litteral](real){181.555000}<LSEP>[argument 15; litteral](real){192.598000}<LSEP>[argument 16; litteral](real){245.652000}<LSEP>[argument 17; litteral](real){245.526000}<LSEP>[argument 18; litteral](real){225.261000}<LSEP>[argument 19; litteral](real){238.211000}<LSEP>[argument 20; litteral](real){257.385000}<LSEP>[argument 21; litteral](real){228.461000}<LSEP>[argument 22; litteral](real){175.371000}<LSEP>[argument 23; litteral](real){226.462000}<LSEP>[argument 24; litteral](real){266.150000}<LSEP>[argument 25; litteral](real){287.251000}<LSEP>[argument 26; litteral](real){225.883000}<LSEP>[argument 27; litteral](real){265.313000}<LSEP>[argument 28; litteral](real){272.759000}<LSEP>[argument 29; litteral](real){234.134000}<LSEP>[argument 30; litteral](real){196.462000}<LSEP>[argument 31; litteral](real){205.551000}<LSEP>[argument 32; litteral](real){291.283000}<LSEP>[argument 33; litteral](real){284.422000}<LSEP>[argument 34; litteral](real){221.571000}<LSEP>[argument 35; litteral](real){250.697000}<LSEP>[argument 36; litteral](real){253.757000}<LSEP>[argument 37; litteral](real){267.016000}<LSEP>[argument 38; litteral](real){220.388000}<LSEP>[argument 39; litteral](real){277.801000}<LSEP>[argument 40; litteral](real){283.233000}<LSEP>[argument 41; litteral](real){302.072000}<LSEP>[argument 42; litteral](real){259.720000}<LSEP>[argument 43; litteral](real){297.658000}<LSEP>[argument 44; litteral](real){306.129000}<LSEP>[argument 45; litteral](real){322.106000}<LSEP>[argument 46; litteral](real){256.723000}<LSEP>[argument 47; litteral](real){341.877000}<LSEP>[argument 48; litteral](real){356.004000}<LSEP>[argument 49; litteral](real){361.540000}<LSEP>[argument 50; litteral](real){270.433000}<LSEP>[argument 51; litteral](real){311.105000}<LSEP>[argument 52; litteral](real){326.688000}<LSEP>[argument 53; litteral](real){327.059000}<LSEP>[argument 54; litteral](real){274.257000}<LSEP>[argument 55; litteral](real){367.606000}<LSEP>[argument 56; litteral](real){346.163000}<LSEP>[argument 57; litteral](real){348.211000}<LSEP>[argument 58; litteral](real){250.008000}<LSEP>[argument 59; litteral](real){292.518000}<LSEP>[argument 60; litteral](real){343.318000}<LSEP>[argument 61; litteral](real){343.429000}<LSEP>[argument 62; litteral](real){275.386000}<LSEP>[argument 63; litteral](real){329.747000}<LSEP>[argument 64; litteral](real){364.521000}<LSEP>[argument 65; litteral](real){378.448000}<LSEP>[argument 66; litteral](real){300.798000}<LSEP>[argument 67; litteral](real){331.757000}<LSEP>[argument 68; litteral](real){362.536000}<LSEP>[argument 69; litteral](real){389.133000}<LSEP>[argument 70; litteral](real){323.322000}<LSEP>[argument 71; litteral](real){391.832000}<LSEP>[argument 72; litteral](real){421.646000}<LSEP>[argument 73; litteral](real){416.823000}<LSEP>[argument 74; litteral](real){311.713000}<LSEP>[argument 75; litteral](real){381.902000}<LSEP>[argument 76; litteral](real){422.982000}<LSEP>[argument 77; litteral](real){427.722000}<LSEP>[argument 78; litteral](real){376.850000}<LSEP>[argument 79; litteral](real){458.580000}<LSEP>[argument 80; litteral](real){436.225000}<LSEP>[argument 81; litteral](real){441.487000}<LSEP>[argument 82; litteral](real){369.566000}<LSEP>[argument 83; litteral](real){450.723000}<LSEP>[argument 84; litteral](real){462.442000}<LSEP>[argument 85; litteral](real){468.232000}<LSEP>[argument 86; litteral](real){403.636000}<LSEP>[argument 87; litteral](real){413.948000}<LSEP>[argument 88; litteral](real){460.496000}<LSEP>[argument 89; litteral](real){448.932000}<LSEP>[argument 90; litteral](real){407.787000}<LSEP>[argument 91; litteral](real){469.408000}<LSEP>[argument 92; litteral](real){494.311000}<LSEP>[argument 93; litteral](real){433.240000}<LSEP>[argument 94; litteral](real){335.106000}<LSEP>[argument 95; litteral](real){378.795000}<LSEP>[argument 96; litteral](real){387.100000}<LSEP>[argument 97; litteral](real){372.395000}<LSEP>[argument 98; litteral](real){335.790000}<LSEP>[argument 99; litteral](real){397.080000}<LSEP>[argument 100; litteral](real){449.755000}<LSEP>[argument 101; litteral](real){402.252000}<LSEP>[argument 102; litteral](real){391.847000}<LSEP>[argument 103; litteral](real){385.890000}<LSEP>[argument 104; litteral](real){424.325000}<LSEP>[argument 105; litteral](real){433.280000}<LSEP>[argument 106; litteral](real){391.213000}<LSEP>[argument 107; litteral](real){408.740000}<LSEP>[argument 108; litteral](real){445.458000}<LSEP>[argument 109; litteral](real){428.202000}<LSEP>[argument 110; litteral](real){379.048000}<LSEP>[argument 111; litteral](real){394.042000}<LSEP>[argument 112; litteral](real){432.796000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1977.000000}<LSEP>[argument 1; litteral](real){2005.000000}<LSEP>[argument 2; litteral](real){4.000000}<LEND>[argument 2; litteral](str){ts}<LEND>[assign](){<-}<LSEP>[](symbol){visitors}<LEND>[call](){}<LSEP>[](symbol){structure}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){75.700000}<LSEP>[argument 1; litteral](real){75.400000}<LSEP>[argument 2; litteral](real){83.100000}<LSEP>[argument 3; litteral](real){82.900000}<LSEP>[argument 4; litteral](real){77.300000}<LSEP>[argument 5; litteral](real){105.700000}<LSEP>[argument 6; litteral](real){121.900000}<LSEP>[argument 7; litteral](real){150.000000}<LSEP>[argument 8; litteral](real){98.000000}<LSEP>[argument 9; litteral](real){118.000000}<LSEP>[argument 10; litteral](real){129.500000}<LSEP>[argument 11; litteral](real){110.600000}<LSEP>[argument 12; litteral](real){91.700000}<LSEP>[argument 13; litteral](real){94.800000}<LSEP>[argument 14; litteral](real){109.500000}<LSEP>[argument 15; litteral](real){105.100000}<LSEP>[argument 16; litteral](real){95.000000}<LSEP>[argument 17; litteral](real){130.300000}<LSEP>[argument 18; litteral](real){156.700000}<LSEP>[argument 19; litteral](real){190.100000}<LSEP>[argument 20; litteral](real){139.700000}<LSEP>[argument 21; litteral](real){147.800000}<LSEP>[argument 22; litteral](real){145.200000}<LSEP>[argument 23; litteral](real){132.700000}<LSEP>[argument 24; litteral](real){120.700000}<LSEP>[argument 25; litteral](real){116.500000}<LSEP>[argument 26; litteral](real){142.000000}<LSEP>[argument 27; litteral](real){140.400000}<LSEP>[argument 28; litteral](real){128.000000}<LSEP>[argument 29; litteral](real){165.700000}<LSEP>[argument 30; litteral](real){183.100000}<LSEP>[argument 31; litteral](real){222.800000}<LSEP>[argument 32; litteral](real){161.300000}<LSEP>[argument 33; litteral](real){180.400000}<LSEP>[argument 34; litteral](real){185.200000}<LSEP>[argument 35; litteral](real){160.500000}<LSEP>[argument 36; litteral](real){157.100000}<LSEP>[argument 37; litteral](real){163.800000}<LSEP>[argument 38; litteral](real){203.300000}<LSEP>[argument 39; litteral](real){196.900000}<LSEP>[argument 40; litteral](real){179.600000}<LSEP>[argument 41; litteral](real){207.300000}<LSEP>[argument 42; litteral](real){208.000000}<LSEP>[argument 43; litteral](real){245.800000}<LSEP>[argument 44; litteral](real){168.900000}<LSEP>[argument 45; litteral](real){191.100000}<LSEP>[argument 46; litteral](real){180.000000}<LSEP>[argument 47; litteral](real){160.100000}<LSEP>[argument 48; litteral](real){136.600000}<LSEP>[argument 49; litteral](real){142.700000}<LSEP>[argument 50; litteral](real){175.400000}<LSEP>[argument 51; litteral](real){161.400000}<LSEP>[argument 52; litteral](real){149.900000}<LSEP>[argument 53; litteral](real){174.100000}<LSEP>[argument 54; litteral](real){192.700000}<LSEP>[argument 55; litteral](real){247.400000}<LSEP>[argument 56; litteral](real){176.200000}<LSEP>[argument 57; litteral](real){192.800000}<LSEP>[argument 58; litteral](real){189.100000}<LSEP>[argument 59; litteral](real){181.100000}<LSEP>[argument 60; litteral](real){149.900000}<LSEP>[argument 61; litteral](real){157.300000}<LSEP>[argument 62; litteral](real){185.300000}<LSEP>[argument 63; litteral](real){178.200000}<LSEP>[argument 64; litteral](real){162.700000}<LSEP>[argument 65; litteral](real){190.600000}<LSEP>[argument 66; litteral](real){198.600000}<LSEP>[argument 67; litteral](real){253.100000}<LSEP>[argument 68; litteral](real){177.400000}<LSEP>[argument 69; litteral](real){190.600000}<LSEP>[argument 70; litteral](real){189.200000}<LSEP>[argument 71; litteral](real){168.000000}<LSEP>[argument 72; litteral](real){161.400000}<LSEP>[argument 73; litteral](real){172.200000}<LSEP>[argument 74; litteral](real){208.300000}<LSEP>[argument 75; litteral](real){199.300000}<LSEP>[argument 76; litteral](real){197.400000}<LSEP>[argument 77; litteral](real){216.000000}<LSEP>[argument 78; litteral](real){223.900000}<LSEP>[argument 79; litteral](real){266.800000}<LSEP>[argument 80; litteral](real){196.100000}<LSEP>[argument 81; litteral](real){238.200000}<LSEP>[argument 82; litteral](real){217.800000}<LSEP>[argument 83; litteral](real){203.800000}<LSEP>[argument 84; litteral](real){175.200000}<LSEP>[argument 85; litteral](real){176.900000}<LSEP>[argument 86; litteral](real){219.300000}<LSEP>[argument 87; litteral](real){199.100000}<LSEP>[argument 88; litteral](real){190.000000}<LSEP>[argument 89; litteral](real){229.300000}<LSEP>[argument 90; litteral](real){255.000000}<LSEP>[argument 91; litteral](real){302.400000}<LSEP>[argument 92; litteral](real){242.800000}<LSEP>[argument 93; litteral](real){245.500000}<LSEP>[argument 94; litteral](real){257.900000}<LSEP>[argument 95; litteral](real){226.300000}<LSEP>[argument 96; litteral](real){213.400000}<LSEP>[argument 97; litteral](real){204.600000}<LSEP>[argument 98; litteral](real){244.600000}<LSEP>[argument 99; litteral](real){239.900000}<LSEP>[argument 100; litteral](real){224.000000}<LSEP>[argument 101; litteral](real){267.200000}<LSEP>[argument 102; litteral](real){285.900000}<LSEP>[argument 103; litteral](real){344.000000}<LSEP>[argument 104; litteral](real){250.500000}<LSEP>[argument 105; litteral](real){304.300000}<LSEP>[argument 106; litteral](real){307.400000}<LSEP>[argument 107; litteral](real){255.100000}<LSEP>[argument 108; litteral](real){214.900000}<LSEP>[argument 109; litteral](real){230.900000}<LSEP>[argument 110; litteral](real){282.500000}<LSEP>[argument 111; litteral](real){265.400000}<LSEP>[argument 112; litteral](real){254.000000}<LSEP>[argument 113; litteral](real){301.600000}<LSEP>[argument 114; litteral](real){311.000000}<LSEP>[argument 115; litteral](real){384.000000}<LSEP>[argument 116; litteral](real){303.800000}<LSEP>[argument 117; litteral](real){319.100000}<LSEP>[argument 118; litteral](real){313.500000}<LSEP>[argument 119; litteral](real){294.200000}<LSEP>[argument 120; litteral](real){244.800000}<LSEP>[argument 121; litteral](real){261.400000}<LSEP>[argument 122; litteral](real){329.700000}<LSEP>[argument 123; litteral](real){304.900000}<LSEP>[argument 124; litteral](real){268.600000}<LSEP>[argument 125; litteral](real){320.700000}<LSEP>[argument 126; litteral](real){342.900000}<LSEP>[argument 127; litteral](real){422.300000}<LSEP>[argument 128; litteral](real){317.200000}<LSEP>[argument 129; litteral](real){392.700000}<LSEP>[argument 130; litteral](real){365.600000}<LSEP>[argument 131; litteral](real){333.200000}<LSEP>[argument 132; litteral](real){261.500000}<LSEP>[argument 133; litteral](real){306.900000}<LSEP>[argument 134; litteral](real){358.200000}<LSEP>[argument 135; litteral](real){329.200000}<LSEP>[argument 136; litteral](real){309.200000}<LSEP>[argument 137; litteral](real){350.400000}<LSEP>[argument 138; litteral](real){375.600000}<LSEP>[argument 139; litteral](real){465.200000}<LSEP>[argument 140; litteral](real){342.900000}<LSEP>[argument 141; litteral](real){408.000000}<LSEP>[argument 142; litteral](real){390.900000}<LSEP>[argument 143; litteral](real){325.900000}<LSEP>[argument 144; litteral](real){289.100000}<LSEP>[argument 145; litteral](real){308.200000}<LSEP>[argument 146; litteral](real){397.400000}<LSEP>[argument 147; litteral](real){330.400000}<LSEP>[argument 148; litteral](real){330.900000}<LSEP>[argument 149; litteral](real){366.500000}<LSEP>[argument 150; litteral](real){379.500000}<LSEP>[argument 151; litteral](real){448.300000}<LSEP>[argument 152; litteral](real){346.200000}<LSEP>[argument 153; litteral](real){353.600000}<LSEP>[argument 154; litteral](real){338.600000}<LSEP>[argument 155; litteral](real){341.100000}<LSEP>[argument 156; litteral](real){283.400000}<LSEP>[argument 157; litteral](real){304.200000}<LSEP>[argument 158; litteral](real){372.300000}<LSEP>[argument 159; litteral](real){323.700000}<LSEP>[argument 160; litteral](real){323.900000}<LSEP>[argument 161; litteral](real){354.800000}<LSEP>[argument 162; litteral](real){367.900000}<LSEP>[argument 163; litteral](real){457.600000}<LSEP>[argument 164; litteral](real){351.000000}<LSEP>[argument 165; litteral](real){398.600000}<LSEP>[argument 166; litteral](real){389.000000}<LSEP>[argument 167; litteral](real){334.100000}<LSEP>[argument 168; litteral](real){298.100000}<LSEP>[argument 169; litteral](real){317.100000}<LSEP>[argument 170; litteral](real){388.500000}<LSEP>[argument 171; litteral](real){355.600000}<LSEP>[argument 172; litteral](real){353.100000}<LSEP>[argument 173; litteral](real){397.000000}<LSEP>[argument 174; litteral](real){416.700000}<LSEP>[argument 175; litteral](real){460.800000}<LSEP>[argument 176; litteral](real){360.800000}<LSEP>[argument 177; litteral](real){434.600000}<LSEP>[argument 178; litteral](real){411.900000}<LSEP>[argument 179; litteral](real){405.600000}<LSEP>[argument 180; litteral](real){319.300000}<LSEP>[argument 181; litteral](real){347.900000}<LSEP>[argument 182; litteral](real){429.000000}<LSEP>[argument 183; litteral](real){372.900000}<LSEP>[argument 184; litteral](real){403.000000}<LSEP>[argument 185; litteral](real){426.500000}<LSEP>[argument 186; litteral](real){459.900000}<LSEP>[argument 187; litteral](real){559.900000}<LSEP>[argument 188; litteral](real){416.600000}<LSEP>[argument 189; litteral](real){429.200000}<LSEP>[argument 190; litteral](real){428.700000}<LSEP>[argument 191; litteral](real){405.400000}<LSEP>[argument 192; litteral](real){330.200000}<LSEP>[argument 193; litteral](real){370.000000}<LSEP>[argument 194; litteral](real){446.900000}<LSEP>[argument 195; litteral](real){384.600000}<LSEP>[argument 196; litteral](real){366.300000}<LSEP>[argument 197; litteral](real){378.500000}<LSEP>[argument 198; litteral](real){376.200000}<LSEP>[argument 199; litteral](real){523.200000}<LSEP>[argument 200; litteral](real){379.300000}<LSEP>[argument 201; litteral](real){437.200000}<LSEP>[argument 202; litteral](real){446.500000}<LSEP>[argument 203; litteral](real){360.300000}<LSEP>[argument 204; litteral](real){329.900000}<LSEP>[argument 205; litteral](real){339.400000}<LSEP>[argument 206; litteral](real){418.200000}<LSEP>[argument 207; litteral](real){371.900000}<LSEP>[argument 208; litteral](real){358.600000}<LSEP>[argument 209; litteral](real){428.900000}<LSEP>[argument 210; litteral](real){437.000000}<LSEP>[argument 211; litteral](real){534.000000}<LSEP>[argument 212; litteral](real){396.600000}<LSEP>[argument 213; litteral](real){427.500000}<LSEP>[argument 214; litteral](real){392.500000}<LSEP>[argument 215; litteral](real){321.500000}<LSEP>[argument 216; litteral](real){260.900000}<LSEP>[argument 217; litteral](real){308.300000}<LSEP>[argument 218; litteral](real){415.500000}<LSEP>[argument 219; litteral](real){362.200000}<LSEP>[argument 220; litteral](real){385.600000}<LSEP>[argument 221; litteral](real){435.300000}<LSEP>[argument 222; litteral](real){473.300000}<LSEP>[argument 223; litteral](real){566.600000}<LSEP>[argument 224; litteral](real){420.200000}<LSEP>[argument 225; litteral](real){454.800000}<LSEP>[argument 226; litteral](real){432.300000}<LSEP>[argument 227; litteral](real){402.800000}<LSEP>[argument 228; litteral](real){341.300000}<LSEP>[argument 229; litteral](real){367.300000}<LSEP>[argument 230; litteral](real){472.000000}<LSEP>[argument 231; litteral](real){405.800000}<LSEP>[argument 232; litteral](real){395.600000}<LSEP>[argument 233; litteral](real){449.900000}<LSEP>[argument 234; litteral](real){479.900000}<LSEP>[argument 235; litteral](real){593.100000}<LSEP>[argument 236; litteral](real){462.400000}<LSEP>[argument 237; litteral](real){501.600000}<LSEP>[argument 238; litteral](real){504.700000}<LSEP>[argument 239; litteral](real){409.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1985.333333}<LSEP>[argument 1; litteral](real){2005.250000}<LSEP>[argument 2; litteral](real){12.000000}<LEND>[argument 2; litteral](str){ts}<LEND>[call](){}<LSEP>[](symbol){par}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){mod1}<LEND>[call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){bonds}<LEND>[assign](){<-}<LSEP>[](symbol){mod2}<LEND>[call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){usnetelec}<LEND>[assign](){<-}<LSEP>[](symbol){mod3}<LEND>[call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){ukcars}<LEND>[assign](){<-}<LSEP>[](symbol){mod4}<LEND>[call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){visitors}<LEND>[call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){mod1}<LEND>[argument 1; litteral](str){(a) US 10-year bonds yield}<LSEP>[argument 2; litteral](str){Year}<LSEP>[argument 3; litteral](str){Percentage per annum}<LEND>[call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){mod2}<LEND>[argument 1; litteral](str){(b) US net electricity generation}<LSEP>[argument 2; litteral](str){Year}<LSEP>[argument 3; litteral](str){Billion kwh}<LEND>[call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){mod3}<LEND>[argument 1; litteral](str){(c) UK passenger motor vehicle...}<LSEP>[argument 2; litteral](str){Year}<LSEP>[argument 3; litteral](str){Thousands of cars}<LEND>[call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){mod4}<LEND>[argument 1; litteral](str){(d) Overseas visitors to Austr...}<LSEP>[argument 2; litteral](str){Year}<LSEP>[argument 3; litteral](str){Thousands of people}<LEND>[assign](){<-}<LSEP>[](symbol){etsnames}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){mod1}<LSEP>[](symbol){method}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){mod2}<LSEP>[](symbol){method}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){mod3}<LSEP>[](symbol){method}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){mod4}<LSEP>[](symbol){method}<LEND>[assign](){<-}<LSEP>[](symbol){etsnames}<LEND>[call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){Ad}<LSEP>[argument 1; litteral](str){A\\\\damped}<LSEP>[](symbol){etsnames}<LEND>[assign](){<-}<LSEP>[](symbol){etsfit}<LEND>[call](){}<LSEP>[](symbol){ets}<LSEP>[](symbol){usnetelec}<LEND>[](symbol){etsfit}<LEND>[call](){}<LSEP>[](symbol){accuracy}<LSEP>[](symbol){etsfit}<LEND>[assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){etsfit}<LEND>[call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){fcast}<LEND>[](symbol){fcast}<LEND>[assign](){<-}<LSEP>[](symbol){mod1}<LEND>[call](){}<LSEP>[](symbol){auto.arima}<LSEP>[](symbol){bonds}<LSEP>[argument 1; litteral](logical){FALSE}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){mod2}<LEND>[call](){}<LSEP>[](symbol){auto.arima}<LSEP>[](symbol){usnetelec}<LEND>[assign](){<-}<LSEP>[](symbol){mod3}<LEND>[call](){}<LSEP>[](symbol){auto.arima}<LSEP>[](symbol){ukcars}<LEND>[assign](){<-}<LSEP>[](symbol){mod4}<LEND>[call](){}<LSEP>[](symbol){auto.arima}<LSEP>[](symbol){visitors}<LEND>[call](){}<LSEP>[](symbol){par}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){mod1}<LEND>[argument 1; litteral](str){(a) US 10-year bonds yield}<LSEP>[argument 2; litteral](str){Year}<LSEP>[argument 3; litteral](str){Percentage per annum}<LEND>[call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){mod2}<LEND>[argument 1; litteral](str){(b) US net electricity generation}<LSEP>[argument 2; litteral](str){Year}<LSEP>[argument 3; litteral](str){Billion kwh}<LEND>[call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){mod3}<LEND>[argument 1; litteral](str){(c) UK passenger motor vehicle...}<LSEP>[argument 2; litteral](str){Year}<LSEP>[argument 3; litteral](str){Thousands of cars}<LEND>[call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){mod4}<LEND>[argument 1; litteral](str){(d) Overseas visitors to Austr...}<LSEP>[argument 2; litteral](str){Year}<LSEP>[argument 3; litteral](str){Thousands of people}<LEND>[assign](){<-}<LSEP>[](symbol){arimafit}<LEND>[call](){}<LSEP>[](symbol){auto.arima}<LSEP>[](symbol){usnetelec}<LEND>[assign](){<-}<LSEP>[](symbol){fcast}<LEND>[call](){}<LSEP>[](symbol){forecast}<LSEP>[](symbol){arimafit}<LEND>[call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){fcast}<LEND>[assign](){<-}<LSEP>[](symbol){arimanames}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){mod1}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){mod2}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){mod3}<LEND>[argument 3; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){mod4}<LEND>[assign](){<-}<LSEP>[](symbol){arimanames}<LEND>[call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){\\[([0-9]*)\\]}<LSEP>[argument 1; litteral](str){$_{\\1}$}<LSEP>[](symbol){arimanames}<LEND>[call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){fcast} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){pick_target.snp}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){input.plink.file}<LSEP>[](symbol){fr.desire}<LSEP>[](symbol){n.snp}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){file.exists}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){input.plink.file}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){frq}<LSEP>[argument 2; litteral](str){.}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){input.plink.file}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){.frq}<LSEP>[argument 2; litteral](str){ is needed for selecting targe...}<LSEP>[argument 3; litteral](str){}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){file.exists}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){input.plink.file}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](str){frq}<LSEP>[argument 2; litteral](str){.}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){input.plink.file}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](str){.frq}<LSEP>[argument 2; litteral](str){ is needed for selecting targe...}<LSEP>[argument 3; litteral](str){}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fr.mom}<LEND>[call](){}<LSEP>[](symbol){read.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){input.plink.file}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){frq}<LSEP>[argument 2; litteral](str){.}<LEND>[](symbol){T}<LSEP>[](symbol){T}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){fr.dad}<LEND>[call](){}<LSEP>[](symbol){read.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){input.plink.file}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](str){frq}<LSEP>[argument 2; litteral](str){.}<LEND>[](symbol){T}<LSEP>[](symbol){T}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fr}<LSEP>[](symbol){fr.mom}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fr}<LSEP>[](symbol){MAF}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fr.mom}<LSEP>[](symbol){MAF}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fr.dad}<LSEP>[](symbol){MAF}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){snp}<LEND>[call](){}<LSEP>[](symbol){read.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){input.plink.file}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){bim}<LSEP>[argument 2; litteral](str){.}<LEND>[](symbol){T}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp}<LSEP>[](symbol){ord}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){snp}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){snp.all2}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){snp}<LSEP>[](symbol){fr}<LSEP>[argument 2; litteral](str){V2}<LSEP>[argument 3; litteral](str){SNP}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){snp.all2}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){snp.all2}<LEND>[argument 1; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){ord}<LEND>[](symbol){}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){.mar}<LSEP>[litteral](real){0.005000}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){snp.in.fr}<LEND>[call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){MAF}<LEND>[](symbol){fr.desire}<LEND>[](symbol){.mar}<LEND>[statement 12; control flow](){while}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){snp.in.fr}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){n.snp}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){.mar}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){.mar}<LSEP>[argument 1; litteral](real){0.001000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){snp.in.fr}<LEND>[call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){MAF}<LEND>[](symbol){fr.desire}<LEND>[](symbol){.mar}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){target.snp}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){snp.in.fr}<LEND>[argument 1; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){snp.in.fr}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){snp.in.fr}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){n.snp}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){n.snp}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 14; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){target.snp}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){snp.all2}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){ord}<LSEP>[argument 1; litteral](str){V2}<LSEP>[argument 2; litteral](str){CHR}<LSEP>[argument 3; litteral](str){V4}<LSEP>[argument 4; litteral](str){A1}<LSEP>[argument 5; litteral](str){A2}<LSEP>[argument 6; litteral](str){MAF}<LSEP>[argument 7; litteral](str){NCHROBS}<LEND>[statement 16; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){snp.all2}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){ord}<LSEP>[argument 1; litteral](str){RS}<LSEP>[argument 2; litteral](str){CHR}<LSEP>[argument 3; litteral](str){POS}<LSEP>[argument 4; litteral](str){A1}<LSEP>[argument 5; litteral](str){A2}<LSEP>[argument 6; litteral](str){MAF}<LSEP>[argument 7; litteral](str){NCHROBS}<LEND>[statement 17; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){target.snp}<LEND>[assign](){<-}<LSEP>[](symbol){get.target.geno}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){input.plink.file}<LSEP>[](symbol){target.snp}<LSEP>[](symbol){snp.all2}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){geno.mom}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){snpStats}<LSEP>[](symbol){read.plink}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){input.plink.file}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){bed}<LSEP>[argument 2; litteral](str){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){target.snp}<LSEP>[argument 2; litteral](str){RS}<LEND>[argument 2; call](){}<LSEP>[](symbol){(}<LSEP>[argument 0; litteral](str){-9}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){geno.dad}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){snpStats}<LSEP>[](symbol){read.plink}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){input.plink.file}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](str){bed}<LSEP>[argument 2; litteral](str){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){target.snp}<LSEP>[argument 2; litteral](str){RS}<LEND>[argument 2; call](){}<LSEP>[](symbol){(}<LSEP>[argument 0; litteral](str){-9}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){geno.kid}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){snpStats}<LSEP>[](symbol){read.plink}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){input.plink.file}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](str){bed}<LSEP>[argument 2; litteral](str){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){target.snp}<LSEP>[argument 2; litteral](str){RS}<LEND>[argument 2; call](){}<LSEP>[](symbol){(}<LSEP>[argument 0; litteral](str){-9}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){mom}<LEND>[call](){}<LSEP>[](symbol){@}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.mom}<LSEP>[](symbol){genotype}<LEND>[](symbol){.Data}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){mom}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mom}<LEND>[argument 1; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){mom}<LEND>[](symbol){}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){dad}<LEND>[call](){}<LSEP>[](symbol){@}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.dad}<LSEP>[](symbol){genotype}<LEND>[](symbol){.Data}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){dad}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dad}<LEND>[argument 1; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){dad}<LEND>[](symbol){}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){kid}<LEND>[call](){}<LSEP>[](symbol){@}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.kid}<LSEP>[](symbol){genotype}<LEND>[](symbol){.Data}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){kid}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){kid}<LEND>[argument 1; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){kid}<LEND>[](symbol){}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){mom}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){mom}<LEND>[](symbol){F}<LEND>[argument 2; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){mom}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){dad}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){dad}<LEND>[](symbol){F}<LEND>[argument 2; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){dad}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){kid}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){kid}<LEND>[](symbol){F}<LEND>[argument 2; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){kid}<LEND>[statement 12; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mom}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){mom}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[litteral](logical){NA}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){mom}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){mom}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 14; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dad}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){dad}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[litteral](logical){NA}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){dad}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){dad}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 16; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){kid}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){kid}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[litteral](logical){NA}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){kid}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){kid}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 18; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){kid}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.kid}<LSEP>[](symbol){map}<LEND>[](symbol){allele.1}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.mom}<LSEP>[](symbol){map}<LEND>[](symbol){allele.1}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){kid}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.kid}<LSEP>[](symbol){map}<LEND>[](symbol){allele.1}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.mom}<LSEP>[](symbol){map}<LEND>[](symbol){allele.1}<LEND>[statement 19; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dad}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.dad}<LSEP>[](symbol){map}<LEND>[](symbol){allele.1}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.mom}<LSEP>[](symbol){map}<LEND>[](symbol){allele.1}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dad}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.dad}<LSEP>[](symbol){map}<LEND>[](symbol){allele.1}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.mom}<LSEP>[](symbol){map}<LEND>[](symbol){allele.1}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){na.sel}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){mom}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){dad}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){kid}<LEND>[statement 21; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mom}<LSEP>[](symbol){na.sel}<LEND>[litteral](real){0.000000}<LEND>[statement 22; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dad}<LSEP>[](symbol){na.sel}<LEND>[litteral](real){0.000000}<LEND>[statement 23; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){kid}<LSEP>[](symbol){na.sel}<LEND>[litteral](real){0.000000}<LEND>[statement 24; assign](){<-}<LSEP>[](symbol){comp}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){mom}<LSEP>[](symbol){dad}<LEND>[](symbol){kid}<LEND>[statement 25; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mom}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){comp}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[litteral](real){0.000000}<LEND>[statement 26; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dad}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){comp}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[litteral](real){0.000000}<LEND>[statement 27; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){kid}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){comp}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[litteral](real){0.000000}<LEND>[statement 28; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){comp}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){comp}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[litteral](real){0.000000}<LEND>[statement 29; assign](){<-}<LSEP>[](symbol){mom}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){mom}<LEND>[statement 30; assign](){<-}<LSEP>[](symbol){dad}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){dad}<LEND>[statement 31; assign](){<-}<LSEP>[](symbol){kid}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){kid}<LEND>[statement 32; assign](){<-}<LSEP>[](symbol){comp}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){comp}<LEND>[statement 33; assign](){<-}<LSEP>[](symbol){mom}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){mom}<LSEP>[](symbol){mom}<LEND>[statement 34; assign](){<-}<LSEP>[](symbol){dad}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){dad}<LSEP>[](symbol){dad}<LEND>[statement 35; assign](){<-}<LSEP>[](symbol){kid}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){kid}<LSEP>[](symbol){comp}<LEND>[statement 36; assign](){<-}<LSEP>[](symbol){n.gwas}<LEND>[call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){kid}<LEND>[statement 37; assign](){<-}<LSEP>[](symbol){mom.tar}<LSEP>[](symbol){mom}<LEND>[statement 38; assign](){<-}<LSEP>[](symbol){dad.tar}<LSEP>[](symbol){dad}<LEND>[statement 39; assign](){<-}<LSEP>[](symbol){kid.tar}<LSEP>[](symbol){kid}<LEND>[statement 40; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){mom.tar}<LSEP>[](symbol){dad.tar}<LSEP>[](symbol){kid.tar}<LEND>[assign](){<-}<LSEP>[](symbol){get.brks}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){N.brk}<LSEP>[](symbol){n.ped}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){target.snp}<LSEP>[](symbol){rcmb.rate}<LSEP>[](symbol){same.brk}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){order}<LSEP>[](symbol){target.snp}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){target.snp}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Target SNPs are not in the cor...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){n.ped}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){n.ped}<LSEP>[argument 1; litteral](real){1.200000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){n.chr}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){CHR}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){snp.per.chr}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[](symbol){n.chr}<LEND>[statement 4; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n.chr}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){snp.per.chr}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){target.snp}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){cumsum}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){CHR}<LEND>[argument 1; litteral](real){1.000000}<LEND>[false branch; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){snp.per.chr}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){target.snp}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){cumsum}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){CHR}<LEND>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){target.snp}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){cumsum}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){CHR}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){brks}<LSEP>[litteral](NULL){NULL}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){brk.ends}<LSEP>[litteral](NULL){NULL}<LEND>[statement 7; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n.chr}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){snp.per.chr}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){brk0}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){target.snp}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){first.pos}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){cumsum}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){CHR}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){last.pos}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){target.snp}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){target.snp}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){cumsum}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){CHR}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){brk0}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){first.pos}<LSEP>[](symbol){last.pos}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){brk1}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){target.snp}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){cumsum}<LSEP>[](symbol){snp.per.chr}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){cumsum}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){CHR}<LEND>[](symbol){i}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){snp.per.chr}<LSEP>[](symbol){i}<LEND>[](symbol){N.brk}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){brk.ends}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){brk.ends}<LSEP>[](symbol){brk0}<LEND>[statement 3; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){snp.per.chr}<LSEP>[](symbol){i}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){brk.ends}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){brk.ends}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){target.snp}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){cumsum}<LSEP>[](symbol){snp.per.chr}<LEND>[](symbol){i}<LEND>[](symbol){k}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){target.snp}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){cumsum}<LSEP>[](symbol){snp.per.chr}<LEND>[](symbol){i}<LEND>[](symbol){k}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){snp.per.chr}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){N.brk}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){brk.ends}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){brk.ends}<LSEP>[](symbol){brk1}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){brk}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ceiling}<LEND>[argument 0; call](){}<LSEP>[](symbol){quantile}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){CHR}<LEND>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LSEP>[](symbol){N.brk}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LSEP>[](symbol){N.brk}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){addon}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){cumsum}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){CHR}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[false branch; assign](){<-}<LSEP>[](symbol){addon}<LSEP>[litteral](real){0.000000}<LEND>[statement 2; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){brk}<LEND>[body; assign](){<-}<LSEP>[](symbol){brk.ends}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){brk.ends}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){brk}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){brk}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){addon}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){rcmb.rate}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){POS}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rcmb.rate}<LSEP>[](symbol){POS}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){snp.all2}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){brks}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){brk.ends}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){rate1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){rcmb.rate}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){brk.ends}<LSEP>[](symbol){i}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){brk.ends}<LSEP>[](symbol){i}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](str){RATE}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){brks}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){brks}<LEND>[argument 1; call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){brk.ends}<LSEP>[](symbol){i}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){brk.ends}<LSEP>[](symbol){i}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){n.ped}<LSEP>[](symbol){rate1}<LSEP>[](symbol){T}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){brks}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){n.ped}<LEND>[](symbol){brks}<LEND>[argument 2; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){cumsum}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){CHR}<LEND>[](symbol){n.ped}<LEND>[](symbol){T}<LSEP>[](symbol){n.ped}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){brks}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){brk.ends}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){v}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){v}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){v}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){n.ped}<LSEP>[](symbol){T}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){brks}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){n.ped}<LEND>[](symbol){brks}<LEND>[argument 2; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){cumsum}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){CHR}<LEND>[](symbol){n.ped}<LEND>[](symbol){T}<LSEP>[](symbol){n.ped}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){brks}<LEND>[call](){}<LSEP>[](symbol){t}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){brks}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){sort}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){n.ped}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){n.ped}<LSEP>[argument 1; litteral](real){1.200000}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){brks}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){brks}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){brks}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){v}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){duplicated}<LSEP>[](symbol){v}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n.ped}<LEND>[](symbol){}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){fam.pos}<LSEP>[litteral](NULL){NULL}<LEND>[statement 13; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){target.snp}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fam.pos}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){fam.pos}<LEND>[argument 1; call](){}<LSEP>[](symbol){apply}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){brks}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){target.snp}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){sum}<LEND>[statement 14; control flow](){if}<LSEP>[](symbol){same.brk}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){brks}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){brks}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){brks}<LEND>[](symbol){T}<LEND>[argument 2; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){brks}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fam.pos}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fam.pos}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){fam.pos}<LEND>[](symbol){T}<LEND>[argument 2; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){fam.pos}<LEND>[statement 2; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){brks}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){}<LEND>[statement 15; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){brks}<LEND>[litteral](NULL){NULL}<LEND>[statement 16; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){brks}<LSEP>[](symbol){fam.pos}<LEND>[assign](){<-}<LSEP>[](symbol){fit.risk.model.par}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){n.ped}<LSEP>[](symbol){brks}<LSEP>[](symbol){target.snp}<LSEP>[](symbol){fam.pos}<LSEP>[](symbol){mom.tar}<LSEP>[](symbol){dad.tar}<LSEP>[](symbol){kid.tar}<LSEP>[](symbol){pathways}<LSEP>[](symbol){betas.e0}<LSEP>[](symbol){e.fr}<LSEP>[](symbol){betas.e}<LSEP>[](symbol){pop1.frac}<LSEP>[](symbol){rate.beta}<LSEP>[](symbol){is.case}<LSEP>[](symbol){qtl}<LSEP>[](symbol){out.put.file}<LSEP>[](symbol){no_cores}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){two.pop}<LEND>[call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){mom.tar}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){brks.org}<LSEP>[](symbol){brks}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fam.pos.org}<LSEP>[](symbol){fam.pos}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){mom.tar.org}<LSEP>[](symbol){mom.tar}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){dad.tar.org}<LSEP>[](symbol){dad.tar}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){kid.tar.org}<LSEP>[](symbol){kid.tar}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){betas.e0.org}<LSEP>[](symbol){betas.e0}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){betas.e.org}<LSEP>[](symbol){betas.e}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){e.fr.org}<LSEP>[](symbol){e.fr}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){betas.e0}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){pathways}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Number of beta coefficients do...}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){sim.fam}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){i}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){aff}<LSEP>[litteral](real){0.000000}<LEND>[statement 1; control flow](){while}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){aff}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){pop}<LSEP>[litteral](logical){NA}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){two.pop}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){pop}<LEND>[call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){pop1.frac}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){pop1.frac}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){mom.tar}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){mom.tar.org}<LSEP>[](symbol){pop}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){dad.tar}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){dad.tar.org}<LSEP>[](symbol){pop}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){kid.tar}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){kid.tar.org}<LSEP>[](symbol){pop}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){betas.e0}<LSEP>[](symbol){betas.e0.org}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){betas.e0}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){betas.e0}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){pop}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){rate.beta}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){e.fr}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){betas.e}<LSEP>[](symbol){betas.e.org}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){betas.e}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){betas.e}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){pop}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){rate.beta}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){e.fr}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){e.fr.org}<LSEP>[](symbol){pop}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){n.gwas}<LEND>[call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){mom.tar}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){n.seg}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){brks}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){n.ped}<LEND>[call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){fam.pos}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){e}<LSEP>[litteral](real){0.000000}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){e.fr}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){betas.e}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){pathways}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Number of beta coefficients do...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){e}<LEND>[call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){e.fr}<LEND>[](symbol){e.fr}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){e}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){betas}<LSEP>[](symbol){betas.e0}<LEND>[false branch; assign](){<-}<LSEP>[](symbol){betas}<LSEP>[](symbol){betas.e}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){brk}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){brks}<LSEP>[](symbol){i}<LSEP>[](symbol){}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){sel.fam}<LEND>[call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n.gwas}<LEND>[](symbol){n.seg}<LSEP>[](symbol){T}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){pathway.m}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mom.tar}<LEND>[argument 1; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sel.fam}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fam.pos}<LSEP>[](symbol){i}<LSEP>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){target.snp}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){pathway.f}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dad.tar}<LEND>[argument 1; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sel.fam}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fam.pos}<LSEP>[](symbol){i}<LSEP>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){target.snp}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){pathway.c}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){kid.tar}<LEND>[argument 1; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sel.fam}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fam.pos}<LSEP>[](symbol){i}<LSEP>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){target.snp}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){X}<LSEP>[litteral](NULL){NULL}<LEND>[statement 14; control flow](){for}<LSEP>[](symbol){p}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){pathways}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){pathway1}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){pathways}<LSEP>[](symbol){p}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){X}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){X}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pathway.c}<LSEP>[](symbol){pathway1}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){pathway1}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){linear.pred}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){betas}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){X}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){betas}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 16; control flow](){if}<LSEP>[](symbol){qtl}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){linear.pred}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){linear.pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 17; assign](){=}<LSEP>[](symbol){p_case}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){exp}<LSEP>[](symbol){linear.pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){exp}<LSEP>[](symbol){linear.pred}<LEND>[statement 18; assign](){<-}<LSEP>[](symbol){aff}<LEND>[call](){}<LSEP>[](symbol){rbinom}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){p_case}<LEND>[statement 19; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){is.case}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){aff}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){aff}<LEND>[statement 20; control flow](){if}<LSEP>[](symbol){qtl}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){aff}<LSEP>[litteral](real){1.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){i}<LSEP>[](symbol){e}<LSEP>[](symbol){pop}<LSEP>[](symbol){sel.fam}<LSEP>[](symbol){pathway.m}<LSEP>[](symbol){pathway.f}<LSEP>[](symbol){pathway.c}<LSEP>[](symbol){linear.pred}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){no_cores}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){no_cores}<LEND>[call](){}<LSEP>[](symbol){ceiling}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){parallel}<LSEP>[](symbol){detectCores}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){cl}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){parallel}<LSEP>[](symbol){makeCluster}<LEND>[](symbol){no_cores}<LEND>[statement 13; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){doParallel}<LSEP>[](symbol){registerDoParallel}<LEND>[](symbol){cl}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){i}<LSEP>[litteral](NULL){NULL}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){sim.all}<LEND>[call](){}<LSEP>[](symbol){%dopar%}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){foreach}<LSEP>[](symbol){foreach}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n.ped}<LEND>[](symbol){rbind}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){n.ped}<LSEP>[argument 1; litteral](str){mom.tar}<LSEP>[argument 2; litteral](str){dad.tar}<LSEP>[argument 3; litteral](str){kid.tar}<LSEP>[argument 4; litteral](str){betas.e0}<LSEP>[argument 5; litteral](str){e.fr}<LSEP>[argument 6; litteral](str){betas.e}<LEND>[argument 1; call](){}<LSEP>[](symbol){sim.fam}<LSEP>[](symbol){i}<LEND>[statement 16; call](){}<LSEP>[](symbol){on.exit}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){parallel}<LSEP>[](symbol){stopCluster}<LEND>[](symbol){cl}<LEND>[statement 17; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){foreach}<LSEP>[](symbol){registerDoSEQ}<LEND>[statement 18; assign](){<-}<LSEP>[](symbol){pathway.all}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sim.all}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){brks}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){pheno}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pathway.all}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){pathway.all}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){pathway.all}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pathway.all}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){pathway.all}<LEND>[statement 21; assign](){<-}<LSEP>[](symbol){n.snp}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){pathway.all}<LEND>[argument 1; litteral](real){3.000000}<LEND>[statement 22; assign](){<-}<LSEP>[](symbol){pathway.all}<LEND>[call](){}<LSEP>[](symbol){rbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pathway.all}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n.snp}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pathway.all}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n.snp}<LEND>[](symbol){n.snp}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pathway.all}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n.snp}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){n.snp}<LEND>[statement 23; assign](){<-}<LSEP>[](symbol){sel.fam.all}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sim.all}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){brks}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){3.000000}<LEND>[statement 24; assign](){<-}<LSEP>[](symbol){e.vec}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sim.all}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[statement 25; assign](){<-}<LSEP>[](symbol){pop.vec}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sim.all}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[statement 26; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){e.fr}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){out.put.file}<LEND>[true branch; call](){}<LSEP>[](symbol){write}<LSEP>[](symbol){e.vec}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){file.path}<LEND>[argument 0; call](){}<LSEP>[](symbol){tempdir}<LEND>[argument 1; litteral](str){/exposure.txt}<LEND>[false branch; call](){}<LSEP>[](symbol){write}<LSEP>[](symbol){e.vec}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){out.put.file}<LSEP>[argument 1; litteral](str){_exposure.txt}<LEND>[statement 27; control flow](){if}<LSEP>[](symbol){two.pop}<LEND>[true branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){out.put.file}<LEND>[true branch; call](){}<LSEP>[](symbol){write}<LSEP>[](symbol){pop.vec}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){file.path}<LEND>[argument 0; call](){}<LSEP>[](symbol){tempdir}<LEND>[argument 1; litteral](str){/population.txt}<LEND>[false branch; call](){}<LSEP>[](symbol){write}<LSEP>[](symbol){pop.vec}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){out.put.file}<LSEP>[argument 1; litteral](str){_population.txt}<LEND>[statement 28; control flow](){if}<LSEP>[](symbol){qtl}<LEND>[true branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){out.put.file}<LEND>[true branch; call](){}<LSEP>[](symbol){write}<LSEP>[](symbol){pheno}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){file.path}<LEND>[argument 0; call](){}<LSEP>[](symbol){tempdir}<LEND>[argument 1; litteral](str){/phenotype.txt}<LEND>[false branch; call](){}<LSEP>[](symbol){write}<LSEP>[](symbol){pheno}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){out.put.file}<LSEP>[argument 1; litteral](str){_phenotype.txt}<LEND>[statement 29; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){sel.fam.all}<LSEP>[](symbol){pathway.all}<LSEP>[](symbol){e.vec}<LSEP>[](symbol){pop.vec}<LSEP>[](symbol){pheno}<LEND>[assign](){<-}<LSEP>[](symbol){glue.chr.segment.par}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){input.plink.file}<LSEP>[](symbol){out.put.file}<LSEP>[](symbol){brks}<LSEP>[](symbol){sel.fam.all}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){pathway.all}<LSEP>[](symbol){target.snp}<LSEP>[](symbol){pop.vec}<LSEP>[](symbol){no_cores}<LSEP>[](symbol){flip}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){order}<LSEP>[](symbol){target.snp}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){target.snp}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Target SNPs are no in the corr...}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){n.ped}<LEND>[call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){brks}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){sel.fam.all.org}<LSEP>[](symbol){sel.fam.all}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){chr.brk}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){brks}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){cumsum}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){CHR}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){risk.chr}<LEND>[call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){target.snp}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){v}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){v}<LEND>[argument 1; call](){}<LSEP>[](symbol){cumsum}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){CHR}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){chr.pos}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){target.snp}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){cumsum}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){CHR}<LEND>[](symbol){risk.chr}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){input.plink.file.org}<LSEP>[](symbol){input.plink.file}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){input.plink.file}<LEND>[argument 1; litteral](real){2.000000}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){pop}<LSEP>[litteral](real){2.000000}<LEND>[false branch; assign](){<-}<LSEP>[](symbol){pop}<LSEP>[litteral](real){1.000000}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){mf.flip}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){rbinom}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){n.ped}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){brks}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){brks}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){n.ped}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){flip}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){mf.flip}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){brks}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){n.ped}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){splice.chr}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){i}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){mom1}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){dad1}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){kid1}<LSEP>[litteral](NULL){NULL}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){brks1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){brks}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){chr.brk}<LSEP>[](symbol){one.chr}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){chr.brk}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){one.chr}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){sel.fam.all1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sel.fam.all}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){chr.brk}<LSEP>[](symbol){one.chr}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){chr.brk}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){one.chr}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){one.chr}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){brks1}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){brks1}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){brks}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){chr.brk}<LSEP>[](symbol){one.chr}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){brks1}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){n.ped}<LEND>[](symbol){brks1}<LEND>[statement 6; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){brks1}<LEND>[argument 1; litteral](real){1.000000}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mf.flip}<LSEP>[](symbol){i}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){mom1}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){mom1}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dad}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sel.fam.all1}<LSEP>[](symbol){i}<LSEP>[](symbol){k}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){brks1}<LSEP>[](symbol){i}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){brks1}<LSEP>[](symbol){i}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){dad1}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){dad1}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mom}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sel.fam.all1}<LSEP>[](symbol){i}<LSEP>[](symbol){k}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){brks1}<LSEP>[](symbol){i}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){brks1}<LSEP>[](symbol){i}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){mom1}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){mom1}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mom}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sel.fam.all1}<LSEP>[](symbol){i}<LSEP>[](symbol){k}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){brks1}<LSEP>[](symbol){i}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){brks1}<LSEP>[](symbol){i}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){dad1}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){dad1}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dad}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sel.fam.all1}<LSEP>[](symbol){i}<LSEP>[](symbol){k}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){brks1}<LSEP>[](symbol){i}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){brks1}<LSEP>[](symbol){i}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){kid1}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){kid1}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){kid}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sel.fam.all1}<LSEP>[](symbol){i}<LSEP>[](symbol){k}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){brks1}<LSEP>[](symbol){i}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){brks1}<LSEP>[](symbol){i}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 7; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){mom1}<LSEP>[](symbol){dad1}<LSEP>[](symbol){kid1}<LEND>[statement 11; control flow](){for}<LSEP>[](symbol){one.chr}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){CHR}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){mom.all}<LSEP>[litteral](NULL){NULL}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){dad.all}<LSEP>[litteral](NULL){NULL}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){kid.all}<LSEP>[litteral](NULL){NULL}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){n.ped.pop1}<LSEP>[litteral](real){0.000000}<LEND>[statement 4; control flow](){for}<LSEP>[](symbol){p}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){pop}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){chr}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){CHR}<LEND>[](symbol){one.chr}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){pop}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){geno.mom}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){snpStats}<LSEP>[](symbol){read.plink}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){input.plink.file}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){bed}<LSEP>[argument 2; litteral](str){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){snp.all2}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){CHR}<LEND>[](symbol){chr}<LEND>[argument 2; litteral](str){RS}<LEND>[argument 2; call](){}<LSEP>[](symbol){(}<LSEP>[argument 0; litteral](str){-9}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){geno.dad}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){snpStats}<LSEP>[](symbol){read.plink}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){input.plink.file}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](str){bed}<LSEP>[argument 2; litteral](str){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){snp.all2}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){CHR}<LEND>[](symbol){chr}<LEND>[argument 2; litteral](str){RS}<LEND>[argument 2; call](){}<LSEP>[](symbol){(}<LSEP>[argument 0; litteral](str){-9}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){geno.kid}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){snpStats}<LSEP>[](symbol){read.plink}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){input.plink.file}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](str){bed}<LSEP>[argument 2; litteral](str){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){snp.all2}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){CHR}<LEND>[](symbol){chr}<LEND>[argument 2; litteral](str){RS}<LEND>[argument 2; call](){}<LSEP>[](symbol){(}<LSEP>[argument 0; litteral](str){-9}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){geno.mom}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){snpStats}<LSEP>[](symbol){read.plink}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){input.plink.file}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){bed}<LSEP>[argument 2; litteral](str){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){snp.all2}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){CHR}<LEND>[](symbol){chr}<LEND>[argument 2; litteral](str){RS}<LEND>[argument 2; call](){}<LSEP>[](symbol){(}<LSEP>[argument 0; litteral](str){-9}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){geno.dad}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){snpStats}<LSEP>[](symbol){read.plink}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){input.plink.file}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](str){bed}<LSEP>[argument 2; litteral](str){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){snp.all2}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){CHR}<LEND>[](symbol){chr}<LEND>[argument 2; litteral](str){RS}<LEND>[argument 2; call](){}<LSEP>[](symbol){(}<LSEP>[argument 0; litteral](str){-9}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){geno.kid}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){snpStats}<LSEP>[](symbol){read.plink}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){input.plink.file}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](str){bed}<LSEP>[argument 2; litteral](str){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){snp.all2}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){CHR}<LEND>[](symbol){chr}<LEND>[argument 2; litteral](str){RS}<LEND>[argument 2; call](){}<LSEP>[](symbol){(}<LSEP>[argument 0; litteral](str){-9}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){mom}<LEND>[call](){}<LSEP>[](symbol){@}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.mom}<LSEP>[](symbol){genotype}<LEND>[](symbol){.Data}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){mom}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mom}<LEND>[argument 1; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){mom}<LEND>[](symbol){}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){dad}<LEND>[call](){}<LSEP>[](symbol){@}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.dad}<LSEP>[](symbol){genotype}<LEND>[](symbol){.Data}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){dad}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dad}<LEND>[argument 1; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){dad}<LEND>[](symbol){}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){kid}<LEND>[call](){}<LSEP>[](symbol){@}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.kid}<LSEP>[](symbol){genotype}<LEND>[](symbol){.Data}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){kid}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){kid}<LEND>[argument 1; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){kid}<LEND>[](symbol){}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.mom}<LSEP>[](symbol){genotype}<LEND>[litteral](NULL){NULL}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){mom}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){mom}<LEND>[](symbol){F}<LEND>[argument 2; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){mom}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){dad}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){dad}<LEND>[](symbol){F}<LEND>[argument 2; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){mom}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){kid}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){kid}<LEND>[](symbol){F}<LEND>[argument 2; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){mom}<LEND>[statement 12; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mom}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){mom}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[litteral](logical){NA}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){mom}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){mom}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 14; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dad}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){dad}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[litteral](logical){NA}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){dad}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){dad}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 16; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){kid}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){kid}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[litteral](logical){NA}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){kid}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){kid}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 18; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){kid}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.kid}<LSEP>[](symbol){map}<LEND>[](symbol){allele.1}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.mom}<LSEP>[](symbol){map}<LEND>[](symbol){allele.1}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){kid}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.kid}<LSEP>[](symbol){map}<LEND>[](symbol){allele.1}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.mom}<LSEP>[](symbol){map}<LEND>[](symbol){allele.1}<LEND>[statement 19; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dad}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.dad}<LSEP>[](symbol){map}<LEND>[](symbol){allele.1}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.mom}<LSEP>[](symbol){map}<LEND>[](symbol){allele.1}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dad}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.dad}<LSEP>[](symbol){map}<LEND>[](symbol){allele.1}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.mom}<LSEP>[](symbol){map}<LEND>[](symbol){allele.1}<LEND>[statement 20; call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){geno.dad}<LSEP>[](symbol){geno.kid}<LEND>[statement 21; call](){}<LSEP>[](symbol){gc}<LEND>[statement 22; assign](){<-}<LSEP>[](symbol){triad45}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){222}<LSEP>[argument 1; litteral](str){212}<LSEP>[argument 2; litteral](str){211}<LSEP>[argument 3; litteral](str){122}<LSEP>[argument 4; litteral](str){121}<LSEP>[argument 5; litteral](str){201}<LSEP>[argument 6; litteral](str){021}<LSEP>[argument 7; litteral](str){112}<LSEP>[argument 8; litteral](str){111}<LSEP>[argument 9; litteral](str){110}<LSEP>[argument 10; litteral](str){101}<LSEP>[argument 11; litteral](str){100}<LSEP>[argument 12; litteral](str){011}<LSEP>[argument 13; litteral](str){010}<LSEP>[argument 14; litteral](str){000}<LSEP>[argument 15; litteral](str){NA22}<LSEP>[argument 16; litteral](str){NA12}<LSEP>[argument 17; litteral](str){NA11}<LSEP>[argument 18; litteral](str){NA22}<LSEP>[argument 19; litteral](str){NA21}<LSEP>[argument 20; litteral](str){NA01}<LSEP>[argument 21; litteral](str){NA21}<LSEP>[argument 22; litteral](str){NA12}<LSEP>[argument 23; litteral](str){NA11}<LSEP>[argument 24; litteral](str){NA10}<LSEP>[argument 25; litteral](str){NA01}<LSEP>[argument 26; litteral](str){NA00}<LSEP>[argument 27; litteral](str){NA11}<LSEP>[argument 28; litteral](str){NA10}<LSEP>[argument 29; litteral](str){NA00}<LSEP>[argument 30; litteral](str){2NA2}<LSEP>[argument 31; litteral](str){2NA2}<LSEP>[argument 32; litteral](str){2NA1}<LSEP>[argument 33; litteral](str){1NA2}<LSEP>[argument 34; litteral](str){1NA1}<LSEP>[argument 35; litteral](str){2NA1}<LSEP>[argument 36; litteral](str){0NA1}<LSEP>[argument 37; litteral](str){1NA2}<LSEP>[argument 38; litteral](str){1NA1}<LSEP>[argument 39; litteral](str){1NA0}<LSEP>[argument 40; litteral](str){1NA1}<LSEP>[argument 41; litteral](str){1NA0}<LSEP>[argument 42; litteral](str){0NA1}<LSEP>[argument 43; litteral](str){0NA0}<LSEP>[argument 44; litteral](str){0NA0}<LSEP>[argument 45; litteral](str){00NA}<LSEP>[argument 46; litteral](str){01NA}<LSEP>[argument 47; litteral](str){02NA}<LSEP>[argument 48; litteral](str){10NA}<LSEP>[argument 49; litteral](str){11NA}<LSEP>[argument 50; litteral](str){12NA}<LSEP>[argument 51; litteral](str){20NA}<LSEP>[argument 52; litteral](str){21NA}<LSEP>[argument 53; litteral](str){22NA}<LSEP>[argument 54; litteral](str){NANA2}<LSEP>[argument 55; litteral](str){NANA2}<LSEP>[argument 56; litteral](str){NANA1}<LSEP>[argument 57; litteral](str){NANA2}<LSEP>[argument 58; litteral](str){NANA1}<LSEP>[argument 59; litteral](str){NANA1}<LSEP>[argument 60; litteral](str){NANA1}<LSEP>[argument 61; litteral](str){NANA2}<LSEP>[argument 62; litteral](str){NANA1}<LSEP>[argument 63; litteral](str){NANA0}<LSEP>[argument 64; litteral](str){NANA1}<LSEP>[argument 65; litteral](str){NANA0}<LSEP>[argument 66; litteral](str){NANA1}<LSEP>[argument 67; litteral](str){NANA0}<LSEP>[argument 68; litteral](str){NANA0}<LSEP>[argument 69; litteral](str){2NANA}<LSEP>[argument 70; litteral](str){2NANA}<LSEP>[argument 71; litteral](str){2NANA}<LSEP>[argument 72; litteral](str){1NANA}<LSEP>[argument 73; litteral](str){1NANA}<LSEP>[argument 74; litteral](str){2NANA}<LSEP>[argument 75; litteral](str){0NANA}<LSEP>[argument 76; litteral](str){1NANA}<LSEP>[argument 77; litteral](str){1NANA}<LSEP>[argument 78; litteral](str){1NANA}<LSEP>[argument 79; litteral](str){1NANA}<LSEP>[argument 80; litteral](str){1NANA}<LSEP>[argument 81; litteral](str){0NANA}<LSEP>[argument 82; litteral](str){0NANA}<LSEP>[argument 83; litteral](str){0NANA}<LSEP>[argument 84; litteral](str){NA2NA}<LSEP>[argument 85; litteral](str){NA1NA}<LSEP>[argument 86; litteral](str){NA1NA}<LSEP>[argument 87; litteral](str){NA2NA}<LSEP>[argument 88; litteral](str){NA2NA}<LSEP>[argument 89; litteral](str){NA0NA}<LSEP>[argument 90; litteral](str){NA2NA}<LSEP>[argument 91; litteral](str){NA1NA}<LSEP>[argument 92; litteral](str){NA1NA}<LSEP>[argument 93; litteral](str){NA1NA}<LSEP>[argument 94; litteral](str){NA0NA}<LSEP>[argument 95; litteral](str){NA0NA}<LSEP>[argument 96; litteral](str){NA1NA}<LSEP>[argument 97; litteral](str){NA1NA}<LSEP>[argument 98; litteral](str){NA0NA}<LSEP>[argument 99; litteral](str){NANANA}<LEND>[statement 23; assign](){<-}<LSEP>[](symbol){mfc}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){mom}<LSEP>[](symbol){dad}<LSEP>[](symbol){kid}<LSEP>[argument 3; litteral](str){}<LEND>[statement 24; assign](){<-}<LSEP>[](symbol){mfc}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){mfc}<LSEP>[](symbol){triad45}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){mom}<LEND>[](symbol){F}<LEND>[statement 25; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mom}<LSEP>[](symbol){mfc}<LEND>[litteral](logical){NA}<LEND>[statement 26; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dad}<LSEP>[](symbol){mfc}<LEND>[litteral](logical){NA}<LEND>[statement 27; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){kid}<LSEP>[](symbol){mfc}<LEND>[litteral](logical){NA}<LEND>[statement 28; assign](){<-}<LSEP>[](symbol){comp}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){mom}<LSEP>[](symbol){dad}<LEND>[](symbol){kid}<LEND>[statement 29; assign](){<-}<LSEP>[](symbol){mom}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){mom}<LEND>[statement 30; assign](){<-}<LSEP>[](symbol){dad}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){dad}<LEND>[statement 31; assign](){<-}<LSEP>[](symbol){kid}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){kid}<LEND>[statement 32; assign](){<-}<LSEP>[](symbol){comp}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){comp}<LEND>[statement 33; assign](){<-}<LSEP>[](symbol){mom.all}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){mom.all}<LSEP>[](symbol){mom}<LSEP>[](symbol){mom}<LEND>[statement 34; call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){mom}<LEND>[statement 35; call](){}<LSEP>[](symbol){gc}<LEND>[statement 36; assign](){<-}<LSEP>[](symbol){dad.all}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){dad.all}<LSEP>[](symbol){dad}<LSEP>[](symbol){dad}<LEND>[statement 37; call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){dad}<LEND>[statement 38; call](){}<LSEP>[](symbol){gc}<LEND>[statement 39; assign](){<-}<LSEP>[](symbol){kid.all}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){kid.all}<LSEP>[](symbol){kid}<LSEP>[](symbol){comp}<LEND>[statement 40; call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){kid}<LSEP>[](symbol){comp}<LEND>[statement 41; call](){}<LSEP>[](symbol){gc}<LEND>[statement 42; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){pop}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){n.ped.pop1}<LEND>[call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){mom.all}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){mom}<LSEP>[](symbol){mom.all}<LEND>[statement 6; call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){mom.all}<LEND>[statement 7; call](){}<LSEP>[](symbol){gc}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){dad}<LSEP>[](symbol){dad.all}<LEND>[statement 9; call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){dad.all}<LEND>[statement 10; call](){}<LSEP>[](symbol){gc}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){kid}<LSEP>[](symbol){kid.all}<LEND>[statement 12; call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){kid.all}<LEND>[statement 13; call](){}<LSEP>[](symbol){gc}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){pop}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[true branch; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sel.fam.all}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){pop.vec}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sel.fam.all.org}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){pop.vec}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){}<LEND>[](symbol){n.ped.pop1}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){moms}<LSEP>[litteral](NULL){NULL}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){dads}<LSEP>[litteral](NULL){NULL}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){kids}<LSEP>[litteral](NULL){NULL}<LEND>[statement 18; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){no_cores}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){no_cores}<LEND>[call](){}<LSEP>[](symbol){ceiling}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){parallel}<LSEP>[](symbol){detectCores}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){cl}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){parallel}<LSEP>[](symbol){makeCluster}<LEND>[](symbol){no_cores}<LEND>[statement 20; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){doParallel}<LSEP>[](symbol){registerDoParallel}<LEND>[](symbol){cl}<LEND>[statement 21; assign](){<-}<LSEP>[](symbol){i}<LSEP>[litteral](NULL){NULL}<LEND>[statement 22; assign](){<-}<LSEP>[](symbol){geno.mfc}<LEND>[call](){}<LSEP>[](symbol){%dopar%}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){foreach}<LSEP>[](symbol){foreach}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n.ped}<LEND>[](symbol){rbind}<LEND>[argument 1; call](){}<LSEP>[](symbol){splice.chr}<LSEP>[](symbol){i}<LEND>[statement 23; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){parallel}<LSEP>[](symbol){stopCluster}<LEND>[](symbol){cl}<LEND>[statement 24; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){foreach}<LSEP>[](symbol){registerDoSEQ}<LEND>[statement 25; call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){mom}<LSEP>[](symbol){dad}<LSEP>[](symbol){kid}<LEND>[statement 26; call](){}<LSEP>[](symbol){gc}<LEND>[statement 27; assign](){<-}<LSEP>[](symbol){n.snp}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){geno.mfc}<LEND>[argument 1; litteral](real){3.000000}<LEND>[statement 28; assign](){<-}<LSEP>[](symbol){geno.all}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){geno.mfc}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n.snp}<LEND>[statement 29; assign](){<-}<LSEP>[](symbol){geno.all}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){geno.all}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){geno.mfc}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n.snp}<LEND>[](symbol){n.snp}<LEND>[statement 30; assign](){<-}<LSEP>[](symbol){geno.all}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){geno.all}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){geno.mfc}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n.snp}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){n.snp}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 31; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){geno.all}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){chr.pos}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){risk.chr}<LSEP>[](symbol){one.chr}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pathway.all}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){risk.chr}<LSEP>[](symbol){one.chr}<LEND>[statement 32; assign](){<-}<LSEP>[](symbol){geno.all}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[](symbol){geno.all}<LEND>[statement 33; assign](){<-}<LSEP>[](symbol){fam.all}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n.ped}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n.ped}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[](symbol){n.ped}<LEND>[argument 2; litteral](str){_}<LEND>[argument 2; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[](symbol){n.ped}<LEND>[argument 3; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[](symbol){n.ped}<LEND>[argument 4; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[](symbol){n.ped}<LEND>[argument 5; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[](symbol){n.ped}<LEND>[statement 34; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){fam.all}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){PID}<LSEP>[argument 1; litteral](str){UPN}<LSEP>[argument 2; litteral](str){MID}<LSEP>[argument 3; litteral](str){FID}<LSEP>[argument 4; litteral](str){Gender}<LSEP>[argument 5; litteral](str){Aff}<LEND>[statement 35; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){geno.all}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fam.all}<LSEP>[](symbol){UPN}<LEND>[statement 36; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){geno.all}<LEND>[call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){@}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.mom}<LSEP>[](symbol){genotype}<LEND>[](symbol){.Data}<LEND>[statement 37; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){geno.all}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){geno.all}<LEND>[litteral](real){0.000000}<LEND>[statement 38; assign](){<-}<LSEP>[](symbol){geno.all}<LEND>[call](){}<LSEP>[](symbol){new}<LSEP>[argument 0; litteral](str){SnpMatrix}<LSEP>[](symbol){geno.all}<LEND>[statement 39; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){snpStats}<LSEP>[](symbol){write.plink}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){out.put.file}<LSEP>[](symbol){chr}<LSEP>[argument 2; litteral](str){}<LEND>[argument 1; litteral](logical){TRUE}<LSEP>[](symbol){geno.all}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fam.all}<LSEP>[](symbol){PID}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fam.all}<LSEP>[](symbol){UPN}<LEND>[argument 5; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fam.all}<LSEP>[](symbol){FID}<LEND>[argument 6; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fam.all}<LSEP>[](symbol){MID}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fam.all}<LSEP>[](symbol){Gender}<LEND>[argument 8; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fam.all}<LSEP>[](symbol){Aff}<LEND>[argument 9; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.mom}<LSEP>[](symbol){map}<LEND>[](symbol){chromosome}<LEND>[argument 10; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.mom}<LSEP>[](symbol){map}<LEND>[](symbol){cM}<LEND>[argument 11; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.mom}<LSEP>[](symbol){map}<LEND>[](symbol){position}<LEND>[argument 12; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.mom}<LSEP>[](symbol){map}<LEND>[](symbol){allele.1}<LEND>[argument 13; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){geno.mom}<LSEP>[](symbol){map}<LEND>[](symbol){allele.2}<LEND>[argument 14; litteral](real){0.000000}<LEND>[statement 40; call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){geno.all}<LSEP>[](symbol){geno.mom}<LEND>[statement 41; call](){}<LSEP>[](symbol){gc}<LEND>[assign](){<-}<LSEP>[](symbol){TriadSim}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){input.plink.file}<LSEP>[](symbol){out.put.file}<LSEP>[](symbol){fr.desire}<LSEP>[](symbol){pathways}<LSEP>[](symbol){n.ped}<LSEP>[](symbol){N.brk}<LSEP>[](symbol){target.snp}<LSEP>[](symbol){P0}<LSEP>[](symbol){is.OR}<LSEP>[](symbol){risk.exposure}<LSEP>[](symbol){risk.pathway.unexposed}<LSEP>[](symbol){risk.pathway.exposed}<LSEP>[](symbol){is.case}<LSEP>[](symbol){e.fr}<LSEP>[](symbol){pop1.frac}<LSEP>[](symbol){P0.ratio}<LSEP>[](symbol){rcmb.rate}<LSEP>[](symbol){no_cores}<LSEP>[](symbol){qtl}<LSEP>[](symbol){same.brk}<LSEP>[](symbol){flip}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){RR2OR}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){RR}<LSEP>[](symbol){P0}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){RR}<LSEP>[](symbol){P0}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Risk >1}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){OR}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){RR}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){P0}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){RR}<LSEP>[](symbol){P0}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){log}<LSEP>[](symbol){OR}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){beta0}<LEND>[call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){P0}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){P0}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){is.OR}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){betas.e0}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){beta0}<LEND>[argument 1; call](){}<LSEP>[](symbol){RR2OR}<LSEP>[](symbol){risk.pathway.unexposed}<LSEP>[](symbol){P0}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){e.fr}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){betas.e1}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){beta0}<LEND>[argument 1; call](){}<LSEP>[](symbol){RR2OR}<LSEP>[](symbol){risk.exposure}<LSEP>[](symbol){P0}<LEND>[argument 1; call](){}<LSEP>[](symbol){RR2OR}<LSEP>[](symbol){risk.pathway.exposed}<LSEP>[](symbol){P0}<LEND>[false branch; assign](){<-}<LSEP>[](symbol){betas.e1}<LSEP>[litteral](logical){NA}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){betas.e0}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){beta0}<LEND>[argument 1; call](){}<LSEP>[](symbol){log}<LSEP>[](symbol){risk.pathway.unexposed}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){e.fr}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){betas.e1}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){beta0}<LEND>[argument 1; call](){}<LSEP>[](symbol){log}<LSEP>[](symbol){risk.exposure}<LEND>[argument 1; call](){}<LSEP>[](symbol){log}<LSEP>[](symbol){risk.pathway.exposed}<LEND>[false branch; assign](){<-}<LSEP>[](symbol){betas.e1}<LSEP>[litteral](logical){NA}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){P0}<LSEP>[](symbol){P0.ratio}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){The baseline disease prevalenc...}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){rate.beta}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){P0}<LSEP>[](symbol){P0.ratio}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){P0}<LSEP>[](symbol){P0.ratio}<LEND>[](symbol){beta0}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){input.plink.file}<LEND>[argument 1; litteral](real){2.000000}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){two.pop}<LSEP>[](symbol){T}<LEND>[false branch; assign](){<-}<LSEP>[](symbol){two.pop}<LSEP>[](symbol){F}<LEND>[statement 6; control flow](){if}<LSEP>[](symbol){two.pop}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){file1}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){input.plink.file}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[false branch; assign](){<-}<LSEP>[](symbol){file1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){input.plink.file}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){target.snp}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){n.snp}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){unlist}<LSEP>[](symbol){pathways}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){pick.snp}<LEND>[call](){}<LSEP>[](symbol){pick_target.snp}<LSEP>[](symbol){file1}<LSEP>[](symbol){fr.desire}<LSEP>[](symbol){n.snp}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){snp.all2}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){pick.snp}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){target.snp}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){pick.snp}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){order}<LSEP>[](symbol){target.snp}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){target.snp}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Target SNPs are not in the cor...}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){two.pop}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tar.geno}<LEND>[call](){}<LSEP>[](symbol){get.target.geno}<LSEP>[](symbol){input.plink.file}<LSEP>[](symbol){target.snp}<LSEP>[](symbol){snp.all2}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){mom.tar}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tar.geno}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){dad.tar}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tar.geno}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){kid.tar}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tar.geno}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tar.geno}<LEND>[call](){}<LSEP>[](symbol){get.target.geno}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){input.plink.file}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){target.snp}<LSEP>[](symbol){snp.all2}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){mom1.tar}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tar.geno}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){dad1.tar}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tar.geno}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){kid1.tar}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tar.geno}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){tar.geno}<LEND>[call](){}<LSEP>[](symbol){get.target.geno}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){input.plink.file}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){target.snp}<LSEP>[](symbol){snp.all2}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){mom2.tar}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tar.geno}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){dad2.tar}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tar.geno}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){kid2.tar}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tar.geno}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){mom.tar}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){mom1.tar}<LSEP>[](symbol){mom2.tar}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){dad.tar}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){dad1.tar}<LSEP>[](symbol){dad2.tar}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){kid.tar}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){kid1.tar}<LSEP>[](symbol){kid2.tar}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){brks}<LEND>[call](){}<LSEP>[](symbol){get.brks}<LSEP>[](symbol){N.brk}<LSEP>[](symbol){n.ped}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){target.snp}<LSEP>[](symbol){rcmb.rate}<LSEP>[](symbol){same.brk}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){fam.pos}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){brks}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){brks}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){brks}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){fit.risk}<LEND>[call](){}<LSEP>[](symbol){fit.risk.model.par}<LSEP>[](symbol){n.ped}<LSEP>[](symbol){brks}<LSEP>[](symbol){target.snp}<LSEP>[](symbol){fam.pos}<LSEP>[](symbol){mom.tar}<LSEP>[](symbol){dad.tar}<LSEP>[](symbol){kid.tar}<LSEP>[](symbol){pathways}<LSEP>[](symbol){betas.e0}<LSEP>[](symbol){e.fr}<LSEP>[](symbol){betas.e1}<LSEP>[](symbol){pop1.frac}<LSEP>[](symbol){rate.beta}<LSEP>[](symbol){is.case}<LSEP>[](symbol){qtl}<LSEP>[](symbol){out.put.file}<LSEP>[](symbol){no_cores}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){sel.fam.all}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){fit.risk}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){pathway.all}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){fit.risk}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){e.vec}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){fit.risk}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){pop.vec}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){fit.risk}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[statement 17; call](){}<LSEP>[](symbol){glue.chr.segment.par}<LSEP>[](symbol){input.plink.file}<LSEP>[](symbol){out.put.file}<LSEP>[](symbol){brks}<LSEP>[](symbol){sel.fam.all}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){pathway.all}<LSEP>[](symbol){target.snp}<LSEP>[](symbol){pop.vec}<LSEP>[](symbol){no_cores}<LSEP>[](symbol){flip} |
[](){expression}<LSEP>[litteral](str){snp.all2}<LSEP>[litteral](str){rcmb.rate} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){TriadSim}<LEND>[assign](){<-}<LSEP>[](symbol){m.file}<LEND>[call](){}<LSEP>[](symbol){file.path}<LEND>[argument 0; call](){}<LSEP>[](symbol){system.file}<LSEP>[argument 0; litteral](str){TriadSim}<LEND>[argument 1; litteral](str){extdata/pop1_4chr_mom}<LEND>[assign](){<-}<LSEP>[](symbol){f.file}<LEND>[call](){}<LSEP>[](symbol){file.path}<LEND>[argument 0; call](){}<LSEP>[](symbol){system.file}<LSEP>[argument 0; litteral](str){TriadSim}<LEND>[argument 1; litteral](str){extdata/pop1_4chr_dad}<LEND>[assign](){<-}<LSEP>[](symbol){k.file}<LEND>[call](){}<LSEP>[](symbol){file.path}<LEND>[argument 0; call](){}<LSEP>[](symbol){system.file}<LSEP>[argument 0; litteral](str){TriadSim}<LEND>[argument 1; litteral](str){extdata/pop1_4chr_kid}<LEND>[assign](){<-}<LSEP>[](symbol){input.plink.file}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){m.file}<LSEP>[](symbol){f.file}<LSEP>[](symbol){k.file}<LEND>[call](){}<LSEP>[](symbol){TriadSim}<LSEP>[](symbol){input.plink.file}<LEND>[argument 1; call](){}<LSEP>[](symbol){file.path}<LEND>[argument 0; call](){}<LSEP>[](symbol){tempdir}<LEND>[argument 1; litteral](str){triad}<LEND>[argument 2; litteral](real){0.050000}<LEND>[argument 3; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){5.000000}<LSEP>[argument 1; litteral](real){8.000000}<LEND>[argument 4; litteral](real){1000.000000}<LSEP>[argument 5; litteral](real){3.000000}<LSEP>[argument 6; litteral](logical){NA}<LSEP>[argument 7; litteral](real){0.001000}<LSEP>[argument 8; litteral](logical){FALSE}<LSEP>[argument 9; litteral](real){1.000000}<LEND>[argument 10; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.500000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 11; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.500000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 12; litteral](logical){TRUE}<LSEP>[argument 13; litteral](logical){NA}<LSEP>[argument 14; litteral](logical){NA}<LSEP>[argument 15; litteral](real){1.000000}<LSEP>[](symbol){rcmb.rate}<LSEP>[argument 17; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){m.file}<LEND>[call](){}<LSEP>[](symbol){file.path}<LEND>[argument 0; call](){}<LSEP>[](symbol){system.file}<LSEP>[argument 0; litteral](str){TriadSim}<LEND>[argument 1; litteral](str){extdata/pop1_4chr_mom}<LEND>[assign](){<-}<LSEP>[](symbol){f.file}<LEND>[call](){}<LSEP>[](symbol){file.path}<LEND>[argument 0; call](){}<LSEP>[](symbol){system.file}<LSEP>[argument 0; litteral](str){TriadSim}<LEND>[argument 1; litteral](str){extdata/pop1_4chr_dad}<LEND>[assign](){<-}<LSEP>[](symbol){picked.target}<LEND>[call](){}<LSEP>[](symbol){pick_target.snp}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){m.file}<LSEP>[](symbol){f.file}<LEND>[argument 1; litteral](real){0.050000}<LSEP>[argument 2; litteral](real){8.000000}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Target SNPs picked:}<LEND>[argument 1; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){picked.target}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 2; litteral](str){\n}<LEND>[assign](){<-}<LSEP>[](symbol){target.snp}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){picked.target}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){m.file}<LEND>[call](){}<LSEP>[](symbol){file.path}<LEND>[argument 0; call](){}<LSEP>[](symbol){system.file}<LSEP>[argument 0; litteral](str){TriadSim}<LEND>[argument 1; litteral](str){extdata/pop1_4chr_mom}<LEND>[assign](){<-}<LSEP>[](symbol){f.file}<LEND>[call](){}<LSEP>[](symbol){file.path}<LEND>[argument 0; call](){}<LSEP>[](symbol){system.file}<LSEP>[argument 0; litteral](str){TriadSim}<LEND>[argument 1; litteral](str){extdata/pop1_4chr_dad}<LEND>[assign](){<-}<LSEP>[](symbol){k.file}<LEND>[call](){}<LSEP>[](symbol){file.path}<LEND>[argument 0; call](){}<LSEP>[](symbol){system.file}<LSEP>[argument 0; litteral](str){TriadSim}<LEND>[argument 1; litteral](str){extdata/pop1_4chr_kid}<LEND>[assign](){<-}<LSEP>[](symbol){target.geno}<LEND>[call](){}<LSEP>[](symbol){get.target.geno}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){m.file}<LSEP>[](symbol){f.file}<LSEP>[](symbol){k.file}<LEND>[](symbol){target.snp}<LSEP>[](symbol){snp.all2}<LEND>[assign](){<-}<LSEP>[](symbol){found.brks}<LEND>[call](){}<LSEP>[](symbol){get.brks}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[argument 1; litteral](real){1000.000000}<LSEP>[](symbol){snp.all2}<LSEP>[](symbol){target.snp}<LSEP>[](symbol){rcmb.rate}<LEND>[assign](){<-}<LSEP>[](symbol){breaks}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){found.brks}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){family.position}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){found.brks}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){breaks}<LEND>[call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){breaks}<LEND>[call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){family.position}<LEND>[call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){family.position} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){BysmxHPD}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){m}<LSEP>[](symbol){tmax}<LSEP>[](symbol){t}<LSEP>[](symbol){group}<LSEP>[](symbol){chains}<LSEP>[](symbol){iter}<LSEP>[](symbol){out}<LSEP>[](symbol){data}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){timepoints}<LSEP>[](symbol){t}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){gendergrp}<LSEP>[](symbol){group}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){w1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){m}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){w2}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){m}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){m}<LEND>[](symbol){tmax}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){data1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){w1}<LSEP>[](symbol){w2}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){data2}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){w1}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){data1.imp}<LEND>[call](){}<LSEP>[](symbol){missForest}<LSEP>[](symbol){data1}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){data1}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data1.imp}<LSEP>[](symbol){ximp}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){data2}<LSEP>[](symbol){data1}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){var1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[](symbol){timepoints}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){dmat}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 11; assign](){=}<LSEP>[](symbol){rlt}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[statement 12; control flow](){for}<LSEP>[](symbol){k}<LSEP>[](symbol){m}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){m1}<LSEP>[](symbol){k}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){m2}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[](symbol){tmax}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){Distance}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){m1}<LSEP>[](symbol){m2}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){Distance}<LEND>[litteral](NULL){NULL}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){mn}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){m1}<LSEP>[](symbol){m2}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){var1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){var1}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){mn}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){var2}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[](symbol){gendergrp}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){mdata}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.001000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.000000}<LSEP>[argument 3; litteral](real){0.001000}<LEND>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[](symbol){var2}<LSEP>[](symbol){var1}<LSEP>[](symbol){Distance}<LEND>[argument 5; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){data}<LEND>[](symbol){mn}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){mixedmodinslp}<LEND>[](){function}<LSEP>[parameters; litteral](NULL){NULL}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){N}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){MN}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Distance}<LSEP>[](symbol){i}<LSEP>[](symbol){j}<LEND>[argument 1; call](){}<LSEP>[](symbol){dnorm}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){m}<LSEP>[](symbol){i}<LSEP>[](symbol){j}<LEND>[](symbol){tau}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){m}<LSEP>[](symbol){i}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){b}<LSEP>[](symbol){i}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){b}<LSEP>[](symbol){i}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){a1}<LSEP>[](symbol){j}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){a2}<LSEP>[](symbol){i}<LEND>[statement 1; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){N}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){b}<LSEP>[](symbol){i}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){dmnorm}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mu0}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){prec}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){prec}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){dwish}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){R}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 3; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){dnorm}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.000100}<LEND>[statement 4; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){tau}<LEND>[argument 1; call](){}<LSEP>[](symbol){dgamma}<LSEP>[argument 0; litteral](real){0.000100}<LSEP>[argument 1; litteral](real){0.000100}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){sigma}<LEND>[call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){tau}<LSEP>[](symbol){tau}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){inits}<LEND>[](){function}<LSEP>[parameters; litteral](NULL){NULL}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.001000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.000000}<LSEP>[argument 3; litteral](real){0.001000}<LEND>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[statement 10; assign](){=}<LSEP>[](symbol){param}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){tau}<LSEP>[argument 1; litteral](str){sigma}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){v1.sim.rem1}<LEND>[call](){}<LSEP>[](symbol){jags}<LSEP>[](symbol){mdata}<LSEP>[](symbol){inits}<LSEP>[](symbol){mixedmodinslp}<LSEP>[](symbol){param}<LSEP>[](symbol){chains}<LSEP>[](symbol){iter}<LEND>[argument 6; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){iter}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 12; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){rlt}<LSEP>[](symbol){k}<LEND>[](symbol){v1.sim.rem1}<LEND>[statement 13; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){out}<LSEP>[argument 1; litteral](str){DIC}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){dic.var}<LEND>[call](){}<LSEP>[](symbol){DIC}<LSEP>[](symbol){v1.sim.rem1}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){var.na}<LEND>[call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){k}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){dic.data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){var.na}<LSEP>[](symbol){dic.var}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){dmat}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){dmat}<LSEP>[](symbol){dic.data}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){ra}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){dmat}<LEND>[statement 14; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){out}<LSEP>[argument 1; litteral](str){DIC}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){ra}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Variable}<LSEP>[argument 1; litteral](str){DIC}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){result}<LSEP>[](symbol){ra}<LEND>[statement 15; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){out}<LSEP>[argument 1; litteral](str){hpD}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){result}<LSEP>[](symbol){rlt}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){result}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){result}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){result}<LSEP>[](symbol){is.null}<LEND>[statement 16; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){result}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){utils}<LSEP>[](symbol){globalVariables}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){b}<LSEP>[argument 1; litteral](str){tau}<LSEP>[argument 2; litteral](str){Male}<LSEP>[argument 3; litteral](str){MN}<LSEP>[argument 4; litteral](str){N}<LSEP>[argument 5; litteral](str){a1}<LSEP>[argument 6; litteral](str){a2} |
[](){expression}<LSEP>[litteral](str){msrep} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){creg}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){m}<LSEP>[](symbol){n}<LSEP>[](symbol){chains}<LSEP>[](symbol){n.adapt}<LSEP>[](symbol){data}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){Age}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Age}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){Distance}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){m}<LSEP>[](symbol){n}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){Distance}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){m}<LSEP>[](symbol){n}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){Distance}<LEND>[litteral](NULL){NULL}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){Age}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){Distance}<LEND>[statement 5; assign](){=}<LSEP>[](symbol){R}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.001000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.000000}<LSEP>[argument 3; litteral](real){0.000000}<LSEP>[argument 4; litteral](real){0.000000}<LSEP>[argument 5; litteral](real){0.001000}<LSEP>[argument 6; litteral](real){0.000000}<LSEP>[argument 7; litteral](real){0.000000}<LSEP>[argument 8; litteral](real){0.000000}<LSEP>[argument 9; litteral](real){0.000000}<LSEP>[argument 10; litteral](real){0.001000}<LSEP>[argument 11; litteral](real){0.000000}<LSEP>[argument 12; litteral](real){0.000000}<LSEP>[argument 13; litteral](real){0.000000}<LSEP>[argument 14; litteral](real){0.000000}<LSEP>[argument 15; litteral](real){0.001000}<LEND>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){4.000000}<LEND>[statement 6; assign](){=}<LSEP>[](symbol){inits}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.001000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.000000}<LSEP>[argument 3; litteral](real){0.000000}<LSEP>[argument 4; litteral](real){0.000000}<LSEP>[argument 5; litteral](real){0.001000}<LSEP>[argument 6; litteral](real){0.000000}<LSEP>[argument 7; litteral](real){0.000000}<LSEP>[argument 8; litteral](real){0.000000}<LSEP>[argument 9; litteral](real){0.000000}<LSEP>[argument 10; litteral](real){0.001000}<LSEP>[argument 11; litteral](real){0.000000}<LSEP>[argument 12; litteral](real){0.000000}<LSEP>[argument 13; litteral](real){0.000000}<LSEP>[argument 14; litteral](real){0.000000}<LSEP>[argument 15; litteral](real){0.001000}<LEND>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){4.000000}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){mdata}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){Age}<LSEP>[](symbol){R}<LSEP>[](symbol){Distance}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){mvnreg}<LSEP>[litteral](str){\n model{\n for(i in 1:16){...}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){mvnreg.spec}<LEND>[call](){}<LSEP>[](symbol){textConnection}<LSEP>[](symbol){mvnreg}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){jags.reg}<LEND>[call](){}<LSEP>[](symbol){jags.model}<LSEP>[](symbol){mvnreg.spec}<LSEP>[](symbol){mdata}<LSEP>[](symbol){chains}<LSEP>[](symbol){n.adapt}<LEND>[statement 11; call](){}<LSEP>[](symbol){update}<LSEP>[](symbol){jags.reg}<LSEP>[](symbol){n.adapt}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){reg.sam}<LEND>[call](){}<LSEP>[](symbol){jags.samples}<LSEP>[](symbol){jags.reg}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){rateB}<LSEP>[argument 1; litteral](str){rateG}<LSEP>[argument 2; litteral](str){test}<LEND>[](symbol){n.adapt}<LEND>[statement 13; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){reg.sam}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){utils}<LSEP>[](symbol){globalVariables}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){inverse}<LSEP>[argument 1; litteral](str){precision}<LSEP>[argument 2; litteral](str){step}<LSEP>[argument 3; litteral](str){jags}<LSEP>[argument 4; litteral](str){update} |
Subsets and Splits