Your report title
result <- regress(
Ebooks,
rvar = "Age",
evar = c(
"Item", "Gender", "AverageHouseholdIncome",
"ZipCode", "Audience",
"LendingPeriod", "BorrowedFrom"
)
)
summary(
result,
sum_check = c("rmse", "sumsquares", "vif", "confint")
)
Linear regression (OLS)
Data : Ebooks
Response variable : Age
Explanatory variables: Item, Gender, AverageHouseholdIncome, ZipCode, Audience, LendingPeriod, BorrowedFrom
Null hyp.: the effect of x on Age is zero
Alt. hyp.: the effect of x on Age is not zero
coefficient std.error t.value p.value
(Intercept) -660.840 614.973 -1.075 0.284
Item -0.003 0.327 -0.011 0.992
Gender|M -1.532 2.424 -0.632 0.528
AverageHouseholdIncome 0.000 0.000 2.095 0.037 *
ZipCode 0.007 0.006 1.112 0.268
Audience|Juvenile Fiction -4.090 3.793 -1.078 0.282
LendingPeriod 0.514 0.184 2.791 0.006 **
BorrowedFrom|Kids' eReading Room -10.555 12.275 -0.860 0.391
BorrowedFrom|Libby -4.253 11.219 -0.379 0.705
BorrowedFrom|Main collection 6.286 12.340 0.509 0.611
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
R-squared: 0.102, Adjusted R-squared: 0.062
F-statistic: 2.586 df(9,206), p.value 0.008
Nr obs: 216
Prediction error (RMSE): 15.128
Residual st.dev (RSD): 15.491
Sum of squares:
df SS
Regression 9 5,585.583
Error 206 49,432.417
Total 215 55,018.000
Variance Inflation Factors
BorrowedFrom ZipCode Item LendingPeriod Gender Audience
VIF 1.190 1.137 1.068 1.068 1.061 1.039
Rsq 0.159 0.121 0.063 0.063 0.058 0.038
AverageHouseholdIncome
VIF 1.029
Rsq 0.028
coefficient 2.5% 97.5% +/-
(Intercept) -660.840 -1873.289 551.608 1212.449
Item -0.003 -0.649 0.642 0.646
Gender|M -1.532 -6.312 3.248 4.780
AverageHouseholdIncome 0.000 0.000 0.000 0.000
ZipCode 0.007 -0.005 0.019 0.012
Audience|Juvenile Fiction -4.090 -11.568 3.389 7.478
LendingPeriod 0.514 0.151 0.876 0.363
BorrowedFrom|Kids' eReading Room -10.555 -34.755 13.645 24.200
BorrowedFrom|Libby -4.253 -26.371 17.865 22.118
BorrowedFrom|Main collection 6.286 -18.042 30.614 24.328
plot(result, plots = "dashboard", lines = c("line", "loess"), nrobs = -1, custom = FALSE)

Ebooks <- store(Ebooks, result, name = "Resids")
result <- regress(
Ebooks,
rvar = "Age",
evar = c(
"Item", "Gender", "AverageHouseholdIncome",
"ZipCode", "Audience",
"LendingPeriod", "BorrowedFrom"
),
check = "stepwise-backward"
)
Start: AIC=1193.55
Age ~ Item + Gender + AverageHouseholdIncome + ZipCode + Audience +
LendingPeriod + BorrowedFrom
Df Sum of Sq RSS AIC
- Item 1 0.03 49432 1191.5
- Gender 1 95.79 49528 1192.0
- Audience 1 278.97 49711 1192.8
- ZipCode 1 296.49 49729 1192.8
- BorrowedFrom 3 1382.89 50815 1193.5
<none> 49432 1193.5
- AverageHouseholdIncome 1 1053.04 50485 1196.1
- LendingPeriod 1 1869.64 51302 1199.6
Step: AIC=1191.55
Age ~ Gender + AverageHouseholdIncome + ZipCode + Audience +
LendingPeriod + BorrowedFrom
Df Sum of Sq RSS AIC
- Gender 1 96.36 49529 1190.0
- Audience 1 285.31 49718 1190.8
- ZipCode 1 298.69 49731 1190.8
- BorrowedFrom 3 1382.97 50815 1191.5
<none> 49432 1191.5
- AverageHouseholdIncome 1 1057.16 50490 1194.1
- LendingPeriod 1 1870.64 51303 1197.6
Step: AIC=1189.97
Age ~ AverageHouseholdIncome + ZipCode + Audience + LendingPeriod +
BorrowedFrom
Df Sum of Sq RSS AIC
- Audience 1 267.2 49796 1189.1
- ZipCode 1 306.5 49835 1189.3
- BorrowedFrom 3 1370.8 50900 1189.9
<none> 49529 1190.0
- AverageHouseholdIncome 1 1001.2 50530 1192.3
- LendingPeriod 1 2072.7 51602 1196.8
Step: AIC=1189.13
Age ~ AverageHouseholdIncome + ZipCode + LendingPeriod + BorrowedFrom
Df Sum of Sq RSS AIC
- ZipCode 1 364.08 50160 1188.7
- BorrowedFrom 3 1389.04 51185 1189.1
<none> 49796 1189.1
- AverageHouseholdIncome 1 1019.82 50816 1191.5
- LendingPeriod 1 2044.18 51840 1195.8
Step: AIC=1188.7
Age ~ AverageHouseholdIncome + LendingPeriod + BorrowedFrom
Df Sum of Sq RSS AIC
<none> 50160 1188.7
- AverageHouseholdIncome 1 1027.8 51188 1191.1
- BorrowedFrom 3 2021.5 52182 1191.2
- LendingPeriod 1 1944.6 52105 1194.9
summary(
result,
sum_check = c("rmse", "sumsquares", "vif", "confint")
)
----------------------------------------------------
Backward stepwise selection of variables
----------------------------------------------------
Linear regression (OLS)
Data : Ebooks
Response variable : Age
Explanatory variables: Item, Gender, AverageHouseholdIncome, ZipCode, Audience, LendingPeriod, BorrowedFrom
Null hyp.: the effect of x on Age is zero
Alt. hyp.: the effect of x on Age is not zero
coefficient std.error t.value p.value
(Intercept) 17.790 12.898 1.379 0.169
AverageHouseholdIncome 0.000 0.000 2.074 0.039 *
LendingPeriod 0.515 0.181 2.853 0.005 **
BorrowedFrom|Kids' eReading Room -11.221 12.123 -0.926 0.356
BorrowedFrom|Libby -4.278 11.102 -0.385 0.700
BorrowedFrom|Main collection 8.132 12.068 0.674 0.501
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
R-squared: 0.088, Adjusted R-squared: 0.067
F-statistic: 4.068 df(5,210), p.value 0.002
Nr obs: 216
Prediction error (RMSE): 15.239
Residual st.dev (RSD): 15.455
Sum of squares:
df SS
Regression 5 4,857.912
Error 210 50,160.088
Total 215 55,018.000
Variance Inflation Factors
LendingPeriod BorrowedFrom AverageHouseholdIncome
VIF 1.033 1.031 1.014
Rsq 0.032 0.030 0.013
coefficient 2.5% 97.5% +/-
(Intercept) 17.790 -7.637 43.216 25.426
AverageHouseholdIncome 0.000 0.000 0.000 0.000
LendingPeriod 0.515 0.159 0.871 0.356
BorrowedFrom|Kids' eReading Room -11.221 -35.120 12.677 23.898
BorrowedFrom|Libby -4.278 -26.163 17.608 21.885
BorrowedFrom|Main collection 8.132 -15.658 31.921 23.789
plot(result, plots = "dashboard", lines = c("line", "loess"), nrobs = -1, custom = FALSE)

