Difference between revisions of "Worksheets/Week3"
Jump to navigation
Jump to search
Kevin Dunn (talk | contribs) |
Kevin Dunn (talk | contribs) |
||
Line 10: | Line 10: | ||
mod.siderxn <- lm(y ~ A + B + A*B) | mod.siderxn <- lm(y ~ A + B + A*B) | ||
summary(mod.siderxn) | summary(mod.siderxn) | ||
library(pid) | #library(pid) | ||
source('https://yint.org/contourPlot.R') | |||
#source('https://yint.org/paretoPlot.R') | |||
contourPlot(mod.siderxn) | contourPlot(mod.siderxn) | ||
interaction.plot(A, B, y) | interaction.plot(A, B, y) |
Revision as of 20:23, 9 March 2019
Part 1
# Create the design matrix in a quick way in R
A <- c(-1, +1, -1, +1)
B <- c(-1, -1, +1, +1)
y <- c(89, 268, 179, 448)
mod.siderxn <- lm(y ~ A + B + A*B)
summary(mod.siderxn)
#library(pid)
source('https://yint.org/contourPlot.R')
#source('https://yint.org/paretoPlot.R')
contourPlot(mod.siderxn)
interaction.plot(A, B, y)
interaction.plot(B, A, y)