Description Usage Arguments Details Value Author(s) References See Also Examples
This function takes a vector of counts and uses a mixed model approach to smooth it. A common use of this is smoothing binned counts of an observed quantity prior to estimating its density nonparametrically through the relative frequencies.
1 |
y |
the vector of counts |
sv2 |
the user-specified starting value for the variance of the random effects, see Details. |
err |
Tolerance for convergence, see Details |
verb |
logical value indicating whether to print diagnostics. |
The smoothing assumes that the counts are Poisson from a generalized linear mixed model, where the second differences are normally distributed. Using the extended likelihood approach described in Pawitan (2001) and the initial estimate sv2
for the variance of the random effects, the routine iteratetively optimizes the fixed and random contributions to the extended likelihood, until the estimate for the variance convergences with tolerance err
. The result is quite stable within a reasonable range of starting values and tolerances, and the function can be used for fairly automatic smoothing ((i.e. withou fixing a bandwidth parameter).
A list with three components:
fit |
the smoothed counts |
df |
the degrees of freedom used for smoothing at convergence |
sv2 |
the estimated variance at convergence, equivalent to |
Y. Pawitan and A. Ploner
Pawitan Y.(2001) In All Likelihood, Oxford University Press, ch. 18.11
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.