skpr

Generates and evaluates D, I, A, Alias, E, T, G, and custom optimal designs. Supports generation and evaluation of mixture and split/split-split/N-split plot designs. Includes parametric and Monte Carlo power evaluation functions. Provides a framework to evaluate power using functions provided in other packages or written by the user.

https://github.com/tylermorganwall/skpr

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
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (18.9%) to scientific vocabulary

Keywords

design-of-experiments linear-models linear-regression monte-carlo optimal-designs power r rstats split-plot-designs survival-analysis
Last synced: 6 months ago · JSON representation

Repository

Generates and evaluates D, I, A, Alias, E, T, G, and custom optimal designs. Supports generation and evaluation of mixture and split/split-split/N-split plot designs. Includes parametric and Monte Carlo power evaluation functions. Provides a framework to evaluate power using functions provided in other packages or written by the user.

Basic Info
Statistics
  • Stars: 121
  • Watchers: 11
  • Forks: 15
  • Open Issues: 4
  • Releases: 1
Topics
design-of-experiments linear-models linear-regression monte-carlo optimal-designs power r rstats split-plot-designs survival-analysis
Created over 9 years ago · Last pushed 11 months ago
Metadata Files
Readme Changelog License

README.Rmd

---
output: 
  github_document:
  html_preview: false
---

```{r, echo = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)
```

# skpr 