Ebooks <- store(Ebooks, result, name = "Resids2")
result <- compare_means(
Ebooks,
var1 = "Gender",
var2 = "AverageHouseholdIncome"
)
summary(result, show = FALSE)
Pairwise mean comparisons (t-test)
Data : Ebooks
Variables : Gender, AverageHouseholdIncome
Samples : independent
Confidence: 0.95
Adjustment: None
Gender mean n n_missing sd se me
F 87,815.955 156 0 25,926.594 2,075.789 4,100.486
M 94,913.000 60 0 26,447.988 3,414.421 6,832.240
Null hyp. Alt. hyp. diff p.value
F = M F not equal to M -7097.045 0.079 .
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot(result, plots = "scatter", custom = FALSE)

result <- regress(
Ebooks,
rvar = "Age",
evar = c(
"Title", "Gender",
"AverageHouseholdIncome",
"ZipCode", "Audience",
"LendingPeriod", "BorrowedFrom"
)
)
summary(
result,
sum_check = c("rmse", "sumsquares", "vif", "confint")
)
Linear regression (OLS)
Data : Ebooks
Response variable : Age
Explanatory variables: Title, Gender, AverageHouseholdIncome, ZipCode, Audience, LendingPeriod, BorrowedFrom
Null hyp.: the effect of x on Age is zero
Alt. hyp.: the effect of x on Age is not zero
(Intercept)
Title|Dragones y Tacos
Title|Drama (Spanish Edition)
Title|Dune: Serie Dune, libro 1
Title|Harry Potter y la piedra filosofal: Harry Potter Serie, Libro 1
Title|Jorge el curioso El puesto de limonada / Curious George Lemonade Stand (CGTV reader)
Title|Jorge el curioso se divierte haciendo gimnasia/Curious George Gymnastics Fun Bilingual (CGTV Reader)
Title|Jorge el curioso Un hogar para las abejas/Curious George a Home for Honeybees (CGTV Reader)
Title|Jorge el curioso y el conejito/Curious George and the Bunny
Title|My Friends / Mis Amigos
Title|Ve, Perro. Ve!: Go, Dog. Go!
Gender|M
AverageHouseholdIncome
ZipCode
Audience|Juvenile Fiction
LendingPeriod
BorrowedFrom|Kids' eReading Room
BorrowedFrom|Libby
BorrowedFrom|Main collection
coefficient std.error t.value p.value
-547.963 611.249 -0.896 0.371
3.337 4.602 0.725 0.469
-14.108 4.712 -2.994 0.003 **
3.032 4.328 0.701 0.484
2.517 4.357 0.578 0.564
-1.138 4.323 -0.263 0.793
-1.177 4.141 -0.284 0.777
-0.178 4.596 -0.039 0.969
-4.280 4.953 -0.864 0.389
4.646 4.515 1.029 0.305
-4.590 4.221 -1.087 0.278
-2.262 2.393 -0.945 0.346
0.000 0.000 1.624 0.106
0.006 0.006 0.928 0.354
NA NA NA NA NA
0.424 0.183 2.315 0.022 *
-5.809 12.612 -0.461 0.646
-0.199 11.504 -0.017 0.986
10.297 12.637 0.815 0.416
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
R-squared: 0.174, Adjusted R-squared: 0.103
F-statistic: 2.452 df(17,198), p.value 0.002
Nr obs: 216
The set of explanatory variables exhibit perfect multicollinearity.
One or more variables were dropped from the estimation.
Prediction error (RMSE): 14.506
Residual st.dev (RSD): 15.151
Sum of squares:
df SS
Regression 17 9,567.208
Error 198 45,450.792
Total 215 55,018.000
Multicollinearity diagnostics were not calculated.
Confidence intervals were not calculated.
plot(result, plots = "dashboard", lines = c("line", "loess"), nrobs = -1, custom = FALSE)

Ebooks <- store(Ebooks, result, name = "Resids2")