qwickr.cont: Summarize continuous data and test hypotheses

View source: R/qwickr.cont.R

qwickr.contR Documentation

Summarize continuous data and test hypotheses

Description

Analyze continuous data and test hypotheses

Usage

qwickr.cont(db, design="parallel", outcomevar="", idvar="", groupvar="", 
timevar="", visitnumbers=c(), baselinevisit="", speccomp1=NA, speccomp2=NA, 
lloq=NA, mimp="cart", locf=FALSE,  noimp=TRUE, runpairwise=FALSE, adj=FALSE,
within.group="t-test", covs="FFFFTF", assume.normal.dist=FALSE, 
useranks=FALSE, useglm=FALSE, usegee=FALSE, glmgeefamily=NULL,
exportfile=c(".doc"), exportpath="", dbexport="", filesuffix="")

Arguments

db

Data frame

design

specify the study design. Options: c("parallel", "crossover").

outcomevar

Name of outcome variable (string)

idvar

Name of the unique subject/particpant ID variable (string)

groupvar

Name of grouping variable (string)

timevar

Name of the time variable (string)

visitnumbers

A vector of visit numbers to be included in analysis, excluding reference visit (baseline/screening)

baselinevisit

Reference visit number (baseline/screening)

speccomp1

Special visit numbers to compare in addition to comparison to baseline. must be a subset of visitnumbers. speccomp1 is the baseline to which speccomp2 is compared. e.g. to compare visits 3 and 4, speccomp1=3, speccomp2=4

speccomp2

Special visit numbers to compare in addition to comparison to baseline. must be a subset of visitnumbers. speccomp1 is the baseline to which speccomp2 is compared. e.g. to compare visits 3 and 4, speccomp1=3, speccomp2=4

lloq

value to impute everywhere there's a value less than the lower limit of quantification, denoted by -33

mimp

conduct multiple imputation? If yes, specify imputation method for multiple imputations (default: Classification and Regression Trees (cart)). See help docs for MICE package for more options. If multiple imputation not desired, use ""

locf

conduct LOCF imputation? (T/F)

noimp

run analysis for non-imputed dataset? (default=T)

runpairwise

conduct between-group pairwise comparisons? (T/F)

adj

adjust alpha for between-group pairwise comparisons? (T/F)

within.group

calculate change in outcome from ‘baselinevisit’ to all other visits and conduct within-group paired comparisons using the mixed model (option: "model"), paired t-tests/Wilcoxon Signed Rank Test (option: "t-test"), both (option: "both"). If change in outcome from ‘baseline’ is not desired, no within-group comparisons will be done (option: "none")

covs

Covariance structures to test for mixed-models.Options: Compound Symmetry (T/F), Heterogeneous CS (T/F), #Autoregressive (T/F), Heterogeneous Autoregressive (T/F), no covariance structure (T/F), no covariance structure using lme4::lmer() (T/F). Default: "FFFFTF"

assume.normal.dist

assume that the data is normally distributed? (T/F)

useranks

in the case of intractable non-normality & assume.normal.dist=F, use ranked ANOVA instead of Wilcoxon/Kruskal Wallis (T/F)

useglm

analyze raw data using Poisson distribution OR perform logistic regression? (T/F). Specify appropriate glmgeefamily

usegee

analyze raw data using General Estimating Equations? (T/F). Specify appropriate glmgeefamily

glmgeefamily

specify which family to use e.g. for logistic regression, use "binomial" and set useglm=T; for Poisson, use "poisson"

exportfile

Export the output to file? Options: c(".csv", ".doc"). See q.write.to.word, stats::write.csv

exportpath

Path relative to the working directory where exported files will be saved e.g. "OUTPUT" Do not begin or end with a backslash. If left empty, file will be exported to the working directory.

dbexport

specify which dataset to be exported. Options: c("noimp", "locf", "mimp", "")

filesuffix

filesuffix to be included in the file name for the exported output file

Details

Analyze continuous data and test hypotheses

Value

Returns a list containing data frame of means, standard deviations, medians, minimum-maximum ranges for each study arm and an associated p-value for each study time point in a parallel or crossover, repeated measures or non-repeated measures design.

Author(s)

Abdul Malik Sulley

Examples

q.data <- rmdata
qwickr.cont(db=q.data, design="parallel", outcomevar="BIOMARKER", idvar="SUBJECTNUM",
groupvar="GROUPING", timevar="VISITNUMBER", baselinevisit="1", visitnumbers=c(2:4), 
mimp="", locf=TRUE,  noimp=TRUE,
runpairwise=FALSE, adj=FALSE, within.group="t-test", covs="FFFFTF", 
assume.normal.dist=FALSE, 
useranks=TRUE, useglm=FALSE, usegee=FALSE, glmgeefamily=NULL, 
exportfile=c(".doc"), exportpath="", dbexport="", filesuffix="mysuffix")

qwickmalik/qwickr documentation built on March 30, 2022, 2:59 p.m.