inst/doc/prior-annotation-weights.R

## ----setup, include = FALSE---------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

## -----------------------------------------------------------------------------
library(ggmix)
data("admixed")

# the default penalty factor
p.fac <- rep(1, ncol(admixed$xtrain))

# set 1 of the causal SNPs to not be penalized at all
p.fac[match(sample(admixed$causal, 1),colnames(admixed$xtrain))] <- 0

# supply p.fac to the penalty.factor argument
res <- ggmix(x = admixed$xtrain, y = admixed$ytrain, kinship = admixed$kin_train,
             penalty.factor = p.fac)
plot(res)

Try the ggmix package in your browser

Any scripts or data that you put into this service are public.

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