Learn R Programming

fmx (version 0.1.2)

as.fmx.fitdist: Convert fitdist Objects to fmx Class

Description

To convert fitdist objects (from package fitdistrplus) to fmx class.

Usage

# S3 method for fitdist
as.fmx(x, ...)

Value

Function as.fmx.fitdist returns an fmx object.

Arguments

x

fitdist object

...

..

Examples

Run this code
library(fitdistrplus)
# ?fitdist
data(endosulfan, package = 'fitdistrplus')
ATV <- subset(endosulfan, group == 'NonArthroInvert')$ATV
log10ATV <- log10(ATV)
fln <- fitdist(log10ATV, distr = 'norm')
(fln2 <- as.fmx(fln))
hist.default(log10ATV, freq = FALSE)
curve(dfmx(x, dist = fln2), xlim = range(log10ATV), add = TRUE)

Run the code above in your browser using DataLab