testPathForDirectionality: Test a path for directionality

Description Usage Arguments Value Examples

View source: R/TrajectoryGeometry.R

Description

This is the core function of this package. It takes a path, and a choice of statistical measure and computes a statistical significance for the directionality of that path.

Usage

1
2
3
4
5
6
7
8
9
testPathForDirectionality(
path,
from = 1,
to = nrow(path),
d = ncol(path),
randomizationParams,
statistic,
N
)

Arguments

path

- An n x m matrix representing a series of n points in dimension m.

from

- The starting place along the path which will be treated as the center of the sphere. This defaults to 1.

to

- The end point of the path. This defaults to nrow(path).

d

- The dimension under consideration. This defaults to ncol(path)

randomizationParams

- A character vector which is used to control the production of randomized paths for comparison.

statistic

- Allowable values are 'median', 'mean' or 'max'

N

- The number of random paths to generated for statistical comparison to the given path.

Value

This returns a list giving whose entries are: pValue - the p-value for the path and statistic in question; sphericalData - a list containing the projections of the path to the sphere, the center of that sphere and the statistic for distance to that center; randomDistances - the corresponding distances for randomly chosen; paths; randomizationParams - the choice of randomization parameters

Examples

1
2
3
4
5
6
7
randomizationParams = c('byPermutation','permuteWithinColumns')
p = testPathForDirectionality(path=straight_path,
                            randomizationParams=randomizationParams,
                            statistic='median',N=100)
q = testPathForDirectionality(path=crooked_path,from=6,
                            randomizationParams=randomizationParams,
                            statistic='median',N=100)

AnnaLaddach/TrajectoryGeometry documentation built on Jan. 28, 2021, 10:41 a.m.