wombat으로 single trait random regression model 풀기

 

예제 자료

 

R.A. Mrode, Linear Models for the Prediction of Animal Breeding Values. 2nd. Edition

 

Page 144. Example 7.2

 

자료입력

 

4 4 1 4 17.0

4 4 2 38 18.6

4 4 3 72 24.0

4 4 4 106 20.0

4 4 5 140 20.0

4 4 6 174 15.6

4 4 7 208 16.0

4 4 8 242 13.0

4 4 9 276 8.2

4 4 10 310 8.0

5 5 1 4 23.0

5 5 2 38 21.0

5 5 3 72 18.0

5 5 4 106 17.0

5 5 5 140 16.2

5 5 6 174 14.0

5 5 7 208 14.2

5 5 8 242 13.4

5 5 9 276 11.8

5 5 10 310 11.4

6 6 6 4 10.4

6 6 7 38 12.3

6 6 8 72 13.2

6 6 9 106 11.6

6 6 10 140 8.4

7 7 4 4 22.8

7 7 5 38 22.4

7 7 6 72 21.4

7 7 7 106 18.8

7 7 8 140 18.3

7 7 9 174 16.2

7 7 10 208 15.0

8 8 1 4 22.2

8 8 2 38 20.0

8 8 3 72 21.0

8 8 4 106 23.0

8 8 5 140 16.8

8 8 6 174 11.0

8 8 7 208 13.0

8 8 8 242 17.0

8 8 9 276 13.0

8 8 10 310 12.6

 

개체, 개체(영구환경효과), HTD(herd-test-day), DIM(days in milk), test day fat yield

 

위 자료를 data.txt로 저장

 

혈통입력

 

1 0 0

2 0 0

3 0 0

4 1 2

5 3 2

6 1 5

7 3 4

8 1 7

 

개체, 아비, 어미

 

위 자료를 pedi.txt로 저장

 

파라미터 파일 작성

 

# run option - 육종가를 구할 때

# RnSoln_xxx.dat 출력 파일 확인

#RUNOP -v --solvit

 

# run option - 육종가와 SEP(standard error of prediction)

# reliability(r2) = 1- SEP^2 / sigma_a^2

# RnSoln_xxx.dat 출력 파일 확인

RUNOP -v --blup

 

# run option - 좋은 초기값으로 분산성분을 추정할 때,

#RUNOP -v --good

 

# run option - 나쁜 초기값일 때 분산성분을 추정할 때,

#RUNOP -v --bad

 

# 요약 출력파일에 출력할 내용

COMMENT Single Trait Random Regression Model from Mrode, 2nd Edition, Example 7.2

 

# Analysis Type : random regression model

ANALYSIS RR

 

# 혈통 파일 이름

# SumPedigree.out 확인

PED pedi.txt

 

# 자료 파일 이름

DATA data.txt

animal

pe_ani 99

htd 10

dim 100

fat_yld

END DATA

 

# Model of analysis

# SumModel.out 확인

# 고정효과의 차수, 5개를 구하고 싶으면 (4, LEG)라고 넣을 것

MODEL

TR fat_yld

FIX htd

COV dim(4,LEG)

RRC dim

RAN animal(3,LEG) NRM

RAN pe_ani(3,LEG)

END MODEL

 

# 분산 성분

VAR animal 3

3.297 0.594 -1.381

0.921 -0.289

1.005

 

VAR pe_ani 3

6.872 -0.254 -1.101

3.171 0.167

2.457

 

VAR residual 1 HOM

3.71

#1 99 3.71

 

# SumModel.out 확인

# SumEstimates.out 확인

# SumPedigree.out 확인

# FixSolutions.out 확인

# RnSoln_xxx.dat 확인

 

 

위 파라미터 파일을 wombat.par로 저장

 

실행

 

위 세 파일을 한 폴더에 넣고 다음과 같이 실행







 

결과 확인

 

SumModel.out

 

