API
AverageShiftedHistograms.ash
AverageShiftedHistograms.ash
AverageShiftedHistograms.ash!
AverageShiftedHistograms.cdf
AverageShiftedHistograms.extendrange
AverageShiftedHistograms.histdensity
AverageShiftedHistograms.nout
AverageShiftedHistograms.pdf
AverageShiftedHistograms.pdf
AverageShiftedHistograms.xy
AverageShiftedHistograms.xyz
StatsAPI.nobs
AverageShiftedHistograms.ash!
— Methodash!(o::Ash; kw...)
ash!(o::Ash, newdata; kw...)
Update an Ash estimate with new data, smoothing parameter (keyword m
), or kernel (keyword kernel
):
AverageShiftedHistograms.ash
— MethodUnivariate Ash
ash(x; kw...)
Fit an average shifted histogram to data x
. Keyword options are:
rng
: values over which the density will be estimatedm
: Number of adjacent histograms to smooth overkernel
: kernel used to smooth the estimate
Bivariate Ash
ash(x, y; kw...)
Fit a bivariate averaged shifted histogram to data vectors x
and y
. Keyword options are:
rngx
: x values where density will be estimatedrngy
: y values where density will be estimatedmx
: smoothing parameter in x directionmy
: smoothing parameter in y directionkernelx
: kernel in x directionkernely
: kernel in y direction
Mutating an Ash object
Ash objectes can be updated with new data, smoothing parameter(s), or kernel(s). They cannot, however, change the ranges over which the density is estimated. It is therefore suggested to err on the side of caution when choosing data endpoints.
# univariate
ash!(obj; kw...)
ash!(obj, newx, kw...)
# bivariate
ash!(obj; kw...)
ash!(obj, newx, newy; kw...)
AverageShiftedHistograms.cdf
— Methodcdf(o::Ash, x::Real)
Return the estimated cumulative density at the point x
.
AverageShiftedHistograms.extendrange
— Functionextendrange(x, s = .5, n = 200)
Create a range of length n
starting at s
standard deviations below minimum(x)
and ending at s
standard deviations above maximum(x)
AverageShiftedHistograms.histdensity
— Methodreturn the histogram values as a density (integrates to 1)
AverageShiftedHistograms.nout
— Methodreturn the number of observations that fell outside of the histogram range
AverageShiftedHistograms.pdf
— Methodpdf(o::Ash, x::Real)
Return the estimated density at the point x
.
AverageShiftedHistograms.pdf
— Methodpdf(o::Ash2, x::Real, y::Real)
Return the estimated density at the point (x, y)
.
AverageShiftedHistograms.xy
— Methodreturn the range and density of a univariate ASH
AverageShiftedHistograms.xyz
— Methodreturn ranges and density of biviariate ASH
StatsAPI.nobs
— Methodreturn the number of observations