ch.batchOverlapFlex.old: For each in a set of combinations, run ch.distOverlapFlex...

View source: R/ch.batchOverlapFlex1.r

ch.batchOverlapFlex.oldR Documentation

For each in a set of combinations, run ch.distOverlapFlex Function

Description

This function runs ch.distOverlap for all the combinations of distributions identified in df.combns.

Usage

ch.batchOverlapFlex.old(
  values,
  items,
  itemSet,
  df.combns,
  numRuns = 1000,
  combFun = as.vector,
  combFunX = NULL,
  combFunY = NULL,
  outFile = NULL
)

Arguments

values

a vector of the values in the distributions.

items

a vector that identifies the item that each value is linked to.

itemSet

a vector of items that you want to run the bootstraps for.

df.combns

a vector of combinations that identifies the items (by index number of itemSet) whose values should be combined and compared against every other combination in this vector.

numRuns

the number of runs to do in the bootstrap.

combFun

If there are multiple items contributing to a single distribution, this function describes how the values will be combined across items in both the X and Y distributions. The function must combine the rows of a matrix and return the result as a vector (e.g., rowMeans). The default just flattens the matrix into one large vector. DEFAULT = as.vector

combFunY

This specifies the combFun for the Y distribution. If there are multiple items contributing to a single Y distribution, this function describes how the values will be combined across items. The function must combine the rows of a matrix and return the result as a vector (e.g., rowMeans). The default just flattens the matrix into one large vector. DEFAULT = NULL

outFile

the name of a text file that will be output as the bootstrap runs. This is filled incrementally just in case the program dies. DEFAULT = NULL - will not write a file

Value

a dataframe with the overlap statistics for each set of distributions compared. See ch.distOverlap

Examples

ch.batchOverlapFlex (data$responses, data$items,itemSet,df.combns,numRuns=1000, outFile ="out.txt" )

ccpluncw/ccpl_R_chValues documentation built on Feb. 12, 2024, 4:21 a.m.