Learn R Programming

wrMisc (version 2.1.0)

checkGrpOrderSEM: Check Order Of Multiple Groups Including Non-Overlapping SEM-Margins

Description

This function tests each line of 'x' if expected order of (replicate-) groups (defined in 'grp') appears intact, while inluding SEM of groups (replicates) via a proportional weight 'sdFact' as (avGr1-gr1SEM) < (avGr1+gr1SEM) < (avGr2-gr2SEM) < (avGr2+gr2SEM).

Usage

checkGrpOrderSEM(
  x,
  grp,
  sdFact = 1,
  revRank = TRUE,
  shrink1sampSd = TRUE,
  silent = FALSE,
  debug = FALSE,
  callFrom = NULL
)

Value

This function returns a list with $rankExp as logical vector telling if group-ranges are asending and $lims wityh the sd-based group-limits

Arguments

x

matrix or data.frame

grp

(factor) to organize replicate columns of (x)

sdFact

(numeric) is proportional factor how many times the SD will be used for defining lower & upper bounds of each group (ie sdFact=2 will mimick 95-percent confidence intervals)

revRank

(logical) (not implemented yet : optionally revert rank)

shrink1sampSd

(logical)

silent

(logical) suppress messages

debug

(logical) additional messages for debugging

callFrom

(character) allow easier tracking of messages produced

Details

This function may be used for comparing groups of measures with expected profiles (by matching expected order) to check if data in 'x' represt ascending groups ('grp') . Groups of size=1: The sd (and SEM) can't be estimated directly without any replicates, however, an estimate can be given by shrinking if 'shrink1sampSd'=TRUE under the hypothesis that the overall mechanisms determining the variances is constant across all samples.

See Also

takes only 10

Examples

Run this code
mat1 <- matrix(rep(11:24,3)[1:40], byrow=TRUE, ncol=8)
dimnames(mat1) <- list(letters[1:nrow(mat1)], paste(rep(LETTERS[3:1], each=3)[-1], 
  rep(1:3, 3)[-1], sep="."))
checkGrpOrderSEM(mat1, grp=gl(3,3, labels=LETTERS[3:1])[-1])

Run the code above in your browser using DataLab