biLocal: Estimate the local correlation between two variables when the...

Description Usage Arguments Value Examples

View source: R/bivariate_estimation.R

Description

Estimate the local correlation between two variables when the marginals are standard normal.

Usage

1

Arguments

data

The data matrix, one row per observation. The marginals are assumed to be standard normal. They can be transformed using the transLocal-function.

grid

The grid where the local correlation will be estimated.

h

The vector of bandwidths. Length must be 2.

Value

A list with 4 elements: $data is the data, $grid is the grid, $par.est is a vector of the estimated local correlations, and $f.est are the local likelihood density estimates there.

Examples

1
2
3
4
5
6
7
data <- cbind(rt(100, df = 10), rt(100, df = 10))
grid <- matrix(c(-1, -1, 0, 0, 1, 1), ncol = 2, byrow = TRUE)
trans <- transLocal(data = data, grid = grid)

estimates <- biLocal(data = trans$transformed.data,
                     grid = trans$transformed.grid,
                     h = c(1, 1))

hotneim/lgde documentation built on May 17, 2019, 4:52 p.m.