A data frame containing the impact of three advertising medias (youtube, facebook and newspaper) on sales. Data are the advertising budget in thousands of dollars along with the sales (in thousands of units). The advertising experiment has been repeated 200 times. This is a simulated data.

It is the data set used in the Datanovia tutorial “Multiple Linear Regression in R: Several Predictors” (https://www.datanovia.com/learn/biostatistics/regression/multiple-linear-regression-in-r).

data("marketing")

Format

A data frame with 200 rows and 4 columns.

youtube

the advertising budget spent on YouTube, in thousands of dollars.

facebook

the advertising budget spent on Facebook, in thousands of dollars.

newspaper

the advertising budget spent on newspaper, in thousands of dollars.

sales

the sales generated, in thousands of units.

Source

A simulated dataset for teaching multiple linear regression.

Examples

data(marketing)
res.lm <- lm(sales ~ youtube*facebook, data = marketing)
summary(res.lm)
#> 
#> Call:
#> lm(formula = sales ~ youtube * facebook, data = marketing)
#> 
#> Residuals:
#>     Min      1Q  Median      3Q     Max 
#> -7.6039 -0.4833  0.2197  0.7137  1.8295 
#> 
#> Coefficients:
#>                   Estimate Std. Error t value Pr(>|t|)    
#> (Intercept)      8.100e+00  2.974e-01  27.233   <2e-16 ***
#> youtube          1.910e-02  1.504e-03  12.699   <2e-16 ***
#> facebook         2.886e-02  8.905e-03   3.241   0.0014 ** 
#> youtube:facebook 9.054e-04  4.368e-05  20.727   <2e-16 ***
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> 
#> Residual standard error: 1.132 on 196 degrees of freedom
#> Multiple R-squared:  0.9678,	Adjusted R-squared:  0.9673 
#> F-statistic:  1963 on 3 and 196 DF,  p-value: < 2.2e-16
#>