Skip to content

Commit

Permalink
Migrate specific checks into vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
courtiol committed Mar 7, 2021
1 parent 9d32ed0 commit 00a65be
Show file tree
Hide file tree
Showing 2 changed files with 169 additions and 27 deletions.
34 changes: 9 additions & 25 deletions TODO_spaMM.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,17 @@ This document describes what should be done so that spaMM becomes supported by b
See https://www.tidymodels.org/learn/develop/broom/ and the broom.mixed vignette for detailed instructions

### Improve the main methods
TO COME
See the dedicated spaMM vignette in this package

### Check that it works for all common random effect structures
- [ ] check with no random effect
- [ ] check one and two random effects
- [ ] check one and two random slopes
- [ ] check Matern(1|x, y)
- [ ] check AR1(1|time)
- [ ] check corrMatrix(1|group)
### Checks / Tests
Make sure it works for:

### Check that it works with the 3 fitting functions
- [ ] check output from fitme()
- [ ] check output from HLfit()
- [ ] check output from corrHLfit()
- [ ] all common random effect structures
- [ ] all common families and links
- [ ] the 3 fitting functions (`fitme()`, `HLfit()`, `corrHLfit()`)
- [ ] multivariate models?

### Check that it works with common families and links
- [ ] check gaussian (log + identity)
- [ ] check Gamma (log + identity)
- [ ] check Binomial (logit + probit)
- [ ] check Poisson (log + identity)
- [ ] check truncated Poisson (log)
- [ ] check NegBin (log)
- [ ] check truncated NegBin (log)

### Handle multivariate models?
- [ ] tidy for HLfitlist?
- [ ] augment for HLfitlist?
- [ ] glance for HLfitlist?
See the dedicated spaMM vignette in this package

### Polish
- [ ] cleanup test file
Expand All @@ -58,6 +41,7 @@ TO COME
- [ ] store fitted models as rda in inst/extdata (produced in run_example.R)
- [ ] update documentation (see https://roxygen2.r-lib.org/articles/markdown.html)
- [ ] update examples
- [ ] remove special spaMM vignette
- [ ] update vignette
- [ ] update NEWS
- [ ] delete this file
Expand Down
162 changes: 160 additions & 2 deletions vignettes/spaMM.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ date: "`r Sys.Date()`"
output:
rmarkdown::html_vignette:
toc: yes
toc_depth: 4
vignette: >
%\VignetteIndexEntry{Testing broom.mixed for spaMM}
%\VignetteEngine{knitr::rmarkdown}
Expand Down Expand Up @@ -54,7 +55,7 @@ glance(lm1_spaMM_fitme)
glance(lm1_spaMM_fitme, npar.details = TRUE)
```

#### Notes
#### FIXME?
Some statistics produced by `glance.lm()` are missing from `glance.HLfit()`:
- `r-squared` \& `adj.r.squared` statistics $\rightarrow$ unlikely to work in general unless new function appear in spaMM, so perhaps it makes sense to skip it
- `p.value` \& `df` $\rightarrow$ this corresponds to a test with a null model $\rightarrow$ unlikely to work in general so perhaps it makes sense to skip it
Expand Down Expand Up @@ -102,5 +103,162 @@ glance(lm3_spaMM_fitme)
glance(lm4_spaMM_fitme)
```

#### Notes
#### FIXME?
These cases do not seem to be handled properly $\rightarrow$ the question is whether we should deal with them and detect such cases and produce a warning

## Poisson GLM

### Outputs from `tidy()`
TO COME

### Outputs from `augment()`
TO COME

### Outputs from `glance()`
TO COME


## Binomial GLM

### Outputs from `tidy()`
TO COME

### Outputs from `augment()`
TO COME

### Outputs from `glance()`
TO COME

## Negative Binomial GLM

### Outputs from `tidy()`
TO COME

### Outputs from `augment()`
TO COME

### Outputs from `glance()`
TO COME

## COM-Poisson GLM

### Outputs from `tidy()`
TO COME

### Outputs from `augment()`
TO COME

### Outputs from `glance()`
TO COME

## Zero truncated GLM

### Outputs from `tidy()`
TO COME

### Outputs from `augment()`
TO COME

### Outputs from `glance()`
TO COME

## LMM with 1 simple random effect

### Outputs from `tidy()`
TO COME

### Outputs from `augment()`
TO COME

### Outputs from `glance()`
TO COME

## LMM with 2 simple random effect

### Outputs from `tidy()`
TO COME

### Outputs from `augment()`
TO COME

### Outputs from `glance()`
TO COME

## LMM with random slopes

### Outputs from `tidy()`
TO COME

### Outputs from `augment()`
TO COME

### Outputs from `glance()`
TO COME

## LMM with autocorrelation

### Outputs from `tidy()`
TO COME

### Outputs from `augment()`
TO COME

### Outputs from `glance()`
TO COME

## LMM with correlation matrix

### Outputs from `tidy()`
TO COME

### Outputs from `augment()`
TO COME

### Outputs from `glance()`
TO COME

## DHLM

### Outputs from `tidy()`
TO COME

### Outputs from `augment()`
TO COME

### Outputs from `glance()`
TO COME


## GLMM

### Outputs from `tidy()`
TO COME

### Outputs from `augment()`
TO COME

### Outputs from `glance()`
TO COME

## DHGLM

### Outputs from `tidy()`
TO COME

### Outputs from `augment()`
TO COME

### Outputs from `glance()`
TO COME


## Multivariate fits

### Outputs from `tidy()`
TO COME

### Outputs from `augment()`
TO COME

### Outputs from `glance()`
TO COME

0 comments on commit 00a65be

Please sign in to comment.