lm.trainAndTest.ggplot: Create a data.table for actual v fitted, with train and test...

Description Usage Arguments Examples

View source: R/lm.trainAndTest.ggplot.R

Description

Takes a lm object and outputs an actual vs fitted table.

Usage

1
lm.trainAndTest.ggplot(lm.trainAndTest.object)

Arguments

lm.trainAndTest.object

The output of lm.trainAndTest.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
x <- data.table::fread(system.file("extdata", "lm.csv", package = "nladwa"))
x[, Week := excelDateToRDate(Week)]

x <- TrainAndTest.break(x, "TotalGrossLeads", to.break = "2015-04-06", append = TRUE)
# 06/04/2015

lm1 <- lm(TotalGrossLeads.Train ~ Search.Spend + Competitor.Spend, data = x)
lm1.trainAndTest <- lm.trainAndTest(lm.object = lm1, date.index = "Week")
print(lm1.trainAndTest)

lm.trainAndTest.ggplot(lm1.trainAndTest)
lm.trainAndTest.resid.ggplot(lm1.trainAndTest)

MAPE.trainAndTest(lm1.trainAndTest)

Braja93/braja documentation built on June 1, 2017, 5:19 p.m.