plotMP | R Documentation |
A utility function for plotting two dimension non-parametric distribution. The function uses the persp()
function.
plotMP(x, y, prob, theta = 20, phi = 20, expand = 0.5, col = "lightblue",
xlab = "intercept", ylab = "slope", ...)
x |
a vector containg points in the x axis |
y |
a vector containg points in the y axis |
prob |
vector containing probabilities which should add up to one |
theta, phi, expand, col |
arguments to pass to the |
xlab |
the x label |
ylab |
the y label |
... |
additinal argument to be passed to |
The function call
A graph is produced.
Mikis Stasinopoulos
gamlssNP
, persp
gamma_0 <- c( -4.4, -3,-2.2, -.5, 0.1, 1, 1.5, 2.2, 3.5, 4.1 )
gamma_1 <- c( 2.2, 1.2, 0.1, -1, -2.3, -4.6 , 5.1, -3.2, 0.1, -1.2)
prob <- c(0.1, .05, .12, 0.25, 0.08, 0.12, 0.10, 0.05, 0.10, 0.03 )
plotMP(gamma_0, gamma_1,prob)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.