Best linear unbiased prediction (BLUP) is estimate of random effects and Best linear unbiased estimator (BLUE) is estimate of fixed effects in linear mixed models. This tool calculate BLUP or BLUE associated with genotype / variety.

What it does:

This function calculates BLUP, BLUE and means for Y variable based on the model specified by the user.

The required variables for RCBD are Genotype and Replication and for lattice required variables are Genotype, Replication (main block) and Block within Replication (sub block or block). User can add additional two X variables (eg. Location, Season etc) in the model and are treated as factor ( even supplied as numerical variable). If you want to calculate BLUP / BLUE by a grouping variable (eg. Management), then this will calculate BLUP / BLUE for each level of the variable.

**Step1: Get data:**

**Example test dataset:**

The data should be in tab format.

**Step 2: Choose design **

**Step 3:** Select appropriate name of columns used as input for Block with Replication ( for lattice design only), Replication column, Genotype column and Y column.

The basic model (without additional variables).

*Y = Genotype + Replication + error* RCBD

*Y = Genotype + Replication + Block within Replication + error* Lattice

**Step 4: Summarized by**

Summarized by loop the above model for each level of summarized by variable. For example if we are summarized by variable is Management, this will fit the above model for each level of the variable.

for ( i in 1: number of management){

*Y = Genotype + Replication + Block within Replication + error*

}

**Step 6: Additional variables **

The tool can fit maximum two additional variables in model variable 1 (factor) and variable 2 (factor). This optional to tool. The model implemented by choosing factor 1 and factor 2 is as follows:

With variable 1

*Y = Variable 1 + Genotype + Variable 1 : Genotype + Replication + error* RCBD

*Y = Variable 1 + Genotype + Replication + Variable 1 : Genotype + Block within Replication + error* Lattice

With variable 1 and variable 2

*Y = Variable 2 + Variable 1 + Genotype + Variable 1 : Genotype + Variable 1: Variable 2 + Variable 1:Variable 2: Genotype + Replication + error* RCBD *Y = Variable 2 + Variable 1 + Genotype + Variable 1 : Genotype + Variable 1: Variable 2 + Variable 1:Variable 2: Genotype + Replication + Block within Replication + error* RCBD

**Model details**

- Genotype is treated as Fixed for BLUE calculation and random for BLUP calculation.
- Replication, Block within Replication are treated as random both BLUP and BLUE calculations.
- Variable 1, Genotype : Variable 1 are treated as random both BLUP and BLUE calculations.
- Variable 2, Genotype : Variable 2, Variable 1 : Variable 2, Genotype : Variable 1 : Variable 2 are treated as random effects for both BLUP and BLUE calculations.

**Citation:**

Douglas Bates, Martin Maechler, Ben Bolker, Steve Walker (2015). Fitting Linear Mixed-Effects Models Using lme4. Journal of Statistical Software, 67(1), 1-48.

**Output**