Closed Tveten closed 6 years ago
The default bandwidth selector should also be stated in the documentation of kdensity.
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.
I wrote a little more about the default arguments.
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.