make.adeba: Initialize a density estimate

Description Usage Arguments Value Author(s)

View source: R/calculate.r

Description

Initialize a density estimate

Usage

1
2
3
make.adeba(data, range = c(Inf, Inf), alpha = NULL, beta = 0.5, pilot,
  transform = TRUE, na.rm = FALSE, parallel = FALSE,
  log_prior = uniform_log_prior)

Arguments

data

Dataset.

range

Domain of each variable (column) of the dataset. The idea is to allow for bounded kernels in the future, but at the moment this argument has no effect.

alpha

Alpha values controlling the global bandwidth scaling. This should be set to NULL, implying automatic estimation from the data, unless you know what you are doing.

beta

See adeba.

pilot

Pilot function values for the first iteration. Leave unspecified to use a constant pilot.

transform

If estimating multivariate densities, this argument controls whether the dataset should be pre-rotated and scaled before estimation. If the covariance matrix of data is large this is a very good idea, but it takes a litte extra time to do.

na.rm

Whether to remove observations with missing values (TRUE) or throw an error (FALSE).

parallel

See adeba.

log_prior

A function that calculates a log prior from a data frame with parameters. See log_prior for options and details.

NOTE:
Unless you know ADEBAs internals well you should probably not touch this argument. It was only exposed to facilitate analyses on the prior's importance, or rather lack of it, which were added as a supplement to the original publication.

Value

An unfitted density estimate that it to be passed to iterate. The estimate consist of the following components:

iterations

Number of iterations calculated.

parameters

All the parameters and posterior values.

bandwidths

Bandwidths corresponding to the parameters. These are pre-calculated to make the results easier for the user to digest and manipulate, and since are often needed multiple times.

distance

Distance matrix of the original data set.

constant

Logical vector marking columns in the data set without any variation. These are excluded from the analysis.

transform

To be able to use spherical kernels on multivariate data sets with variables of very different variances or high linear dependence, a PCA-based transformation is applied to the data prior to computation. This element contains that function.

retransform

Function for converting transformed data back to the original domain. Needed by radeba.

Author(s)

Christofer B<c3><a4>cklin


adeba documentation built on May 2, 2019, 3:21 a.m.

Related to make.adeba in adeba...