fitplot: Goodness-of-fit Plot

Description Usage Arguments Value See Also Examples

View source: R/fitplot.R

Description

Function to generate a goodness-of-fit plot for output of the fit.distribution function.

Usage

1
fitplot(x, date = NULL, main = NULL, xlab = 'data', filename = NULL)

Arguments

x

output object of the fit.distribution function

date

reference date for the distribution parameters (optional)

main

plot title (optional)

xlab

X-axis label for plot (optional)

filename

if provided, the plot is written to a .png file with this filename, otherwise console output is used

Value

A figure displaying goodness-of-fit information.

See Also

standardized.index, fitplot

Examples

1
2
3
4
5
6
7
8
data(Ukkel_RR)
# calculate the total rainfall for all months June
monthly.precipitation <- apply.monthly(x=Ukkel_RR,FUN=sum)
data <- c(coredata(monthly.precipitation[format(index(monthly.precipitation),'%m')=='06']))
# fit gamma distribution to the data?pn
fit <- fit.distribution(data=data,distr='gamma',method='mle')
# goodness of fit plot
fitplot(x=fit,main='June precipitation',xlab='precipitation (mm)')

WillemMaetens/standaRdized documentation built on May 21, 2019, 10:29 a.m.