designmatrix_gui: Graphical Interface for Specifying Design Matrices

Description Usage Arguments Details Value Examples

View source: R/designmatrix_gui.R

Description

Loads a graphical interface (via Shiny) to specify and adjust a design matrix given a data set with categorical predictors.

Usage

1
designmatrix_gui(df = NULL, select = NULL, dm = NULL, digits = 2)

Arguments

df

A data frame with the observations for the dependent variable and associated grouping variables.

select

A list with...

  1. The column name for the dependent variable.

  2. The set of column names for the grouping variables.

dm

An object of class designmatrix. If provided, the function will update the object based on the specifications of the summary_matrix element.

digits

The number of digits to round to when computing the group means.

Details

The app displays four tabs:

Conditions

Summary of conditions and their associated descriptive statistcs.

Design matrix

Matrix of inputs to allow users to customize the design matrix. Clicking the 'Update' button updates the design matrix across the other tabs.

Group means

Plot of the observed group means against the predicted values. Columns of the design matrix can be excluded to examine the impact of different effects.

Coefficients

Table showing how coefficients are combined to estimate the group means.

Once the user has finished customizing the design matrix, clicking the 'Save' button will stop the app and return the updated designmatrix object.

Value

An object of class designmatrix.

Examples

1
2
# Use 'crabs' data set from 'MASS' package
dm = designmatrix_gui( MASS::crabs, list( 'FL', c( 'sp', 'sex' ) ) )

rettopnivek/designmatrix documentation built on Jan. 13, 2020, 7:09 p.m.