autoplot.MSM.lm: Autoplot 'MSwM::MSM.lm'

Description Usage Arguments Value Examples

View source: R/fortify_MSwM.R

Description

Autoplot MSwM::MSM.lm

Usage

1
2
3
## S3 method for class 'MSM.lm'
autoplot(object, prob.colour = "#FF0000",
  prob.linetype = "dashed", ...)

Arguments

object

MSwM::MSM.lm instance

prob.colour

Line colour for probabilities

prob.linetype

Line type for probabilities

...

other arguments passed to autoplot.ts

Value

ggplot

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
library(MSwM)
d <- data.frame(Data = c(rnorm(50, mean = -10), rnorm(50, mean = 10)),
                exog = cos(seq(-pi/2, pi/2, length.out = 100)))
d.mswm <- MSwM::msmFit(lm(Data ~.-1, data = d), k=2, sw=rep(TRUE, 2),
                       control = list(parallelization = FALSE))
autoplot(d.mswm)

## End(Not run)

sinhrks/ggfortify documentation built on May 26, 2018, 6:24 p.m.