Database Reference
In-Depth Information
Estimate Std. Error t value Pr(>|t|)
(Intercept) -154.128 4.129 -37.33 <2e-16 ***
sales$num_of_orders 166.221 1.462 113.66 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' '
1
Residual standard error: 210.8 on 9998 degrees of freedom
Multiple R-squared: 0.5637, Adjusted R-squared: 0.5637
F-statistic: 1.292e+04 on 1 and 9998 DF, p-value: < 2.2e-16
The summary() function is an example of a generic function. A generic
function is a group of functions sharing the same name but behaving differently
depending on the number and the type of arguments they receive. Utilized
previously, plot() is another example of a generic function; the plot is
determined by the passed variables. Generic functions are used throughout this
chapter and the topic. In the final portion of the example, the following R code uses
the generic function hist() to generate a histogram ( Figure 3.2 ) of the residuals
stored in results . The function call illustrates that optional parameter values can
be passed. In this case, the number of breaks is specified to observe the large
residuals.
# perform some diagnostics on the fitted model
# plot histogram of the residuals
hist(results$residuals, breaks = 800)
Figure 3.2 Evidence of large residuals
This simple example illustrates a few of the basic model planning and building
tasks that may occur in Phases 3 and 4 of the Data Analytics Lifecycle. Throughout
Search WWH ::




Custom Search