Skip to content

Commit 2cebc7d

Browse files
committed
Rebuild README.md
1 parent 58d7407 commit 2cebc7d

File tree

2 files changed

+28
-30
lines changed

2 files changed

+28
-30
lines changed

README.Rmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ To cite sdmTMB in publications use:
8888
citation("sdmTMB")
8989
```
9090

91-
Anderson, S.C., E.J. Ward, P.A. English, L.A.K. Barnett., J.T. Thorson.
92-
2024. sdmTMB: an R package for fast, flexible, and
93-
user-friendly generalized linear mixed effects models with
94-
spatial and spatiotemporal random fields. bioRxiv
95-
2022.03.24.485545; doi: <https://doi.org/10.1101/2022.03.24.485545>
91+
Anderson, S.C., E.J. Ward, P.A. English, L.A.K. Barnett., J.T. Thorson. 2024.
92+
sdmTMB: an R package for fast, flexible, and user-friendly generalized linear
93+
mixed effects models with spatial and spatiotemporal random fields.
94+
In press at Journal of Statistical Software.
95+
Preprint DOI: <https://doi.org/10.1101/2022.03.24.485545>
9696

9797
A list of (known) publications that use sdmTMB can be found [here](https://github.com/pbs-assess/sdmTMB/wiki/Publications-using-sdmTMB). Please use the above citation so we can track publications.
9898

@@ -259,7 +259,7 @@ ggplot(index, aes(year, est)) +
259259

260260
Or the center of gravity:
261261

262-
```{r plot-cog}
262+
```{r plot-cog, message=FALSE, warning=FALSE}
263263
cog <- get_cog(p_st, format = "wide")
264264
ggplot(cog, aes(est_x, est_y, colour = year)) +
265265
geom_pointrange(aes(xmin = lwr_x, xmax = upr_x)) +

README.md

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,17 @@ pak::pkg_install("pbs-assess/sdmTMB", dependencies = TRUE)
6565
There are some extra utilities in the
6666
[sdmTMBextra](https://github.com/pbs-assess/sdmTMBextra) package.
6767

68-
**Importantly**, it is recommended to use an optimized BLAS library, which will result in major speed improvements for TMB (and other) models in R (e.g., often 8-fold speed increases for sdmTMB models).
69-
Suggested installation instructions for [Mac users](https://www.mail-archive.com/r-sig-mac@r-project.org/msg06199.html), [Linux users](https://prdm0.github.io/ropenblas/), [Windows users](https://github.com/david-cortes/R-openblas-in-windows), and [Windows users without admin privileges](https://gist.github.com/seananderson/08a51e296a854f227a908ddd365fb9c1).
70-
To check that you've successfully linked the optimized BLAS, start a new session and run:
68+
**Importantly**, it is recommended to use an optimized BLAS library,
69+
which will result in major speed improvements for TMB (and other) models
70+
in R (e.g., often 8-fold speed increases for sdmTMB models). Suggested
71+
installation instructions for [Mac
72+
users](https://www.mail-archive.com/r-sig-mac@r-project.org/msg06199.html),
73+
[Linux users](https://prdm0.github.io/ropenblas/), [Windows
74+
users](https://github.com/david-cortes/R-openblas-in-windows), and
75+
[Windows users without admin
76+
privileges](https://gist.github.com/seananderson/08a51e296a854f227a908ddd365fb9c1).
77+
To check that you’ve successfully linked the optimized BLAS, start a new
78+
session and run:
7179

7280
``` r
7381
m <- 1e4; n <- 1e3; k <- 3e2
@@ -152,8 +160,8 @@ citation("sdmTMB")
152160
Anderson, S.C., E.J. Ward, P.A. English, L.A.K. Barnett., J.T. Thorson.
153161
2024. sdmTMB: an R package for fast, flexible, and user-friendly
154162
generalized linear mixed effects models with spatial and spatiotemporal
155-
random fields. bioRxiv 2022.03.24.485545; doi:
156-
<https://doi.org/10.1101/2022.03.24.485545>
163+
random fields. In press at Journal of Statistical Software. Preprint
164+
DOI: <https://doi.org/10.1101/2022.03.24.485545>
157165

158166
A list of (known) publications that use sdmTMB can be found
159167
[here](https://github.com/pbs-assess/sdmTMB/wiki/Publications-using-sdmTMB).
@@ -258,6 +266,7 @@ fit
258266
#> Data: pcod
259267
#> Family: tweedie(link = 'log')
260268
#>
269+
#> Conditional model:
261270
#> coef.est coef.se
262271
#> (Intercept) 2.37 0.21
263272
#> sdepth 0.62 2.53
@@ -288,13 +297,11 @@ We can extract parameters as a data frame:
288297

289298
``` r
290299
tidy(fit, conf.int = TRUE)
291-
#> # A tibble: 1 × 5
300+
#> # A tibble: 2 × 5
292301
#> term estimate std.error conf.low conf.high
293302
#> <chr> <dbl> <dbl> <dbl> <dbl>
294303
#> 1 (Intercept) 2.37 0.215 1.95 2.79
295-
```
296-
297-
``` r
304+
#> 2 sdepth 0.62 2.53 -4.34 5.58
298305
tidy(fit, effects = "ran_pars", conf.int = TRUE)
299306
#> # A tibble: 4 × 5
300307
#> term estimate std.error conf.low conf.high
@@ -570,9 +577,6 @@ head(sim_dat)
570577
#> 4 0.0303 0 -0.282 2.05 0.718 2 1
571578
#> 5 0.0404 0 -0.325 1.96 0.675 3 1
572579
#> 6 0.0505 0 -0.367 1.88 0.633 2 1
573-
```
574-
575-
``` r
576580

577581
# sample 200 points for fitting:
578582
set.seed(1)
@@ -679,9 +683,6 @@ m_cv <- sdmTMB_cv(
679683
)
680684
#> Running fits with `future.apply()`.
681685
#> Set a parallel `future::plan()` to use parallel processing.
682-
```
683-
684-
``` r
685686
# Sum of log likelihoods of left-out data:
686687
m_cv$sum_loglik
687688
#> [1] -6756.28
@@ -749,15 +750,12 @@ fit_glm <- glm(
749750
)
750751

751752
tidy(fit_sdmTMB)
752-
#> # A tibble: 3 × 3
753-
#> term estimate std.error
754-
#> <chr> <dbl> <dbl>
755-
#> 1 (Intercept) -0.426 0.0573
756-
#> 2 poly(depth_scaled, 2)1 -31.7 3.03
757-
#> 3 poly(depth_scaled, 2)2 -66.9 4.09
758-
```
759-
760-
``` r
753+
#> # A tibble: 3 × 5
754+
#> term estimate std.error conf.low conf.high
755+
#> <chr> <dbl> <dbl> <dbl> <dbl>
756+
#> 1 (Intercept) -0.426 0.0573 -0.538 -0.314
757+
#> 2 poly(depth_scaled, 2)1 -31.7 3.03 -37.6 -25.8
758+
#> 3 poly(depth_scaled, 2)2 -66.9 4.09 -74.9 -58.9
761759
broom::tidy(fit_glm)
762760
#> # A tibble: 3 × 5
763761
#> term estimate std.error statistic p.value

0 commit comments

Comments
 (0)