skewlmm

Scale mixture of Skew-Normal Linear Mixed Models

https://github.com/fernandalschumacher/skewlmm

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 7 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.5%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Scale mixture of Skew-Normal Linear Mixed Models

Basic Info
  • Host: GitHub
  • Owner: fernandalschumacher
  • License: other
  • Language: R
  • Default Branch: master
  • Size: 550 KB
Statistics
  • Stars: 6
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 3
Created over 6 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%",
  fig.width=6, 
  fig.height=4
)
```

# skewlmm skewlmm GitHub link

[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/skewlmm)](https://cran.r-project.org/package=skewlmm)


The goal of skewlmm is to fit skew robust linear mixed models, using scale mixture of skew-normal linear mixed models with possible within-subject dependence structure, using an EM-type algorithm. In addition, some tools for model adequacy evaluation are available.

For more information about the model formulation and estimation, please see
Schumacher, F. L., Lachos, V. H., and Matos, L. A. (2021). Scale mixture of skew‐normal linear mixed models with within‐subject serial dependence. *Statistics in Medicine*. DOI: [10.1002/sim.8870](https://doi.org/10.1002/sim.8870).

## Installation




You can install skewlmm from GitHub with:

```r
remotes::install_github("fernandalschumacher/skewlmm")
```
Or you can install the released version of skewlmm from [CRAN](https://CRAN.R-project.org) with:
```r
install.packages("skewlmm")
```

## Example

This is a basic example which shows you how to fit a SMSN-LMM:

```{r example1, out.width = '70%', fig.align = "center"}
library(skewlmm)
dat1 <- as.data.frame(nlme::Orthodont)
fm1 <- smsn.lmm(dat1, formFixed = distance ~ age, formRandom = ~ age,
                groupVar = "Subject", distr = "st",
                control = lmmControl(quiet = TRUE))
summary(fm1)
plot(fm1)
```

Several methods are available for SMSN and SMN objects, such as: `print`, `summary`, `plot`, `fitted`, `residuals`, `predict`, and `update`.

Some tools for goodness-of-fit assessment are also available, for example:
```{r example2, out.width = '70%', fig.align = "center"}
acf1<- acfresid(fm1, calcCI = TRUE)
plot(acf1)
plot(mahalDist(fm1), nlabels = 2)
healy.plot(fm1, calcCI = TRUE)
```

Furthermore, to fit a SMN-LMM one can use the following:
```{r example3}
fm2 <- smn.lmm(dat1, formFixed = distance ~ age, formRandom = ~ age,
               groupVar = "Subject", distr = "t",
               control = lmmControl(quiet = TRUE))
summary(fm2)
```

Now, for performing a LRT for testing if the skewness parameter is 0 ($\text{H}_0: \lambda_i=0, \forall i$), one can use the following:
```{r example4}
lr.test(fm1,fm2)
```

By default, the functions `smsn.lmm` and `smn.lmm` now use the DAAREM method (a method for EM accelaration, for details see `help(package="daarem")`) for estimation, to improve the computational performance. This method usually greatly reduces the convergence time, but its use can result in numerical errors, specially for small samples. In this cases, the EM algorithm can be used, as follows:

```{r example5}
fm2EM <- smn.lmm(dat1, formFixed = distance ~ age, formRandom = ~ age, distr = 't',
                 groupVar = "Subject", control = lmmControl(algorithm = "EM", 
                                                            quiet = TRUE))
fm2EM
```

Also, we can fit a t-LMM with diagonal scale matrix for the random effects by using:
```{r}
fm2diag <- update(fm2, covRandom = "pdDiag")
fm2diag
```

We can compare the information criteria for all fitted models using the `criteria` function, as follows:

```{r}
criteria(list(`ST-LMM` = fm1, `t-LMM` = fm2, `t-LMM(EM)` = fm2EM, `t-LMM-diag` = fm2diag))
```

For more examples, see `help(smsn.lmm)` and `help(smn.lmm)`.

## Handling censored/missing observations

An extension of the methods to account for censoring in SMSN-LMM is under development. Tools for accommodating left, right, or interval censored observations in the symmetrical family SMN-LMM are now available using the function `smn.clmm`. 

For more information on censored models, we refer to Matos, L. A., Prates, M. O., Chen, M. H., and Lachos, V. H. (2013). Likelihood-based inference for mixed-effects models with censored response using the multivariate-t distribution. *Statistica Sinica*. DOI: [10.5705/ss.2012.043](http://dx.doi.org/10.5705/ss.2012.043).

Owner

  • Name: Fernanda Lang Schumacher
  • Login: fernandalschumacher
  • Kind: user
  • Location: US
  • Company: The Ohio State University

Assistant Professor | Division of Biostatistics | College of Public Health

GitHub Events

Total
  • Watch event: 1
  • Push event: 19
Last Year
  • Watch event: 1
  • Push event: 19

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 66
  • Total Committers: 2
  • Avg Commits per committer: 33.0
  • Development Distribution Score (DDS): 0.091
Past Year
  • Commits: 3
  • Committers: 1
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
fernandalschumacher f****r@g****m 60
Katherine Loor k****a@g****m 6

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 0
  • Total pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: less than a minute
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • fernandalschumacher (2)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 254 last-month
  • Total docker downloads: 21,613
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 8
  • Total maintainers: 1
cran.r-project.org: skewlmm

Scale Mixture of Skew-Normal Linear Mixed Models

  • Versions: 8
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 254 Last month
  • Docker Downloads: 21,613
Rankings
Stargazers count: 26.2%
Forks count: 28.8%
Dependent packages count: 29.8%
Average: 34.0%
Dependent repos count: 35.5%
Downloads: 49.8%
Last synced: 11 months ago

Dependencies

DESCRIPTION cran
  • R >= 4.0 depends
  • optimParallel * depends
  • dplyr * imports
  • furrr * imports
  • future * imports
  • ggplot2 * imports
  • ggrepel * imports
  • haven * imports
  • moments * imports
  • mvtnorm * imports
  • nlme * imports
  • numDeriv * imports
  • purrr * imports
.github/workflows/check-standard.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite