pseudo_obs: Pseudo-Observations

View source: R/tools.R

pseudo_obsR Documentation

Pseudo-Observations

Description

Compute the pseudo-observations for the given data matrix.

Usage

pseudo_obs(x, ties_method = "average", lower_tail = TRUE)

Arguments

x

vector or matrix random variates to be converted (column wise) to pseudo-observations.

ties_method

similar to ties.method of rank() (only "average", "first" and "random" currently available).

lower_tail

logical which, if 'FALSE“, returns the pseudo-observations when applying the empirical marginal survival functions.

Details

Given n realizations x_i=(x_{i1}, …,x_{id}), i \in ≤ft\lbrace 1, …,n \right\rbrace of a random vector X, the pseudo-observations are defined via u_{ij}=r_{ij}/(n+1) for i \in ≤ft\lbrace 1, …,n \right\rbrace and j \in ≤ft\lbrace 1, …,d \right\rbrace , where r_{ij} denotes the rank of x_{ij} among all x_{kj}, k \in ≤ft\lbrace 1, …,n \right\rbrace .

The pseudo-observations can thus also be computed by component-wise applying the empirical distribution functions to the data and scaling the result by n/(n+1). This asymptotically negligible scaling factor is used to force the variates to fall inside the open unit hypercube, for example, to avoid problems with density evaluation at the boundaries.

When lower_tail = FALSE, then pseudo_obs() simply returns 1 - pseudo_obs().

Value

a vector of matrix of the same dimension as the input containing the pseudo-observations.

Examples

# pseudo-observations for a vector
pseudo_obs(rnorm(10))

# pseudo-observations for a matrix
pseudo_obs(cbind(rnorm(10), rnorm(10)))

rvinecopulib documentation built on March 7, 2023, 6:20 p.m.