| plot.strata | R Documentation |
Visualises a stratified design. The "2d" mode draws a histogram with
the fitted density overlaid and the strata shaded; "3d" and
"interactive" render plotly views of the Neyman cost surface.
## S3 method for class 'strata'
plot(
x,
type = c("2d", "3d", "interactive"),
data = NULL,
n_pts = 512L,
alpha = 0.25,
palette = c("#4E79A7", "#F28E2B", "#E15759", "#76B7B2", "#59A14F",
"#EDC948", "#B07AA1", "#FF9DA7", "#9C755F"),
main = NULL,
show_info = TRUE,
...
)
x |
A |
type |
|
data |
Optional numeric vector of population values. |
n_pts |
Integer. Density grid size. Default |
alpha |
Numeric. Stratum fill transparency. Default |
palette |
Character vector of stratum colours (recycled). |
main |
Character. Plot title (auto-generated if |
show_info |
Logical. Overlay a per-stratum information box on the
|
... |
Passed to |
Invisibly returns x for "2d"; a plotly widget
for "3d" and "interactive".
## Not run:
set.seed(1); y <- rgamma(2000, shape = 2, rate = 0.5)
res <- strata.data(y, h = 4, n = 400)
plot(res)
plot(res, type = "3d")
plot(res, type = "interactive")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.