plotMP: plotting mass points

View source: R/gamlssNP.R

plotMPR Documentation

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

References

Rigby, R. A. and Stasinopoulos D. M. (2005). Generalized additive models for location, scale and shape,(with discussion), Appl. Statist., 54, part 3, pp 507-554.

Rigby, R. A., Stasinopoulos, D. M., Heller, G. Z., and De Bastiani, F. (2019) Distributions for modeling location, scale, and shape: Using GAMLSS in R, Chapman and Hall/CRC. An older version can be found in https://www.gamlss.com/.

Stasinopoulos D. M. Rigby R.A. (2007) Generalized additive models for location scale and shape (GAMLSS) in R. Journal of Statistical Software, Vol. 23, Issue 7, Dec 2007, https://www.jstatsoft.org/v23/i07/.

Stasinopoulos D. M., Rigby R.A., Heller G., Voudouris V., and De Bastiani F., (2017) Flexible Regression and Smoothing: Using GAMLSS in R, Chapman and Hall/CRC.

Stasinopoulos M.D., Kneib T, Klein N, Mayr A, Heller GZ. (2024) Generalized Additive Models for Location, Scale and Shape: A Distributional Regression Approach, with Applications. Cambridge University Press.

(see also https://www.gamlss.com/).

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)

gamlss.mx documentation built on May 29, 2024, 10:33 a.m.

Related to plotMP in gamlss.mx...