paleodata_transformation: Transform data in an irregular time series object

View source: R/Proxytools_tools.R

paleodata_transformationR Documentation

Transform data in an irregular time series object

Description

Transform data in an irregular time series object

Usage

paleodata_transformation(xin, transformation_type = "logit")

Arguments

xin

Proxytibble with proxy data in 'zoo::zoo' format, or irregular time series object ('zoo::zoo'), xin can be multivariate

transformation_type

Type of transformation; Implemented methods: 'logit' (logit transformation), invlogit' (inverse logit transformation), 'probit' (probit transformation), 'invprobit' (inverse probit transformation), 'sqrt' (square-root transformation) 'quadratic' (quadratic transformation) 'log' (logarithmic transformation) 'exp' (exponential transformation) 'quantile' (quantile transformation to transform the time series into a standard Gaussian distribution) 'weighted quantile' (quantile transformation with re-scaling to preserve the variance in the original time series, i.e. results in a Gaussian distribution with mean zero and standard deviation according to the orginal standard deviation) 'nonneg' (Set negative values to zero) 'normalize' (center and standardize the time series) 'standardize' (standardize the time series, i.e. divide by its standard deviation) 'center' (center the time series, i.e. subtract its mean)

Value

Proxytibble with transformed proxy data in 'zoo::zoo' format, or transformed irregular time series object ('zoo::zoo')

See Also

logitlink (from ‘VGAM') for ’logit' and 'invlogit' transformations

probitlink (from ‘VGAM') for ’probit' and 'invprobit' transformations

orderNorm (from ‘bestNormalize') for ’quantile' transformation

normalize (from ‘PTBoxProxytools') for ’normalize', 'standardize', and 'center' transformations

Examples

# Load Monticchio example data from PTBoxProxydata
library(PTBoxProxydata)
mng <- PTBoxProxydata::ProxyDataManager()
monticchiodata <- PTBoxProxydata::load_set(mng,'monticchio_testset',zoo_format = 'zoo', force_file=TRUE)
# Transform the arboreal pollen signal using logit, square root, and quantile transformations
monticchio_logit <- paleodata_transformation(monticchiodata$proxy_data[[1]]/100,transformation_type="logit")
monticchio_sqrt <- paleodata_transformation(monticchiodata$proxy_data[[1]],transformation_type="sqrt")
monticchio_quantile <- paleodata_transformation(monticchiodata$proxy_data[[1]],transformation_type="quantile")
# Plot zoo data
plot(monticchio_logit)
plot(monticchio_sqrt)
plot(monticchio_quantile)


paleovar/ptboxproxytools documentation built on June 9, 2025, 1:40 a.m.