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) 5190.1706 0.3615 14356.804 <2e-16 ***
## armor -0.4929 1.1855 -0.416 0.678
## ---
## 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.9607
## s(fortitude) 1.462 1.814 3.070e-01 0.7652
## s(dexterity) 1.524 1.903 4.223e+06 <2e-16 ***
## s(endurance) 1.505 1.855 6.190e-01 0.5894
## s(intellect) 6.080 7.219 5.221e+04 <2e-16 ***
## s(cleverness) 1.030 1.056 2.300e-02 0.9065
## s(courage) 2.064 2.618 1.164e+00 0.4254
## s(dependability) 1.000 1.000 4.000e-03 0.9468
## s(power) 1.000 1.000 6.590e-01 0.4174
## s(fierceness) 1.000 1.000 3.611e+00 0.0581 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 1 Deviance explained = 100%
## GCV = 33.813 Scale est. = 32.191 n = 410
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.166 -4.450 -0.449 4.802 8.619
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 41.681785 0.572528 72.8 <2e-16 ***
## dexterity 14.957012 0.002944 5081.3 <2e-16 ***
## intellect 2.993910 0.002708 1105.5 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 5.715 on 407 degrees of freedom
## Multiple R-squared: 1, Adjusted R-squared: 1
## F-statistic: 6.126e+07 on 2 and 407 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.