forked from m-clark/generalized-additive-models
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
88 changed files
with
8,050 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,8 @@ | |
.Rhistory | ||
.RData | ||
.Ruserdata | ||
*_book | ||
*_cache | ||
*GAM_cache | ||
*GAM_files | ||
*.DS_Store |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Preface | ||
|
||
The following provides a brief introduction to generalized additive models and some thoughts on getting started within the R environment. It doesn't assume much more than a basic exposure to regression, and maybe a general idea of R though not necessarily any particular expertise. The presentation is of a very applied nature, and such that the topics build upon the familiar and generalize to the less so, with the hope that one can bring the concepts they are comfortable with to the new material. The audience in mind is a researcher with typical applied science training. | ||
As this document is more conceptual, a basic familiarity with R is all that is needed to follow the code, though there is much to be gained from simple web browsing on R if one needs it. And while it wasn't the intention starting out, this document could be seen as a vignette for the <span class="pack">mgcv</span> package, which is highly recommended. | ||
|
||
|
||
This document was created with [Rstudio](http://rstudio.org/) and rmarkdown. <span class="marginnote">Last modified `r Sys.Date()`. Original draft August, 2012.</span> | ||
|
||
|
||
Color guide: | ||
|
||
- <span class="emph">important term</span> | ||
- [link]() | ||
- <span class="pack">package</span> | ||
- <span class="func">function</span> | ||
- <span class="objclass">object or class</span> | ||
|
||
R Info: **`r sessionInfo()$R.version$version.string` `r sessionInfo()$R.version$nickname`** | ||
|
||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Conclusion | ||
|
||
Generalized additive models are a conceptually straightforward tool that allows one to incorporate nonlinear predictor effects into their otherwise linear models. In addition, they allow one to keep within the linear and generalized linear modeling frameworks with which one is already familiar, while providing new avenues of model exploration and possibly improved results. As was demonstrated, it is easy enough with just a modicum of familiarity to pull them off within the R environment, and as such, it is hoped that this document provides the means to do so. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-3.22 KB
GAM_cache/html/initial_inspection_of_pisa_8e5e528308f53667f117fcda8f1a13a5.RData
Binary file not shown.
Binary file removed
BIN
-112 KB
GAM_cache/html/initial_inspection_of_pisa_8e5e528308f53667f117fcda8f1a13a5.rdb
Binary file not shown.
Binary file removed
BIN
-587 Bytes
GAM_cache/html/initial_inspection_of_pisa_8e5e528308f53667f117fcda8f1a13a5.rdx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
book_filename: "gam" | ||
language: | ||
ui: | ||
chapter_name: "Chapter " | ||
output_dir: "docs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
Rscript -e "bookdown::render_book('index.Rmd', 'bookdown::gitbook')" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
[ -z "${GITHUB_PAT}" ] && exit 0 | ||
[ "${TRAVIS_BRANCH}" != "master" ] && exit 0 | ||
|
||
git config --global user.email "[email protected]" | ||
git config --global user.name "Michael Clark" | ||
|
||
git clone -b gh-pages https://${GITHUB_PAT}@github.com/${TRAVIS_REPO_SLUG}.git book-output | ||
cd book-output | ||
cp -r ../_book/* ./ | ||
git add --all * | ||
git commit -m"Update the book" || true | ||
git push origin gh-pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
bookdown::gitbook: | ||
css: [css/standard_html.css, css/book.css] | ||
font-import: https://fonts.googleapis.com/css?family=Roboto|Open+Sans | ||
font-family: 'Roboto' | ||
config: | ||
toc: | ||
before: | | ||
<li><a href="https://m-clark.github.io/"><span style="font-size:125%; font-variant:small-caps; font-style:italic; color:#0085A1; font-family:Roboto">Generalized Additive Models</span></a></li> | ||
after: | | ||
<li><a href="https://m-clark.github.io/"><img src="img/mc.png" style="width:50%; padding:0px 0; display:block; margin: 0 auto;" alt="MC logo"></a></li> | ||
<li><a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="width:50%; border-width:0; display:block; margin: 0 auto;" src="img/ccbysa.png" /></a></li> | ||
# <li><a href="https://m-clark.github.io" target="blank" style="font-size:150%; font-variant:small-caps; color:#1f65b7; margin: 0 auto;">Michael Clark</a></li><br><br> | ||
edit: | ||
link: https://github.com/m-clark/generalized-additive-models/ | ||
highlight: pygments | ||
# bookdown::pdf_book: | ||
# includes: | ||
# in_header: preamble.tex | ||
# latex_engine: xelatex | ||
# citation_package: natbib | ||
# bookdown::epub_book: default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
@import url("https://fonts.googleapis.com/css?family=Roboto"); | ||
|
||
.book { | ||
background-color: #fffff8; | ||
} | ||
|
||
.section { | ||
background-color: #fffff8; | ||
} | ||
|
||
.book .book-body .page-wrapper .page-inner section.normal { | ||
display: block; | ||
background-color: #fffff8; | ||
color: #585858; | ||
padding: 5px 15px; | ||
font-family: Roboto; | ||
word-wrap: break-word; | ||
overflow: hidden; | ||
line-height: 1.7; | ||
text-size-adjust: 100%; | ||
-ms-text-size-adjust: 100%; | ||
-webkit-text-size-adjust: 100%; | ||
-moz-text-size-adjust: 100%; | ||
} | ||
|
||
|
||
.book .book-body .page-wrapper .page-inner section.normal a { | ||
color: #3D68FF; /*1B4D9E #4183c4; changed for contrast and complement*/ | ||
text-decoration: none; | ||
background: 0 0; | ||
} | ||
|
||
.book .book-body .page-wrapper .page-inner section.normal a:hover { | ||
color: #3D68FF; /*1B4D9E #4183c4; changed for contrast and complement*/ | ||
text-decoration: none; | ||
text-shadow: 0 0 1px #3D68FF; | ||
background: 0 0; | ||
} | ||
|
||
.body-inner { | ||
background-color: #fffff8; | ||
} | ||
|
||
.book .book-body .page-wrapper { | ||
position: relative; | ||
outline: 0; | ||
background-color: #fffff8; | ||
} | ||
|
||
.book .book-body .page-wrapper .page-inner { | ||
max-width: 900px; | ||
margin: 0 auto; | ||
padding: 20px 0 40px; | ||
} | ||
|
||
.book .book-header { | ||
overflow: visible; | ||
height: 48px; /* adjust to match title space*/ | ||
padding: 0 8px; | ||
z-index: 2; | ||
font-family: Roboto sans-serif; | ||
font-size: .85em; | ||
color: #7e888b; | ||
background-color: #fffff8; | ||
/* background: 0 0; */ | ||
} | ||
|
||
.book-body.fixed { | ||
background-color: #fffff8; | ||
} | ||
|
||
|
||
.book.with-summary .book-header.fixed { | ||
background-color: #fffff8; | ||
} | ||
|
||
i { | ||
background-color: #fffff8; | ||
} | ||
|
||
.book .book-summary { | ||
position: absolute; | ||
font-family: "Open Sans", Roboto, sans-serif; | ||
top: 0; | ||
left: -300px; | ||
bottom: 0; | ||
z-index: 1; | ||
width: 300px; | ||
color: #364149; /**/ | ||
background: #eaf5fb; /*#d9edf7#bdcadb #3572D9 #fafafa*/ | ||
border-right: 1px solid rgba(0,0,0,.07); | ||
-webkit-transition: left 250ms ease; | ||
-moz-transition: left 250ms ease; | ||
-o-transition: left 250ms ease; | ||
transition: left 250ms ease; | ||
} | ||
|
||
/* nav/menu area */ | ||
.book .book-summary ul.summary li a, .book .book-summary ul.summary li span { | ||
display: block; | ||
padding: 10px 15px; | ||
border-bottom: none; | ||
color: #364149; /**/ | ||
background: 0 0; | ||
text-overflow: ellipsis; | ||
overflow: hidden; | ||
white-space: nowrap; | ||
position: relative; | ||
} | ||
|
||
|
||
.book .book-summary ul.summary li a:hover, .book .book-summary ul.summary li.active>a { | ||
color: #0085A1; /* #990024 #6197D5*/ | ||
} | ||
|
||
|
||
.book .book-body .page-wrapper .page-inner section.normal pre { | ||
overflow: auto; | ||
word-wrap: normal; | ||
margin: 0 0 1.275em; | ||
padding: .85em 1em; | ||
background: #fafafa; | ||
} | ||
|
||
|
||
.book .book-body .page-wrapper .page-inner section.normal code, .book .book-body .page-wrapper .page-inner section.normal pre { | ||
font-family: 'Roboto Mono',Consolas,"Liberation Mono",Menlo,Courier,monospace; | ||
direction: ltr; | ||
border: none; | ||
color: inherit; | ||
} | ||
|
||
.book .book-body .page-wrapper .page-inner section.normal .note { | ||
background-color: #fafafa; | ||
/*background-image: url('../img/R.ico');*/ | ||
font-size: 80% ; | ||
margin: auto; | ||
font-weight: 500; | ||
max-width: 75%; | ||
border-width: 10px; | ||
border-color: #bfbfbf; | ||
box-shadow: 10px 10px 5px #EBEBEB; /*#888888*/ | ||
padding: 1em; | ||
} | ||
|
||
|
||
.img-note { | ||
vertical-align: central; | ||
width: 2em; | ||
} |
Oops, something went wrong.