knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of stacmr
is to provide functionality for state-trace analysis via conjoint monotonic regression. The main function for this is cmr()
. In addition, it provides functionality for fitting monotonic regression models with function mr()
.
You can install the released version of stacmr from CRAN with:
## NOT YET AVAILABLE FROM CRAN
And the development version from GitHub with:
# install.packages("devtools") devtools::install_github("monotonicity/stacmr")
This is a basic example.
library(stacmr) ## load data from Exp. 1 of Dunn, Newell, & Kalish (2012) data(delay) str(delay, width = 78, strict.width = "cut") stats <- sta_stats( data = delay, col_value = "pc", col_participant = "participant", col_dv = "structure", col_within = "block", col_between = "delay" ) stats ### cmr() fits conjoint monotonic regression for state-trace analysis ## Fit and test CMR State-Trace Analysis Model st_d1 <- cmr( data = delay, col_value = "pc", col_participant = "participant", col_dv = "structure", col_within = "block", col_between = "delay", nsample = 1e4 ) st_d1 ## basic information about conjoint-monotonic model summary(st_d1) ## basic information plus estimated cell means ### cmr() also accepts partial order. ## CMR model is tested against MR model with partial order st_d3 <- cmr( data = delay, col_value = "pc", col_participant = "participant", col_dv = "structure", col_within = "block", col_between = "delay", partial = "auto" ) st_d3 summary(st_d3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.