[![Travis-CI Build Status](https://travis-ci.org/tylermorganwall/skpr.svg?branch=master)](https://travis-ci.org/tylermorganwall/skpr)
[![CRAN_Status_Badge]( http://www.r-pkg.org/badges/version-ago/skpr)](https://cran.r-project.org/package=skpr)
[![R-CMD-check](https://github.com/tylermorganwall/skpr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tylermorganwall/skpr/actions/workflows/R-CMD-check.yaml)
  
  


## Overview

**skpr** is an open source design of experiments suite for generating and evaluating optimal designs in R. Here is a sampling of what skpr offers: 

* Generates and evaluates D, I, A, Alias, E, T, and G optimal designs, as well as user-defined custom optimality criteria. 
* Supports generation and evaluation of split/split-split/.../N-split plot designs. 
* Includes parametric and Monte Carlo power evaluation functions, and supports calculating power for censored responses. 
* Provides an extensible framework for the user to evaluate Monte Carlo power using their own libraries. 
* Includes a Shiny graphical user interface, skprGUI, that auto-generates the R code used to create and evaluate the design to improve ease-of-use and enhance reproducibility.

## Installation

```{r, eval=FALSE}
# To install:
install.packages("skpr")

# To install the latest version from Github:
# install.packages("devtools")
devtools::install_github("tylermorganwall/skpr")
```

## Functions

* `gen_design()` generates optimal designs from a candidate set, given a model and the desired number of runs.
* `eval_design()` evaluates power parametrically for linear models, for normal and split-plot designs.
* `eval_design_mc()` evaluates power with a Monte Carlo simulation, for linear and generalized linear models. This function also supports calculating power for split-plot designs using REML. 
* `eval_design_survival_mc()` evaluates power with a Monte Carlo simulation, allowing the user to specify a point at which the data is censored.
* `eval_design_custom_mc()` allows the user to import their own libraries and use the Monte Carlo framework provided by skpr to calculate power.
* `calculate_power_curves()` provides an interface to automate the generation and evaluation of designs to create power versus sample size and effect size curves.
* `skprGUI()` opens up the GUI in either RStudio or an external browser.

If addition, the package offers two functions to generate common plots related to designs:

* `plot_correlations()` generates a color map of correlations between variables.
* `plot_fds()` generates the fraction of design space plot for a given design.

##skprGUI
 
`skprGUI()` provides an graphical user interface to access all of the main features of skpr. An interactive tutorial is provided to familiarize the user with the available functionality. Type `skprGUI()` to begin. Screenshots:




## Usage

```{r, include=FALSE}
set.seed(2)
```

```{r example, message = FALSE}
library(skpr)

#Generate a candidate set of all potential design points to be considered in the experiment
#The hypothetical experiment is determining what affects the caffeine content in coffee
candidate_set = expand.grid(temp = c(80,90,100), 
                            type = c("Kona","Java"),
                            beansize = c("Large","Medium","Small"))
candidate_set

#Generate the design (default D-optimal)
design = gen_design(candidateset = candidate_set, 
                    model = ~temp + type + beansize,
                    trials=12)
design

#Evaluate power for the design with an allowable type-I error of 5% (default)
eval_design(design)

#Evaluate power for the design using a Monte Carlo simulation. 
#Here, we set the effect size (here, the signal-to-noise ratio) to 1.5.
eval_design_mc(design, effectsize=1.5)

#Evaluate power for the design using a Monte Carlo simulation, for a non-normal response. 
#Here, we also increase the number of simululations to improve the precision of the results.
eval_design_mc(design, nsim=5000, glmfamily = "poisson", effectsize=c(2,6))

#skpr was designed to operate with the pipe (|>) in mind. 
#Here is an example of an entire design of experiments analysis in three lines:

expand.grid(temp = c(80,90,100), type = c("Kona","Java"), beansize = c("Large","Medium","Small")) |>
  gen_design(model = ~temp + type + beansize + beansize:type + I(temp^2), trials=24, optimality="I") |>
  eval_design_mc(detailedoutput = TRUE)

```

Owner

  • Login: tylermorganwall
  • Kind: user

GitHub Events

Total
  • Issues event: 1
  • Watch event: 8
  • Push event: 20
  • Create event: 1
Last Year
  • Issues event: 1
  • Watch event: 8
  • Push event: 20
  • Create event: 1

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 545
  • Total Committers: 6
  • Avg Commits per committer: 90.833
  • Development Distribution Score (DDS): 0.09
Past Year
  • Commits: 14
  • Committers: 1
  • Avg Commits per committer: 14.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
tylermorganwall t****w@g****m 496
George Khoury g****y@g****m 33
Khoury g****y@i****g 12
Thomas Holder t****r@l****m 2
bpeaden 4****n 1
Dirk Eddelbuettel e****d@d****g 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 38
  • Total pull requests: 45
  • Average time to close issues: 4 months
  • Average time to close pull requests: 5 days
  • Total issue authors: 21
  • Total pull request authors: 5
  • Average comments per issue: 3.53
  • Average comments per pull request: 0.51
  • Merged pull requests: 41
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 2
  • Pull request authors: 0
  • Average comments per issue: 1.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ugroempi (6)
  • comatrion (5)
  • StevenCHowell (4)
  • Lefty2021 (3)
  • tylermorganwall (2)
  • mr-september (2)
  • HenrikBengtsson (2)
  • peterj00 (1)
  • rgriff35 (1)
  • caebergs (1)
  • tsbaguley (1)
  • wdkrnls (1)
  • kdevkdev (1)
  • cegbuna (1)
  • CocafeDevBrew (1)
Pull Request Authors
  • GeorgeMKhoury (30)
  • tylermorganwall (12)
  • eddelbuettel (1)
  • speleo3 (1)
  • bpeaden (1)
Top Labels
Issue Labels
enhancement (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • cran 1,422 last-month
  • Total docker downloads: 21,777
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 30
  • Total maintainers: 1
cran.r-project.org: skpr

Design of Experiments Suite: Generate and Evaluate Optimal Designs

  • Versions: 25
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1,422 Last month
  • Docker Downloads: 21,777
Rankings
Stargazers count: 4.3%
Forks count: 5.0%
Downloads: 11.7%
Average: 17.3%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Maintainers (1)
Last synced: 6 months ago
conda-forge.org: r-skpr
  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 31.9%
Dependent repos count: 34.0%
Forks count: 36.7%
Average: 38.5%
Dependent packages count: 51.2%
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.0.2 depends
  • shiny * depends
  • Rcpp >= 0.11.0 imports
  • car * imports
  • doParallel * imports
  • doRNG * imports
  • foreach * imports
  • future * imports
  • gt * imports
  • iterators * imports
  • lazyeval * imports
  • lme4 * imports
  • lmerTest * imports
  • magrittr * imports
  • methods * imports
  • progress * imports
  • promises * imports
  • rintrojs * imports
  • scales * imports
  • shinyjs * imports
  • shinythemes * imports
  • stats * imports
  • survival * imports
  • utils * imports
  • viridis * imports
  • mbest * suggests
  • testthat * suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite