Commit c9094974 authored by Lie-Piang, Anouk's avatar Lie-Piang, Anouk
Browse files

Update ComponentModel.Rmd

parent f5e20eb2
......@@ -104,7 +104,7 @@ ggplot(Viscosity_quality) +
geom_point(aes(x = R.squared, y = AIC, colour = as.factor(n_terms)))
```
#finally, the selection of the right model. This is tricky. Let's arrange the models by $R^2$ and AIC.
#Arrange the models by $R^2$ and AIC.
```{r}
R2_arranged <- Viscosity_quality %>%
arrange(desc(R.squared))
......@@ -122,7 +122,7 @@ AIC_arranged
# Print the summary of the 5 best models by AIC.
```{r}
print_models_AIC <- lapply(1:2, function(x) {
print_models_AIC <- lapply(1:5, function(x) {
my_models <- Viscosity_models[[AIC_arranged$n_terms[x]]]
models_AIC <- lapply(my_models, AIC)
my_index <- which(AIC_arranged$AIC[x] == models_AIC)
......@@ -172,7 +172,7 @@ lapply(1:1, function(x) {
})
```
#Plot parity plot
#Plot parity plot best model according to AIC
```{r}
lapply(1:1, function(x){
my_models <- Viscosity_models[[AIC_arranged$n_terms[x]]]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment