SqSin: Back Transformation of Predicted Values from A Statistical...

View source: R/melonnpan_utilities.R

SqSinR Documentation

Back Transformation of Predicted Values from A Statistical Model with ArcSine Square Root Transformed Compositional Response Variable

Description

This function applies back transformation to the predicted values of a statistical model with arcsine square root transformed compositional response variable.

Usage

SqSin(x, adjust = TRUE)

Arguments

x

A numerical vector of arcsine square root transformed compositions or proportions.

adjust

Should values less than 0 be mapped to 0 and values greater than pi/2 be mapped to 1? Defaults to TRUE.

See Also

ArcSin

Examples


# This is a simple demonstration
y <- ArcSin(runif(100,0,1))
x <- rnorm(100,0,1)
z <- predict(lm(y ~ x))
SqSin(z)

biobakery/melonnpan documentation built on March 26, 2024, 11:42 p.m.