m2beta: Convert logit transformed M-Values of proportional data back...

Description Usage Arguments Details Value Examples

View source: R/m2beta.R

Description

Despite conducting analysis of proportional data in M space, for publication figures the estimated values are commonly shown in the original space (range between 0 and 1). This function provides backscaling of the M values to original space by inverting the logit transformation done by beta2m()

Usage

1
m2beta(M)

Arguments

M

vector or matrix holding the original data

Details

Data are transformed according to

b=\frac{2^M}{2^M+1}

Value

A named vector/matrix with same dimensions as M and transformed values

Examples

1
2
3
4
    b = 1:99 / 100
    M = beta2m(b)
    plot(b,m2beta(M))
    print(all.equal(b, m2beta(M)))

Example output

[1] TRUE

preputils documentation built on July 1, 2020, 5:35 p.m.

Related to m2beta in preputils...