A GAM of Furrycat’s data shows a strong relationship between action and both dexterity and intellect.
model <- gam(
formula = action ~
s(hardiness) +
s(fortitude) +
s(dexterity) +
s(endurance) +
s(intellect) +
s(cleverness) +
s(courage) +
s(dependability) +
s(power) +
s(fierceness) +
armor,
family = gaussian(),
data = normalized_df
)
##
## Family: gaussian
## Link function: identity
##
## Formula:
## action ~ s(hardiness) + s(fortitude) + s(dexterity) + s(endurance) +
## s(intellect) + s(cleverness) + s(courage) + s(dependability) +
## s(power) + s(fierceness) + armor
##
## Parametric coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5560.4334 0.4724 11770.36 <2e-16 ***
## armor -0.3971 1.7229 -0.23 0.818
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df F p-value
## s(hardiness) 1.000 1.000 2.000e-03 0.961
## s(fortitude) 4.183 5.192 8.270e-01 0.486
## s(dexterity) 1.876 2.396 3.243e+06 <2e-16 ***
## s(endurance) 1.299 1.530 5.220e-01 0.681
## s(intellect) 1.000 1.000 3.403e+05 <2e-16 ***
## s(cleverness) 1.000 1.000 1.610e-01 0.688
## s(courage) 2.014 2.550 9.780e-01 0.514
## s(dependability) 4.860 5.956 6.160e-01 0.693
## s(power) 1.000 1.000 3.580e-01 0.550
## s(fierceness) 1.000 1.000 2.116e+00 0.147
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 1 Deviance explained = 100%
## GCV = 34.48 Scale est. = 32.501 n = 370
And the GBM shows linear relationships.
plot(model, select = 3)
plot(model, select = 5)
The linear model shows high correlation and low residuals.
model <- lm(action ~ dexterity + intellect, data = normalized_df)
summary(model)
##
## Call:
## lm(formula = action ~ dexterity + intellect, data = normalized_df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -40.146 -4.431 0.289 4.816 8.919
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 41.632510 0.667900 62.33 <2e-16 ***
## dexterity 14.956091 0.003296 4537.54 <2e-16 ***
## intellect 2.995038 0.002906 1030.49 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 5.738 on 367 degrees of freedom
## Multiple R-squared: 1, Adjusted R-squared: 1
## F-statistic: 5.081e+07 on 2 and 367 DF, p-value: < 2.2e-16
And looks like this.
The residuals suggest that some of the error may be due to rounding.
Action is roughly captured by the following formula, \(action \approx 42 + 15 * dexterity + 3 * intellect\). The final value is rounded.