Slopetest: Slope statistics based Analysis for NIRS data.

Description Usage Arguments Details Value Author(s) References Examples

View source: R/Slopetest.R

Description

Estimate the slope statistics and conduct a nonparametric based test on the slope difference before transfuion and after trasfusion. If detection limit occurs at 15

Usage

1
Slopetest(Yvec,timevec,transfusionvec,SD_est=F,num.permu=1000)

Arguments

Yvec

The outcome of NIRS time series Y(t_{i}) of length N ranging from 15 to 100.

timevec

The time index of NIRS time series t_{i} of length N.

transfusionvec

The 0/1 indicator of the transfusion status X(t_{i}). X(t_{i})=0 means the current time point is before transfusion and X(t_{i})=1 means the current time point is after transfusion.

SD_est

Whether to estimate the SD of the SLOPE statistic for pre-transfusion and post-transfuion. Default value is FALSE.

num.permu

Number of permutation for permutation test. Default value is 1000.

Details

This function estimates the slope statistics before transfusion and after transfusion based on penalized regression spline method and tests the difference based on a within-band permutation approach. If there is detection limit occurs (15), it will impute the missed data based on a uniform distribution and estimate the slope statistics through a standard imputation approach. The statistical testing is conducted through a nested within-band permutation approach across all imputated datasets.

Value

An R vector from Slopetest containing Slope statistics and Pvalue in the following order:

Slope.before

The estimated Slope statistic before transfusion.

Slope.after

The estimated Slope statistic after transfusion.

Slope.diff

The estimated Slope statistic difference between before transfusion and after transfusion.

Pvalue

The pvalue of testing the Slope difference to be zero or not.

SD_pre

SD of the Slope statistic for pre-transfusion. Optional, only when SD_est = TRUE.

SD_post

SD of the Slope statistic for post-transfusion. Optional, only when SD_est = TRUE.

Author(s)

Yikai Wang [Emory], Xiao Wang [ICF]
Maintainer: Yikai Wang johnzon.wyk@gmail.com

References

Guo, Y., Wang, Y., Marin, T., Kirk, E., Patel, R., Josephson, C. Statistical methods for characterizing transfusion-related changes in regional oxygenation using Near-infrared spectroscopy in preterm infants. Statistical methods in medical research 28.9 (2019): 2710-2723.

Examples

1
2
3
4
5
6
7
8
9
# Data Simulation
dat = data.frame(Y= rep(0,100),t=1:100,trans = c(rep(0,50),rep(1,50)))
dat$Y = apply(dat,1,function(x){rnorm(1,5*rnorm(1),6*exp(rnorm(1)))})
dat$Y = dat$Y + 15 - quantile(dat$Y,0.3) 
dat$Y[dat$Y<=15] = 15


# Estimate the Slope statistics of the NIRS data and test on the difference. 
Slopetest(dat$Y,dat$t,dat$trans,FALSE,100)

NIRStat documentation built on July 1, 2020, 10:37 p.m.

Related to Slopetest in NIRStat...