======= Version 19-05-2012 ======================================= **KM** ====

 

Program WOMBAT : Summary of information from Set-up step

==============================================================================

 

Fixed Regression Model from Mrode, 2nd Edition, Example 7.1

 

Analysis type : "RR"

Data file : "data.txt"

Pedigree file : "pedi.txt"

Parameter file : "wombat.par"

 

 

No. of traits = 1

nrec mean sdev min. max.

1 "fat_yld" 42 16.2095 4.45283 8.00000 24.0000

 

Covariables

1 "dim(4,LEG)" 42 138.381 94.9724 4.00000 310.000

 

Control variables in RR analysis

nrec mean sdev min. max.

1 "dim" 42 138.381 94.9724 4.00000 310.000

 

Fixed effects

1 "fat_yld" nlev

1 "htd" 10

 

Random effects nlev

1 "animal" 8 NRM

2 "pe_ani" 5 IDE

======== end of file ============================13-03-2014==========23:26====

 

SumPedigree.out

 

======= Version 19-05-2012 ======================================= **KM** ====

 

Program WOMBAT : Summary of Pedigree Information

==============================================================================

 

Fixed Regression Model from Mrode, 2nd Edition, Example 7.1

 

Analysis type : "RR"

Data file : "data.txt"

Pedigree file : "pedi.txt"

Parameter file : "wombat.par"

 

 

No. of animal IDs in data file = = 5

No. of animal IDs in total = = 8

 

*****Pedigree Structure for random effect : 1 ****************************

Original no. of animals = 8

No. of animals after pruning = 8

... proportion (%) remaining = 100.0

 

No. of levels w/out records = 3

No. of levels with records = 5 100.0%

... 5 record(s) = 1 20.0%

... 7-10 record(s) = 4 80.0%

Minimum no. of records specified = 2

No. of animals with at least 2 records = 5 100.0%

No. of parents which have progeny which

have at least 2 records = 6

No. of animals with at least 2 records

themselves or on a parent = 5

No. of animals with at least 2 records

themselves, on a parent or sib(s) = 5 62.5%

... in the data = 5 100.0%

Minimum no. of records specified = 3

No. of animals with at least 3 records = 5 100.0%

No. of parents which have progeny which

have at least 3 records = 6

No. of animals with at least 3 records

themselves or on a parent = 5

No. of animals with at least 3 records

themselves, on a parent or sib(s) = 5 62.5%

... in the data = 5 100.0%

Minimum no. of records specified = 4

No. of animals with at least 4 records = 5 100.0%

No. of parents which have progeny which

have at least 4 records = 6

No. of animals with at least 4 records

themselves or on a parent = 5

No. of animals with at least 4 records

themselves, on a parent or sib(s) = 5 62.5%

... in the data = 5 100.0%

No. of animals w/out offspring = 2 25.0%

No. of animals with offspring = 6 75.0%

... and records = 3 37.5%

No. of animals with unknown sire = 3

No. of animals with unknown dam = 3

No. of animals with both parents unknown = 3

No. of animals with records =

... and unknown sire = 0

... and unknown dam = 0

... and both parents unknown = 0

No. of sires = 2

... with progeny in the data = 2

... with records & progeny in data = 0

No. of dams = 4

... with progeny in the data = 4

... with records & progeny in data = 3

 

No. of animals with known/unpruned grand-parents

... with paternal grandsire = 0

... with paternal granddam = 0

... with maternal grandsire = 3

... with maternal granddam = 3

random effect no. = 1 NRM

no. of elements in NRM/GIN inverse 23

log determinant = -3.4657359027997265

random effect no. = 2 IDE

no. of elements in NRM/GIN inverse 0

log determinant = 0.

======== end of file ============================13-03-2014==========23:26====

 

FixSolutions.out

 

======= Version 19-05-2012 ======================================= **KM** ======================================

 

Program WOMBAT : GLS solutions for fixed effects

