wavefunction_fit: Fit Wave Function

Description Usage Arguments Details Value See Also Examples

View source: R/wavefunction.R

Description

Fit wave function coefficients from a sample

Usage

1
wavefunction_fit(x, degree)

Arguments

x

a sample from a distribution on the reals

degree

the Hermite polynomial degree to fit

Details

Fits a Hermite wave function density of degree degree. The values will maximize the likelihood under the density specified under dwavefunction. A more accurate representation is obtained for a low degree if the sample is standardized to have mean zero and variance one-half. There are diminishing returns to degree greater than 20 or so due to floating point limitations.

Value

a numeric vector of coefficients of length degree+1

See Also

Madeleine B. Thompson, “Wave function representation of probability distributions,” 2017, https://arxiv.org/abs/1712.07764.

Examples

1
2
  x <- rt(100, df = 5)
  w <- wavefunction_fit(x, degree = 6)

Example output



wavefunction documentation built on May 2, 2019, 7:04 a.m.