Learn R Programming

lognorm (version 0.1.6)

estimateSumLognormalSample: estimateSumLognormalSample

Description

Estimate the parameters of the lognormal approximation to the sum

Usage

estimateSumLognormalSample(mu, sigma, resLog, 
    effAcf = computeEffectiveAutoCorr(resLog), 
    isGapFilled = logical(0), na.rm = TRUE)

Arguments

mu

numeric vector of center parameters of terms at log scale

sigma

numeric vector of variance parameter of terms at log scale

resLog

time series of model-residuals at log scale to estimate correlation

effAcf

effective autocorrelation coefficients (may provide precomputed for efficiency or if the sample of resLog is too small) set to 1 to assume uncorrelated sample

isGapFilled

logical vector whether entry is gap-filled rather than an original measurement, see details

na.rm

neglect terms with NA values in mu or sigma

Value

numeric vector with components mu, sigma, and nEff, the parameters of the lognormal distribution at log scale (Result of link{estimateSumLognormal}) and the number of effective observations.

Details

If there are no gap-filled values, i.e. all(!isGapFilled) or !length(isGapFilled) (the default), distribution parameters are estimated using all the samples. Otherwise, the scale parameter (uncertainty) is first estimated using only the non-gapfilled records.

Also use isGapFilled == TRUE for records, where sigma cannot be trusted. When setting sigma to missing, this is also affecting the expected value.

If there are only gap-filled records, assume uncertainty to be (before v0.1.5: the largest uncertainty of given gap-filled records.) the mean of the given multiplicative standard deviation