Learn R Programming

INLAvaan (version 0.2.3)

fit_skew_normal_samp: Fit a skew normal distribution to a sample

Description

Fit a skew normal distribution to a sample

Usage

fit_skew_normal_samp(x)

Value

A list with fitted parameters:

  • xi: location parameter

  • omega: scale parameter

  • alpha: shape parameter

  • logC: log-normalization constant

  • k: temperature parameter

  • rsq: R-squared of the fit

Note that logC and k are not used when fitting from a sample.

Arguments

x

A numeric vector of sample data.

Details

Uses maximum likelihood estimation to fit a skew normal distribution to the provided numeric vector x.

Examples

Run this code
x <- rnorm(100, mean = 5, sd = 1)
unlist(fit_skew_normal_samp(x))

Run the code above in your browser using DataLab