CVp2CV: Decompose CV(T) and CV(R) from 'pooled' CV of T/R

Description Usage Arguments Details Value Author(s) Examples

View source: R/helper.R

Description

Helper function to calculate CV(T) and CV(R) from a pooled CV(T/R) assuming a ratio of the intra-subject variances.

Usage

1
CVp2CV(CV, ratio = 1.5)

Arguments

CV

‘pooled’ CV of T and R (as ratio, not percent).

ratio

Ratio of the intra-subject variances s^2(T)/s^2(R).
May be a vector.

Details

In case of knowing only the CV(T/R) f.i. from an ordinary cross-over you can calculate the components CV(T) and CV(R) assuming a ratio of the intra-subject variances.
The formula the function is based on:
log(1.0 + CV^2) = (sWT^2 + sWR^2)/2
Insert sWT^2 = ratio * sWR^2 and solve for sWR^2.

Value

Returns a numeric vector of the CV values for Test and Reference if only one ratio is given.
Returns a matrix with named columns CVwT and CVwR if ratio is given as vector.

Author(s)

D. Labes

Examples

1
2
3
CVp2CV(0.4, ratio=2)
# gives
# [1] 0.4677952 0.3225018

Example output

[1] 0.4677952 0.3225018

PowerTOST documentation built on Jan. 18, 2021, 5:07 p.m.