lme_analysis: LME Analysis

View source: R/lme_analysis.R View source: R/comb.R

lme_analysisR Documentation

LME Analysis

Description

lme_analysis analyzes the data from a single simulated trial

Usage

lme_analysis(trialdesign_set, dat, op)

Arguments

trialdesign_set

The set of all pathways for the clinical trial

dat

A dat file as generated by generateData

op

an options file with the following components:

  • op$useDE=TRUE Binary: should the LME model use expectnacy information if available?

  • op$t_random_slope=FALSE Binary: should the LME model use random slopes, as well as random intercepts, for participants?

  • op$full_model_out=FALSE Binary: if false, will output model parameters as a row of numeric values for simulation processing (most common); if true, will output an array that allows you to examine the results of a single analysis in more detail

Details

Analyzes the simulated data (including all paths) from a single simulated trial. Most often called by generateSimualtedResults. See vignettes for additional information.

Value

Generally returns a one row data table with components:

  • out$beta The coefficient corresponding to an interaction between biomarker and outcome

  • out$betaSE Standard error of the above coefficient

  • out$p p-value conveying the statistical significance of the coefficient

  • out$issingular Was the model fit flagged as singular?

  • out$warning Any warnings from fitMsgs

However, if you have full_model_out set to TRUE, you will instead get an array with components:

  • form The model fit by lmer

  • fit The output of lmer

  • datamerged The data in the form it was provided to lmer

  • stdout The standard one row data table that's usually returned when full_mode_out is set to FALSE, with beta, betaSE, etc

Examples

# See vignettes 1 & 2 for examples of how to call from the function generateSimualtedResults.R
# See vignette 3 for an example of how to apply lme_analysis to actual clincal trial results

rchendrickson/pmsimstats documentation built on Nov. 28, 2024, 11:05 a.m.