Predicting Stature – by Foot Length



Predicting Stature – by Foot Length

0 0


Course_Project_Slidify


On Github PestoVerde / Course_Project_Slidify

Predicting Stature

by Foot Length

with shinyapp

created by Sergey Cherkasov

as part of Developing Data Product course

Preamble

This presentation is a second part of Developing Data Products course. The first part is shiny application which can be found here.

Data for this application can be found at the site of Department of Statistics (University of Florida).

Original files of this presentation can be found on github.com

Application

The application provides interaction with simple linear model which predict the heigth of a person by size of his/her foot.

To use the application you need to choose the gender of a person with radio button. Then you can use slider to adjust size of a foot. Big green dot shows the prediction.

The app consist interactive part with the plot and documentation part with brief explanations.

Original files can be found on github.com

Data

Data contains 155 observations with 5 variations each. We remove useless numbers of observations.

The original data contains also hand length of the person. If we used it in our model it improved the prediction for about 5%. But we avoid this variance for the sake of brilliant simplicity of the application interface and reducing the burden of server.

Model

More R expression that got evaluated and displayed.

fit <- lm(stature ~ ., data)
summary(fit)
## 
## Call:
## lm(formula = stature ~ ., data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -9.7055 -2.6147  0.1318  1.9285 13.0125 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 84.69370    6.14796  13.776  < 2e-16 ***
## genderMale   6.18123    0.96623   6.397 1.85e-09 ***
## foot_length  0.32062    0.02612  12.277  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.965 on 152 degrees of freedom
## Multiple R-squared:  0.824,  Adjusted R-squared:  0.8217 
## F-statistic: 355.9 on 2 and 152 DF,  p-value: < 2.2e-16

As we can see the model discribes 82% of variance.