Last data update: 2014.03.03

R: Plots the optimum 'k' measures per individual (or group),...
effortR Documentation

Plots the optimum k measures per individual (or group), based upon a fixed total researcher effort.

Description

Given a fixed researcher effort (e.g., total number of assays able to be run), this function plots the optimum k measurements per individual to use in order to obtain the smallest confidence interval at an expected intraclass correlation coefficient (ICC) estimate. The results are depicted graphically, showing the tradeoff in confidence interval width with changing k.

Usage

effort(est.type = c("hypothetical", "pilot"), e = NULL, ICC = NULL,
x = NULL, y = NULL, data = NULL, alpha = 0.05)

Arguments

est.type

character string of either "hypothetical" indicating usage of the given values of effort (e) and intraclass correlation coefficient (ICC) or if "pilot" is specified then to calculate these from the dataset provided. Just the first letter may be used.

e

the total effort (n individuals times k measurements per individual). May be a vector of effort levels.

ICC

expected intraclass correlation coefficient

x

column name of data indicating the individual or group ID from a pilot study

y

column name of data indicating the measurements from a pilot study

data

a data.frame from a pilot experiment

alpha

the alpha level to use when estimating the confidence interval

Details

More than one e may be given. In this case, the graphical result portrays multiple lines - each representing a different e

When est.type="pilot", the function automatically generates an effort 10 percent larger and smaller than the calculated effort from the pilot data.

Author(s)

Matthew Wolak matthewwolak@gmail.com

See Also

Nest

Examples

#Example 1
  effort(est.type = "h", e = c(30, 60, 120), ICC = 0.2)

#Example 2
  data(ChickWeight)
  effort(est.type = "p", x = Chick, y = weight, data = ChickWeight)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(ICC)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/ICC/effort.Rd_%03d_medium.png", width=480, height=480)
> ### Name: effort
> ### Title: Plots the optimum 'k' measures per individual (or group), based
> ###   upon a fixed total researcher effort.
> ### Aliases: effort
> 
> ### ** Examples
> 
> #Example 1
>   effort(est.type = "h", e = c(30, 60, 120), ICC = 0.2)
> 
> #Example 2
>   data(ChickWeight)
>   effort(est.type = "p", x = Chick, y = weight, data = ChickWeight)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>