Description Usage Arguments Details Value Examples
This function extracts a specific level of contour from a kde object.
This function only works for some levels that the kde object calculated
originally (associated with the constraints in the alpha
parameter).
1 | extract_contour(kde_obj, alpha)
|
kde_obj |
kde object |
alpha |
contour level which needs to be extracted. Scalar in the sequence from .01 to .99 by .01. A value of .95 gives a contour level associated with the cumulative prob of 95% (and 95% confidence interval) - which is technically 1-alpha. |
This function (renamed as extract_countour
) is shared with TCpredictionbands on github:
TCpredictionbands.
List of contours at (100*alpha level) for the kde object - there is a contour for each disconnected contour that forms the (100*alpha level)
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
set.seed(8192)
x1 <- 2^rnorm(100)
y1 <- rnorm(100)
dfmat <- cbind(x1,y1)
kde_object <- ks::kde(dfmat)
cont <- extract_contour(kde_object, .05)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.