Learn R Programming

broom (version 0.4.0)

fitdistr_tidiers: Tidying methods for fitdistr objects from the MASS package

Description

These methods tidies the parameter estimates resulting from an estimation of a univariate distribution's parameters.

Usage

## S3 method for class 'fitdistr':
tidy(x, ...)

## S3 method for class 'fitdistr': glance(x, ...)

Arguments

x
An object of class "fitdistr"
...
extra arguments (not used)

Value

  • All tidying methods return a data.frame without rownames, whose structure depends on the method chosen.

    tidy.fitdistr returns one row for each parameter that was estimated, with columns:

  • termThe term that was estimated
  • estimateEstimated value
  • std.errorStandard error of estimate
  • glance.fitdistr returns a one-row data.frame with the columns
  • nNumber of observations used in estimation
  • logLiklog-likelihood of estimated data
  • AICAkaike Information Criterion
  • BICBayesian Information Criterion

Examples

Run this code
set.seed(2015)
x <- rnorm(100, 5, 2)

library(MASS)
fit <- fitdistr(x, dnorm, list(mean = 3, sd = 1))

tidy(fit)
glance(fit)

Run the code above in your browser using DataLab