Skip to content

Commit

Permalink
update vignettes
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-buerkner committed Dec 16, 2018
1 parent cc4b0f3 commit 2fea7f3
Show file tree
Hide file tree
Showing 45 changed files with 3,562 additions and 3,419 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
^Meta$
^doc$
^.*\.Rproj$
^.*\.RData$
^.*\.Rhistory$
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Meta
.Rproj.user
.Rhistory
.RData
Expand Down
File renamed without changes.
10 changes: 4 additions & 6 deletions inst/doc/brms_customfamilies.Rmd → doc/brms_customfamilies.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ date: "`r Sys.Date()`"
output:
rmarkdown::html_vignette:
toc: yes
vignette: >
%\VignetteIndexEntry{Define Custom Response Distributions with brms}
%\VignetteEngine{knitr::rmarkdown}
\usepackage[utf8]{inputenc}
params:
EVAL: !r identical(Sys.getenv("NOT_CRAN"), "true")
---

<!--
%\VignetteEngine{knitr::rmarkdown}
%\VignetteIndexEntry{Define custom response distributions with brms}
%\VignetteEncoding{UTF-8}
-->

```{r, SETTINGS-knitr, include=FALSE}
stopifnot(require(knitr))
options(width = 90)
Expand Down
65 changes: 41 additions & 24 deletions inst/doc/brms_customfamilies.html → doc/brms_customfamilies.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion inst/doc/brms_distreg.R → doc/brms_distreg.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ hyp <- "exp(sigma_Intercept + sigma_grouptreat) > exp(sigma_Intercept)"
plot(hyp, chars = NULL)

## ---------------------------------------------------------------------------------------
zinb <- read.csv("http://stats.idre.ucla.edu/stat/data/fish.csv")
zinb <- read.csv("https://paul-buerkner.github.io/data/fish.csv")
head(zinb)

## ---- results='hide'--------------------------------------------------------------------
Expand Down
12 changes: 5 additions & 7 deletions inst/doc/brms_distreg.Rmd → doc/brms_distreg.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ date: "`r Sys.Date()`"
output:
rmarkdown::html_vignette:
toc: yes
vignette: >
%\VignetteIndexEntry{Estimating Distributional Models with brms}
%\VignetteEngine{knitr::rmarkdown}
\usepackage[utf8]{inputenc}
params:
EVAL: !r identical(Sys.getenv("NOT_CRAN"), "true")
---

<!--
%\VignetteEngine{knitr::rmarkdown}
%\VignetteIndexEntry{Fit Distributional Models with brms}
%\VignetteEncoding{UTF-8}
-->

```{r, SETTINGS-knitr, include=FALSE}
stopifnot(require(knitr))
options(width = 90)
Expand Down Expand Up @@ -96,7 +94,7 @@ Indeed, the residual standard deviation of the treatment group seems to larger t
Another important application of the distributional regression framework are so called zero-inflated models. These models are helpful whenever there are more zeros in the response variable than one would naturally expect. For example, if one seeks to predict the number of cigarettes people smoke per day and also includes non-smokers, there will be a huge amount of zeros which, when not modeled appropriately, can seriously distort parameter estimates. Here, we consider an example dealing with the number of fish caught by various groups of people. On the UCLA website (\url{https://stats.idre.ucla.edu/stata/dae/zero-inflated-poisson-regression}), the data are described as follows: "The state wildlife biologists want to model how many fish are being caught by fishermen at a state park. Visitors are asked how long they stayed, how many people were in the group, were there children in the group and how many fish were caught. Some visitors do not fish, but there is no data on whether a person fished or not. Some visitors who did fish did not catch any fish so there are excess zeros in the data because of the people that did not fish."

```{r}
zinb <- read.csv("http://stats.idre.ucla.edu/stat/data/fish.csv")
zinb <- read.csv("https://paul-buerkner.github.io/data/fish.csv")
head(zinb)
```

Expand Down
Loading

0 comments on commit 2fea7f3

Please sign in to comment.