plotvdist: plotvdist

Description Usage Arguments Examples

View source: R/fit.3g.R

Description

Plots contour lines of a bivariate normal distribution parametrised by covariance matrix, at specific distribution heights scales

Usage

1
2
plotvdist(varcov = diag(2), m = c(0, 0), scales = (2^(-(1:5))),
  relative = TRUE, over = TRUE, xlim = NULL, ylim = NULL, ...)

Arguments

varcov

covariance matrix (2 x 2)

m

mean vector

scales

heights of normal PDF at which to draw contour lines. If relative=TRUE, draws contours at heights given by scales * 1 /(2 pi |varcov|); if relative=FALSE, draws contours at heights given by scales directly.

relative

set to TRUE to draw heights relative to determinant of varcove. See parameter scales.

over

set to FALSE to draw new plot; TRUE to overplot existing plot

xlim

limits of x axis if over=FALSE

ylim

limits of y axis if over=FALSE

Examples

1
2
3
4
5
mat1=rbind(c(3,-1),c(-1,2));
mat2=rbind(c(1,0.8),c(0.8,1))
plotvdist(mat1,c(1,1),xlim=c(-5,5),ylim=c(-5,5),over=FALSE,col="red")
plotvdist(mat2,c(0,0),over=TRUE)
abline(h=0,lty=2); abline(v=0,lty=2)

jamesliley/subtest documentation built on May 18, 2019, 11:21 a.m.