adapmixmod: Fit two-component mixture model

Description Usage Arguments Value

View source: R/adapmixmod.R

Description

For internal use in the mixADA GUI: Fit a mixture model (with or without additional random effects within subject), order resulting clusters by estimated means of the subgroups.

Usage

1
2
3
4
5
adapmixmod(DATINT, nrep = 10, design = c("c2", "h2", "c1", "h1"), 
varfix = c("no", "ran", "res", "bothranres"), aggfun = "mean")

adapmixmodsampleID(DATINT, nrep = 10, 
aggsamples = c("mean", "median"))

Arguments

DATINT

an object obtained from normalizing function xxx

nrep

single integer, the number of replicated fits in intializing the mixture model, passed to initFlexmix(nrep)

design

"c2", "c1" invokes fitting a mixture model with between subject variance and additional random effect for the technical replications runsmodel within subject, and a residual variance. "h2" invokes fitting a mixture model with between subject variance and additional random effect for the interaction sampleID:runs within subject, and a residual variance. "c1" invokes fitting a mixture model fitting a mixture model with between subject variance and additional random effect for the technical replications runsmodel within subject, and a residual variance. "h1" invokes fitting a mixture model with random effect subjects and a residual variance term.

varfix

a single chracter string, defining which variance components are taken to be equal between the two subgroups: "no": random effects and resiudal variance equal between subgroups, "ran", random effects equal, resiudal variance different between subgroups, "res", random effects different, resiudal variance equal between subgroups, "bothranres", random effects and resiudal variance different between subgroups. Note that varfix is ignored if design="h1", as there is only a subject specific variance and a residual error.

aggfun

function to summarize observations within each biological sample (sampleID) for initializing clusters

aggsamples

function to summarize observations within each biological sample for running a simple mixture model without random effects in adapmixmodsampleID

Value

a list


schaarschmidt/mixADA documentation built on May 29, 2019, 3:25 p.m.