Skip to content

Commit

Permalink
05_DataModel.qmd: save and reset plot params with par()
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasmanke committed Apr 5, 2024
1 parent 75b7f34 commit daece00
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions qmd/05_DataModels.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,10 @@ for (f in formula_list) {
# more concise loop using lapply/sapply
# sig = sapply(lapply(formula_list, lm, data=iris), sigma)
op=par(no.readonly=TRUE)
par(mar=c(4,20,2,2))
barplot(sig ~ format(formula_list), horiz=TRUE, las=2, ylab="", xlab="sigma")
par(op) # reset graphical parameters
```

... more complex models tend to have smaller residual standard error (overfitting?)
Expand Down

0 comments on commit daece00

Please sign in to comment.