get_BLUP: 'Fit MLM to get the BLUP values'

Description Usage Arguments Value Examples

Description

Get best linear unbiased predictors for phenotypic values. Require package "lme4".

Usage

1
2
3
get_BLUP(data = df, model = Brix ~ (1 | Line) + (1 | Loc) + (1 | Year) + (1
  | Line:Loc) + (1 | Line:Year), which.factor = "Line",
  outfile = "data/blup.csv")

Arguments

data

Phenotypic data [data.frame], see example: "data/pheno.csv".

model

[model], find help from lme4 function lmer.

which.factor

The factor used for BLUP calculation, normally Genotype or Line [character].

outfile

Output file name [character="blup.csv"].

Value

return fitted model.

Examples

1
2
3
pheno <-  read.csv("data/pheno.csv", header=T)
fit <- get_BLUP(data = df, model = Brix ~ (1|Line) + (1|Loc) + (1|Year) + (1|Line:Loc) + (1|Line:Year),
                 which.factor = "Line", outfile="data/blup.csv")

jyanglab/g3tools documentation built on May 20, 2019, 6:27 a.m.