Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

lik.contour

Contour plot for two parameters likelihood


Description

Create a contour plot (superimposed with a heat map)

Usage

lik.contour(x, y, z, levels = NULL, nlevels = 11, heat = TRUE, col.heat = NULL, ...)

Arguments

x, y, z

As in contour

levels

As in contour. If NULL, the function computes appropriate levels.

nlevels

As in contour

heat

If TRUE, a heat map is superimposed to the contour plot

col.heat

Vector of heat colors

...

Additional arguments to image and contour

Details

This function is a wrapper for contour, with a different method to compute a default value for levels. If heat = TRUE, a heatmap produced by image is added to the plot. See contour for details on parameters.

Author(s)

Hervé Perdry and Claire Dandine-Roulland

See Also

Examples

data(AGT)
x <- as.bed.matrix(AGT.gen, AGT.fam, AGT.bim)

# Compute Genetic Relationship Matrix
K <- GRM(x)

# eigen decomposition of K
eiK <- eigen(K)

# simulate a phenotype
set.seed(1)
y <- 1 + lmm.simu(tau = 1, sigma2 = 2, eigenK = eiK)$y

# Likelihood
TAU <- seq(0.5,2.5,length=30)
S2 <- seq(1,3,length=30)
lik1 <- lmm.diago.likelihood(tau = TAU, s2 = S2, Y = y, eigenK = eiK)
lik.contour(TAU, S2, lik1, heat = TRUE, xlab = "tau", ylab = "sigma^2")

gaston

Genetic Data Handling (QC, GRM, LD, PCA) & Linear Mixed Models

v1.5.7
GPL-3
Authors
Hervé Perdry [cre, aut, cph], Claire Dandine-Roulland [aut, cph], Deepak Bandyopadhyay [cph] (C++ gzstream class), Lutz Kettner [cph] (C++ gzstream class)
Initial release
2020-09-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.