plot.ggmix_gic: Plot the Generalised Information Criteria curve produced by...

Description Usage Arguments Details Value See Also Examples

View source: R/plot.R

Description

Plots the Generalised Information Criteria curve, as a function of the lambda values used

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## S3 method for class 'ggmix_gic'
plot(
  x,
  ...,
  sign.lambda = 1,
  type = c("gic", "QQranef", "QQresid", "predicted", "Tukey-Anscombe"),
  s = "lambda.min",
  newy,
  newx
)

plotGIC(x, sign.lambda, lambda.min, ...)

Arguments

x

fitted linear mixed model object of class ggmix_gic from the gic function

...

Other graphical parameters to plot

sign.lambda

Either plot against log(lambda) (default) or its negative if sign.lambda=-1

type

gic returns a plot of the GIC vs. log(lambda). QQranef return a qqplot of the random effects. QQresid returns a qqplot of the residuals which is y - Xβ - b_i where b_i is the subject specific random effect. predicted returns a plot of the predicted response (X β + b_i) vs. the observed response, where b_i is the subject specific random effect. Tukey-Anscombe returns a plot of the residuals vs. fitted values (X β)

s

Value of the penalty parameter lambda at which predictions are required. Default is the value s="lambda.min". If s is numeric, it is taken as the value of lambda to be used. Must be a single value of the penalty parameter lambda at which coefficients will be extracted via the coef method for objects of class ggmix_gic. If more than one is supplied, only the first one will be used.

newy

the response variable that was provided to ggmix. this is only required for type="QQresis", type="Tukey-Anscombe" and type="predicted"

newx

matrix of values for x at which predictions are to be made. Do not include the intercept. this is only required for type="QQresis", type="Tukey-Anscombe" and type="predicted"

lambda.min

the value of lambda which minimizes the gic

Details

A plot is produced, and nothing is returned.

Value

plot depends on the type selected

See Also

gic

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data("admixed")
fit <- ggmix(x = admixed$xtrain,
             y = admixed$ytrain,
             kinship = admixed$kin_train)
hdbic <- gic(fit)

# plot solution path
plot(fit)

# plot HDBIC curve as a function of lambda
plot(hdbic)

ggmix documentation built on April 13, 2021, 9:06 a.m.