R: Tidying methods for fitdistr objects from the MASS package

fitdistr_tidiers {broom} | R Documentation

## 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:

`term` | The term that was estimated
`estimate` | Estimated value
`std.error` | Standard error of estimate

`glance.fitdistr` returns a one-row data.frame with the columns

`n` | Number of observations used in estimation
`logLik` | log-likelihood of estimated data
`AIC` | Akaike Information Criterion
`BIC` | Bayesian Information Criterion

### Examples

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

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

    tidy(fit)
    glance(fit)

[Package broom version 0.4.2 Index]