-
-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathfortify.MSM.lm.Rd
33 lines (30 loc) · 891 Bytes
/
fortify.MSM.lm.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fortify_MSwM.R
\name{fortify.MSM.lm}
\alias{fortify.MSM.lm}
\title{Convert \code{MSwM::MSM.lm} to \code{data.frame}}
\usage{
\method{fortify}{MSM.lm}(model, data = NULL, melt = FALSE, ...)
}
\arguments{
\item{model}{\code{MSwM::MSM.lm} instance}
\item{data}{original dataset, if needed}
\item{melt}{Logical flag indicating whether to melt each models}
\item{...}{other arguments passed to methods}
}
\value{
data.frame
}
\description{
Convert \code{MSwM::MSM.lm} to \code{data.frame}
}
\examples{
\dontrun{
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))
fortify(d.mswm)
}
}