Table of Contents

BLUPF90ADJ

Summary

This program preadjust the data for all effects except the first effect. Its expected use is in preadjustment of data for fixed effects such as age of dam, sex, standard day day of weighting etc.

The preadjustment can be for any number of traits and effects. Observations with a value of 0 are not adjusted.

To use the program prepare the parameter file as for BLUPF90. The first effect, which is not used for adjustment, can be contemporary group, HYS or the mean.

The program writes the data back in file adjusted_data. The format of that file can be provided by the user or a program default can be used. The current default is (100f10.1).

If a custom form is used, it needs to be in the fortran format for real numbers, e.g., (5f8.0, f10.3)

Problems

The adjusted observation can be 0 and and can be treated by blupf90 and related programs as missing.

Examples

The example is based on a single trait example with parameter file exhxan2 in teh examples directory. We are adjusting for the effect in the third column treating effect in column 2 as the first effect..

$ head hxrec2

5 22 261 457 60 49 817 1213164
5 23 267 743 60 59 790 1311935
5 23 259 812 60 57 811 1143578
5 22 264 719 60 42 752 1253399
5 23 264 748 60 59 760 1253399
5 22 264 780 60 43 741 1253399
6 30 316 358 60 57 851 1304048
5 22 257 735 61 37 744 1085978
6 30 310 40 61 50 846 1283313
6 31 299 84 61 56 812 1190632

$ cat exhxan2adj

# Example of single-trait animal model with one fixed effect
DATAFILE
hxrec2
NUMBER_OF_TRAITS
1
NUMBER_OF_EFFECTS
2
OBSERVATION(S)
7
WEIGHT(S)

EFFECTS: POSITIONS_IN_DATAFILE NUMBER_OF_LEVELS TYPE_OF_EFFECT  [EFFECT NESTED]
3 656 cross
2 70 cross
RANDOM_RESIDUAL VALUES
3
3

$blupf90adj

  ADJUSTS DATA FOR ALL EFFECTS EXCEPT THE FIRST ONE
 name of parameter file?exhxan2
     BLUPF90ADJ 1.0

 Parameter file:             exhxan2                                 
 Data file:                  hxrec2                                  
 Number of Traits             1
 Number of Effects            2
 Position of Observations      7
 Position of Weight (1)        0
 Value of Missing Trait/Observation           0

EFFECTS
 #  type                position (2)        levels   [positions for nested]
 1  cross-classified     3                 656
 2  cross-classified     2                  70

 Residual (co)variance Matrix
  3.0000    

 REMARKS
  (1) Weight position 0 means no weights utilized
  (2) Effect positions of 0 for some effects and traits means that such
      effects are missing for specified traits
 
 Data record length =   7
 read   1962  records in   0.100000  s,    1920  nonzeroes
 finished peds in   0.100000  s,    1920  nonzeroes
 solutions computed in   78  rounds of iteration
 reached convergence criterion   9.509987565531881E-011
 solutions stored in file: "solutions"
 provide format for the data; press enter to use (100F8.1)
(3f6.0,3f8.0,f10.2)
 wrote file with adjusted traits called adjusted_data
$ tail -50 solutions|head
  1  2      21   -529.3766
  1  2      22   -552.0176
  1  2      23   -538.5176
  1  2      24   -533.0100
  1  2      25   -539.4136
  1  2      26   -565.4647
  1  2      27   -555.4688
  1  2      28   -559.8672
  1  2      29   -501.8672
  1  2      30   -542.9127

$ head adjusted_data

    5.   22.  261.    457.     60.     49.   1369.02
    5.   23.  267.    743.     60.     59.   1328.52
    5.   23.  259.    812.     60.     57.   1349.52
    5.   22.  264.    719.     60.     42.   1304.02
    5.   23.  264.    748.     60.     59.   1298.52
    5.   22.  264.    780.     60.     43.   1293.02
    6.   30.  316.    358.     60.     57.   1393.91
    5.   22.  257.    735.     61.     37.   1296.02
    6.   30.  310.     40.     61.     50.   1388.91
    6.   31.  299.     84.     61.     56.   1368.40

Note that 1369=817-(-552)