ch.batchOverlapPromptFile: Calculate the distributional overlaps for item combinations...

View source: R/ch.batchOverlapPromptFile.r

ch.batchOverlapPromptFileR Documentation

Calculate the distributional overlaps for item combinations specified in the df.prompts dataframe

Description

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

Usage

ch.batchOverlapPromptFile(
  values,
  items,
  df.prompts,
  itemAcolNames = "IA",
  itemBcolNames = "IB",
  numRuns = 1000,
  outFile = NULL,
  verbose = FALSE,
  combFun = ch.maxAveComb,
  ...
)

Arguments

values

A vector of the values in the distributions for each item.

items

A vector that identifies the item that each value (in the values option) is linked to.

df.prompts

A dataframe of item combinations that you want to run the bootstraps for. The each column should specify one item of the combination to be compared. Use "NA" for items in a column whereby no item is present.

itemAcolNames

A vector of strings that identifies the column names in df.prompts that contain the items whose values should be combined and compared to those items identified in the itemBcolNames columns.

itemBcolNames

A vector of strings that identifies the column names in df.prompts that contain the items whose values should be combined and compared to those items identified in the itemAcolNames columns.

numRuns

the number of runs to do in the bootstrap. DEFAULT = 1000.

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

verbose

A boolean specifying whether to print the progress of the bootstrap. DEFAULT = FALSE

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 elements of a list that might be of different different lengths. The default just flattens the list into one large vector. DEFAULT = ch.maxAveComb (with probMax = 0.5)

Value

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

Examples

ch.batchOverlapPromptFile (data$responses, data$items,itemSet,df.prompts, c("IA1", "IA2"), c("IB1"), 1000, outFile ="out.txt" )

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