File: interaction-plot.Rd

package info (click to toggle)
r-cran-doby 4.7.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,400 kB
  • sloc: makefile: 2
file content (34 lines) | stat: -rw-r--r-- 968 bytes parent folder | download
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
34
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_functions.r
\name{interaction-plot}
\alias{interaction-plot}
\alias{interaction_plot}
\title{Two-way interaction plot}
\usage{
interaction_plot(.data, .formula, interval = "conf.int")
}
\arguments{
\item{.data}{A data frame}

\item{.formula}{A formula of the form \code{y ~ x1 + x2}}

\item{interval}{Either \code{conf.int}, \code{boxplot} or \code{none}}
}
\description{
Plots the mean of the response for
two-way combinations of factors, thereby illustrating possible
interactions.
}
\note{
This is a recent addition to the package and is subject to change.
}
\examples{

income$educf <- cut(income$educ, breaks=3)
income |> interaction_plot(inc ~ race + educf)
income |> interaction_plot(inc ~ race + educf, interval="conf.int")
income |> interaction_plot(inc ~ race + educf, interval="boxplot")
income |> interaction_plot(inc ~ race + educf, interval="none")

}
\concept{plotting}