-
Notifications
You must be signed in to change notification settings - Fork 8
/
R-package-pointers.Rmd
86 lines (65 loc) · 3.45 KB
/
R-package-pointers.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# R Packages for Mixed(-Effects) Models
## The absolute core:
### [`nlme`](https://CRAN.R-project.org/package=nlme)
### [`lme4`](https://CRAN.R-project.org/package=lme4)
## Other Packages with Mixed Effect Models as main purpose (and recommendable)
- [`lmerTest`](https://CRAN.R-project.org/package=lmerTest)
- [`glmmTMB`](https://CRAN.R-project.org/package=glmmTMB)
- [`pbkrtest`](https://CRAN.R-project.org/package=pbkrtest), see also the [`pbkrtest` page](http://people.math.aau.dk/~sorenh/software/pbkrtest/) and notably the `demo.R` and resulting [`demo.html`](http://people.math.aau.dk/~sorenh/software/pbkrtest/doc/demo.html) example.
## [CRAN Task Views](https://cran.r-project.org/web/views)
There is none, with this topic
Is there no good one ?
- `nlme` is in
`ChemPhys`,
`Econometrics`,
`Environmetrics`,
`Finance`,
`OfficialStatistics`,
`Psychometrics`,
`SocialSciences`,
`Spatial`,
`SpatioTemporal`,
whereas
- `lme4` is in
`Bayesian`,
`Econometrics`,
`Environmetrics`,
`OfficialStatistics`,
`Psychometrics`,
`SocialSciences`,
`SpatioTemporal`,
- with the intersection
| Task View | URL | CRAN packages | comments |
|--------------------|-----------------------------------------------|---------------|----------|
| `Econometrics` | https://CRAN.R-project.org/view=Econometrics | nlme, lme4 | |
| `Environmetrics` | https://CRAN.R-project.org/view=Environmetrics | nlme, lme4 | Modelling species responses and other data |
|`OfficialStatistics`| https://CRAN.R-project.org/view=OfficialStatistics | nlme, lme4, rsae | (robust) Small Area Estimation |
| `Psychometrics` | https://CRAN.R-project.org/view=Psychometrics | nlme, lme4, ordinal, MCMCglmm, irtrees | Item Response Theory (ITR), Rasch Mod. |
| `SocialSciences` | https://CRAN.R-project.org/view=SocialSciences | nlme, lme4, lmeSplines, lmm, MCMCglmm | Other Regression Methods |
| `SpatioTemporal` | https://CRAN.R-project.org/view=SpatioTemporal | nlme, lme4 | (spatio-temporal data) |
## R (CRAN) packages with `LMM` in their names:
```{r, lmm-pkgs, cache=TRUE}
ip <- installed.packages() # ~ 13'000 for Martin Maechler
str(ip)
pkgs <- rownames(ip)
str(LMMs <- grep("lmm", pkgs, ignore.case=TRUE, value=TRUE))
pdLMM <- lapply(LMMs, packageDescription)
titLMM <-
ttLMM <- gsub("\n", " ",
sapply(setNames(,LMMs), packageDescription, fields = "Title"))
longT <- nchar(ttLMM) > 80
ttLMM[longT] <- paste(substr(ttLMM[longT], 1, 77), "...")
cbind(ttLMM) # 80% are GLMM amazing
```
<!-- When run by `R RHOME`/bin/Rscript --no-restore --no-save -e 'knitr::knit("R-package-pointers.Rmd")'
this fails with (R <-> R-devel) problem (and cache ?):
Error in readRDS(file) :
cannot read unreleased workspace version 3 written
by experimental R 3.5.0 -->
## Closely related packages
- [`ordinal`](https://CRAN.R-project.org/package=ordinal), fn `clmm()` for *cumulative* LMMs.
- [`lmeSplines`](https://CRAN.R-project.org/package=lmeSplines), based on pkg `nlme`, allows splines for linear and non-linear MM.
- [`mgcv`](https://CRAN.R-project.org/package=mgcv), *Recommended* pkg, has `gamm()`, based on pkg `nlme`. Alternatively, (and not possible inside *rec.* package `mgcv`):
- [`gamm4`](https://CRAN.R-project.org/package=gamm4), based on pkg `lme4`, has fn. `gamm4()` based on `lmer()` etc.
#### NB. "knit me" to markdown --> `*.md` simply by
od <- setwd("~/R/D/GH/MEMo"); knitr::knit("R-package-pointers.Rmd") ; setwd(od)