JonasMoss / kdensity

An R package for kernel density estimation with parametric starts and asymmetric kernels.
Other
14 stars 4 forks source link

Documenting default kernels and starts #33

Closed Tveten closed 6 years ago

Tveten commented 6 years ago

Now in documentation: "kernel = NULL", "start = NULL" and "support = NULL", but there is no information on what the default settings are. I guess the NULLs are there to supply different defaults for different supports? If not, I think the best way would be to have a default "kernel = 'normal'" for instance.

Tveten commented 6 years ago

The default bandwidth selector should also be stated in the documentation of kdensity.

JonasMoss commented 6 years ago

The reason for the NULLs is that there are no fixed defaults. For instance, if you choose "support = c(0,1)", the default kernel is "beta" and the default bandwidth selector is "JH". This is not the case when support = c(-Inf, Inf), where the defaults are Gaussian and nrd0.

If I change the nulls for say, uniform, gaussian and whatever, kdensity will have no way to decide whether the argument it sees is a default one or given by the user, and this matters in some cases.

The start always has the same default, "uniform". Will add that and try to document defaults better in the kdensity doc.

JonasMoss commented 6 years ago

I wrote a little more about the default arguments.