R/construct.genotype.prediction.matrix.R

Defines functions construct.genotype.prediction.matrix

construct.genotype.prediction.matrix <-
function(object, newdata) {
	Z_geno <- make_design_matrix(newdata[,object$model$geno$genotype], object$terms$geno$geno_names)
	if(object$model$geno$as.random)
		Z_geno <- Z_geno[,object$terms$geno$ndx, drop = FALSE]
	else
		Z_geno <- Z_geno[, object$terms$geno$ndx[2:length(object$terms$geno$ndx)], drop = FALSE]
	Z_geno	
}

Try the SpATS package in your browser

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

SpATS documentation built on Nov. 10, 2022, 5:58 p.m.