================================================================================================================

 

Fixed Regression Model from Mrode, 2nd Edition, Example 7.1

 

 

Covariables for trait no. 1 "fat_yld"

Covariable Reg.coeff Solution S.Error

1 dim(4,LEG) 1 -0.625391 2.03781

1 dim(4,LEG) 2 -0.134573 1.24413

1 dim(4,LEG) 3 0.347903 0.554777

1 dim(4,LEG) 4 -0.421767 0.516324

 

Fixed effects for trait no. 1 "fat_yld"

Effect Orig.code Level Solution S.Error SolSum=0 No.recs Eff.Mean

1 htd 1 1 5.64162 3.97819 5.02704 3 20.733

1 htd 2 2 3.14627 3.04818 2.53169 3 19.867

1 htd 3 3 4.11556 2.66465 3.50099 3 21.000

1 htd 4 4 3.79846 2.35169 3.18388 4 20.700

1 htd 5 5 1.87155 2.08872 1.25698 4 18.850

1 htd 6 6 -1.43445 1.82919 -2.04902 5 14.480

1 htd 7 7 -1.33602 1.66856 -1.95060 5 14.860

1 htd 8 8 -1.27273 1.74578 -1.88730 5 14.980

1 htd 9 9 -3.94007 1.96976 -4.55464 5 12.160

1 htd 10 10 -4.44444 2.44300 -5.05902 5 11.080

1 htd 0.614574

** marks effects which have been set to zero for the analysis

======== end of file ============================13-03-2014==========23:26======================================

 

 

RnSoln_animal.dat 확인

 

Run N Original ID Tr Solution St.Error Ignore Inbr %

1 1 1 -0.583124E-01 1.72949 0.305 0.000

1 2 0.551960E-01 0.931802 0.239

1 3 -0.441837E-01 0.958263 0.294

2 2 1 -0.727789E-01 1.78148 0.193 0.000

2 2 -0.304888E-01 0.948263 0.154

2 3 -0.243957E-01 0.985140 0.185

3 3 1 0.131091 1.75464 0.257 0.000

3 2 -0.247072E-01 0.941440 0.194

3 3 0.685794E-01 0.971617 0.246

4 4 1 0.344565 1.70689 0.341 0.000

4 2 0.628266E-02 0.923341 0.273

4 3 -0.316413 0.947214 0.327

5 5 1 -0.453733 1.67477 0.386 0.000

5 2 -0.520159E-01 0.911875 0.312

5 3 0.279820 0.931168 0.370

6 6 1 -0.548552 1.76190 0.242 0.000

6 2 0.730074E-01 0.945966 0.168

6 3 0.194574 0.970028 0.252

7 7 1 0.851809 1.71901 0.322 0.000

7 2 -0.950157E-02 0.938473 0.209

7 3 -0.313065 0.952393 0.312

8 8 1 0.220854 1.77165 0.392 12.500

8 2 0.126967E-01 0.965884 0.316

8 3 -0.174409E-01 0.984880 0.377

 

RnSoln_pe_ani.dat

 

Run N Original ID Tr Solution St.Error Ignore

1 4 1 -0.648602 1.86278 0.704

1 2 -0.360050 1.26306 0.705

1 3 -1.47183 1.13897 0.687

2 5 1 -0.776143 1.94435 0.671

2 2 0.137007 1.30086 0.683

2 3 0.968819 1.17481 0.662

3 6 1 -1.99268 2.41239 0.391

3 2 0.985107 1.66794 0.350

3 3 -0.693079E-01 1.40407 0.445

4 7 1 3.51876 1.94636 0.670

4 2 -1.05097 1.54725 0.495

4 3 -0.404755 1.33179 0.527

5 8 1 -0.101334 1.88597 0.695

5 2 0.288905 1.27583 0.698

5 3 0.977070 1.15081 0.679

 

 

관련 파일



10_STRR.zip



+ Recent posts