est_params_weibull: Estimate the parameters of the weibull distribution from...

View source: R/est_params_weibull.R

est_params_weibullR Documentation

Estimate the parameters of the weibull distribution from which the sample data were taken.

Description

Given a data frame and the name of a continuous variable from the data frame, suppose the -logCCDF of the variable on a log-log scale is linear, then its distribution can be modeled by the weibull distribution, of which the parameters can be estimated by this function.

Usage

est_params_weibull(df, varname, digits = 3)

Arguments

df

A data frame.

varname.

String, name of a continuous variable with an empirical distribution approximately weibull.

digits.

Integer, the number of digits after decimal point to keep for the estimated parameter values.

Value

Estimates of the shape (k) and location (lambda) parameters of the weibull distribution.

Examples

library(ezplot)
est_params_weibull(births, 'diffs')
est_params_weibull(births, 'diffs', digits = 4)

gmlang/ezplot documentation built on Sept. 18, 2022, 6:33 a.m.