Last data update: 2014.03.03
|
R: plotting mass points
plotting mass points
Description
A utility function for plotting two dimension non-parametric distribution. The function uses the persp() function.
Usage
plotMP(x, y, prob, theta = 20, phi = 20, expand = 0.5, col = "lightblue",
xlab = "intercept", ylab = "slope", ...)
Arguments
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 persp() function
|
xlab |
the x label
|
ylab |
the y label
|
... |
additinal argument to be passed to persp()
|
Details
The function call
Value
A graph is produced.
Author(s)
Mikis Stasinopoulos
See Also
gamlssNP , persp
Examples
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)
Results
|