| funInfoFun {qAnalyst} | R Documentation |
funInfoFun receives a vector of data and a hyphotized distribution. It estimates hyphotized distribution parameters.
Anderson Darling statistics is provided, if desidered.
funInfoFun(x, fun, adStats = TRUE)
x |
a vector of data |
fun |
name of function density. This name is processed internally by switchFun. |
adStats |
boolean value to specify if Anderson Darling statistics shall be calculated. |
funInfoFun uses switchFun to parse given fun argument into R internal distribution nomenclature. funInfoFun calls MASS function fitdistr to estimate parameters (via maximum likelihood). If required andersonDarlingFun function is called to obtain goodnes of fit statistic and corresponding p-value.
The returned list contains items that are the corresponding distribution functions to obtain random numbers, quantiles and density.
A list containing the following items:
densfun |
distribution name as specified by user |
theta |
named vector containing user specification |
theta |
named vector containing parameter specification |
qfun |
corresponding internal r function to obtain quantiles |
dfun |
corresponding internal r function to obtain density |
rfun |
corresponding internal r function to obtain random values |
pfun |
corresponding internal r function to obtain CDF |
funInfoFun estimates parameters by maximum likelihood. Numerical MLE may not always converge. Warning message are thrown in such case.
Moreover, user shall check that x vector values lie in the natural support of the distribution specified in fun
funInfoFun returns a vector of class "infoFun".
Giorgio Spedicato
Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth edition. Springer.
data(warpTiles) infoX=funInfoFun(x=warpTiles$warping, fun="weibull") str(infoX)