[vsni.co.uk] Contact us | Site map
Forum | VSN International Forum Index
Author Message
Post new topic

<  ASReml  ~  Random Regression

df
Posted: Sun May 06, 2012 5:08 pm Reply with quote
Joined: 14 Feb 2012 Posts: 40
I am having trouble with this random regression. Any ideas would be appreciated. The first part is the end of the .asr file and the .as code is below.
*******************************************
13277 identity
3 UnStructure [ 16: 21] 50.7037 75.2866 2500.6120 39.7826 -281.5450
1845.0020
39831 analysis records assumed pre-sorted 3 within 13277
3 UnStructure [ 22: 27] 36.6248 96.5568 1060.2200 51.9904 445.8460
723.0800
31656 Ainverse
Structure for sire has 94968 levels defined
Fault: Structure / Factor mismatch
******************************************************************************

!WORKSPACE 1 !DEBUG !LOGFILE !CONTINUE
Title: BW, WW and Gain random regression
id !P
sire !P
dam !P
Sex !A
BWcg !I 1195
WWcg !I 1246
YWcg !I 2042
BWT
WWT
YWT
Gain
Region !A 9
BWdiff
WWdiff
YWdiff
GAINdiff

C:\Test\ASmall\RandomRegression\020_SPed.csv !ALPHA !SKIP 1 !DIAG !GIV #!MAKE !SORT

C:\Test\ASmall\RandomRegression\09_Swt.csv !SKIP 1 !MAXIT 15 !EXTRA 2 !MVINCLUDE !AISING #!SORT

BWT WWT Gain ~ Trait !r !{ sire sire.Region !} ,
!f at(Trait,1).BWcg at(Trait,2).WWcg at(Trait,3).YWcg mv

VPR !DEFINE

1 2 1
0 0 0 #!S2==1

Trait 0 US !GPUPUUP
50.7037 # residual (co)variances for BW, WW and GAIN ,
75.28665 2500.612
39.7826 -281.545 1845.002

sire 2
3 0 US !GPUPUUP
36.6248
96.5568 1060.22
51.9904 445.846 723.08

sire #0 AINV
View user's profile Send private message
rthomps
Posted: Sun May 06, 2012 9:10 pm Reply with quote
Joined: 06 Aug 2008 Posts: 22
Dear df,
Thanks, at last you are (almost) giving sufficient information
to answer the question !!!! but the information in the .asr file is not presented.
See p148 of the user guide
x!r !{ animal animal.time !}
.animal 2
2 0 US 3 -.5 2
animal
this suggests the order of the substructures in G are incorrect.
It is not clear what size the US should be as it shouldh be 1+number of regions
and region is set to 9 on reading in.
We do not have the .asr information
on Region.
Why you are not fitting Trait in the sire part ?
Cheers
Robin
View user's profile Send private message
df
Posted: Mon May 07, 2012 2:02 pm Reply with quote
Joined: 14 Feb 2012 Posts: 40
!WORKSPACE 1 !DEBUG !LOGFILE !CONTINUE
Title: BW, WW and Gain analysis (Small dataset)
id !P
sire !P
dam !P
BWcg !I 1195
WWcg !I 1246
YWcg !I 2042
BWT
WWT
YWT
Gain
Region !A 9


C:\Test\ASmall\RandomRegression\020_SPed.csv !ALPHA !SKIP 1 !DIAG !GIV #!MAKE !SORT

C:\Test\ASmall\RandomRegression\09_Small_Wt.csv !SKIP 1 !MAXIT 15 !EXTRA 2 !MVINCLUDE !AISING #!SORT

BWT WWT Gain ~ Trait !r !{ Trait.sire Region.sire !} !f at(Trait,1).BWcg at(Trait,2).WWcg at(Trait,3).YWcg mv

VPR !DEFINE

1 2 1
0 0 0 #!S2==1

Region 0 US !GPUPUUP
50.7037
75.28665 2500.612
39.7826 -281.545 1845.002

Trait.sire 2
10 0 US !GPUPUUP
36.6248
96.5568 1060.22
51.9904 445.846 723.08
#-21.44 -246.07 -12.748 562.72

sire #0 AINV
************************************************************************** ASReml 3.0 [01 Jan 2009] Title: BW, WW and Gain analysis (Small dataset)
Build gt [26 Nov 2010] 64 bit
07 May 2012 08:59:07.949 1024 Mbyte Windows x64 Three_Trait_Sire_Region_Sire_1
Licensed to: University of Missouri 31-dec-2012
***********************************************************
* Contact support@asreml.co.uk for licensing and support *
***************************************************** ARG *
Folder: C:\Test\ASmall\RandomRegression
id !P
sire !P
dam !P
BWcg !I 1195
WWcg !I 1246
YWcg !I 2042
Region !A 9

Notice: Some Pedigree options have changed in ASReml 3
C:\Test\ASmall\RandomRegression\020_SPed.csv !ALPHA !SKIP 1 !DIAG !GIV
Reading pedigree file C:\Test\ASmall\RandomRegression\020_SPed.csv: skipping
1 lines
31656 identities in the pedigree over 16 generations.
Assuming first parent is Sire,
Sires SiresofSire DamsofSire Dams SiresofDam DamsofDam
2531 845 1847 16856 2217 8143
Using an adapted version of Meuwissen & Luo GSE 1992 305-313:
PEDIGREE [C:\Test\ASmall\RandomRegression\020_SPed.csv ] has 31656 identities, 103293 Non zero elements
GIV0 Ainverse 31656 7 -16929.47
QUALIFIERS: !SKIP 1 !MAXIT 15 !EXTRA 2 !MVINCLUDE !AISING
Reading C:\Test\ASmall\RandomRegression\09_Small_Wt.csv FREE FORMAT skipping 1 lines

Multivariate analysis of BWT WWT Gain
Summary of 13277 records retained of 13277 read

Model term Size #miss #zero MinNon0 Mean MaxNon0 StndDevn
1 id !P 31656 0 0 587 21027 31656
2 sire !P 31656 0 0 267 12407 28207
3 dam !P 31656 0 0 64 13288 30860
4 BWcg 1195 0 0 1 606.1549 1195
5 WWcg 1246 0 0 1 630.3935 1246
6 YWcg 2042 0 0 1 1063.8418 2042
7 BWT Variate 0 0 50.00 82.29 128.0 10.48
8 WWT Variate 0 0 274.0 589.8 1129. 78.88
9 YWT 4351 0 463.0 971.8 1592. 175.6
10 Gain Variate 4351 0 5.000 374.7 875.0 136.9
11 Region 9 0 0 1 3.3201 9
12 Trait 3
13 Trait.sire 94968 12 Trait : 3 2 sire : 31656
14 Region.sire 284904 11 Region : 9 2 sire : 31656
15 at(Trait,1) 1
16 at(Trait,1).BWcg 1195 15 at(Trait,1: 1 4 BWcg : 1195
17 at(Trait,2) 1
18 at(Trait,2).WWcg 1246 17 at(Trait,2: 1 5 WWcg : 1246
19 at(Trait,3) 1
20 at(Trait,3).YWcg 2042 19 at(Trait,3: 1 6 YWcg : 2042
21 mv_estimates 4351
13277 identity
Warning: failed to read initial values from Trait.sire 2
9 UnStructure [ 17: 61] 50.7037 75.2866 2500.6120 39.7826 -281.5450
1845.0020 0.0200 0.0200 0.0200 0.0800 0.0200 0.0200 0.0200
0.0200 0.0800 0.0200 0.0200 0.0200 0.0200 0.0200 0.0800
0.0200 0.0200 0.0200 0.0200 0.0200 0.0200 0.0800 0.0200
0.0200 0.0200 0.0200 0.0200 0.0200 0.0200 0.0800 0.0200
0.0200 0.0200 0.0200 0.0200 0.0200 0.0200 0.0200 0.0800
Fault: R structures imply 0 + 119493 records: only 39831 e



Three_Trait_Sire_Region_Sire_1.asr
 Description:

Download
 Filename:  Three_Trait_Sire_Region_Sire_1.asr
 Filesize:  3.81 KB
 Downloaded:  406 Time(s)

View user's profile Send private message
df
Posted: Mon May 07, 2012 2:07 pm Reply with quote
Joined: 14 Feb 2012 Posts: 40
I changed the G structure and still have a problem with the R structure as noted above.

Trait.sire 2
10 0 US !GPUPUUP
36.6248
96.5568 1060.22
51.9904 445.846 723.08
#-21.44 -246.07 -12.748 562.72

sire #0 AINV
View user's profile Send private message
rthomps
Posted: Tue May 08, 2012 12:29 pm Reply with quote
Joined: 06 Aug 2008 Posts: 22
Dear df,
"I changed the G structure and still have a problem with the R structure as noted above". Could you not please tell the rest of the forum what you changed and why?
ASReml is expecting a G structure on
!r !{ Trait.sire Region.sire !}
and you were specifying it as Trait.sire.
"Fault: R structures imply 0 + 119493 records: only 39831 "
The data has 13277(units}*3(Traits) =39831 records
You try to set up an R with 13277(units}*9(Region) =119493 records
cheers
Robin
View user's profile Send private message
df
Posted: Tue May 08, 2012 1:14 pm Reply with quote
Joined: 14 Feb 2012 Posts: 40
!WORKSPACE 1 !DEBUG !LOGFILE !CONTINUE
Title: BW, WW and Gain analysis (Small dataset)
id !P
sire !P
dam !P
BWcg !I 1195
WWcg !I 1246
YWcg !I 2042
BWT
WWT
YWT
Gain
Region !A 9

C:\Test\ASmall\RandomRegression\020_SPed.csv !ALPHA !SKIP 1 !DIAG !GIV #!MAKE !SORT
C:\Test\ASmall\RandomRegression\09_Small_Wt.csv !SKIP 1 !MAXIT 15 !EXTRA 2 !MVINCLUDE !AISING #!SORT

tabulate BWT ~ Region
tabulate WWT ~ Region
tabulate YWT ~ Region

BWT WWT YWT ~ Trait !r !{ Trait.sire sire.Region !} ,
!f at(Trait,1).BWcg at(Trait,2).WWcg at(Trait,3).YWcg mv

VPR !DEFINE

1 2 1
0 0 0 #!S2==1

Trait 0 US !GPUPUUP
50.7037
75.28665 2500.612
39.7826 -281.545 1845.002

sire 2
3 0 US !GPUPUUP
36.6248
96.5568 1060.22
51.9904 445.846 723.08


sire #0 AINV
*****************************************************************************
ASReml 3.0 [01 Jan 2009] Title: BW, WW and Gain analysis (Small dataset)
Build gt [26 Nov 2010] 64 bit
08 May 2012 08:09:52.713 1024 Mbyte Windows x64 Three_Trait_Sire_Region_Sire_1
Licensed to: University of Missouri 31-dec-2012
***********************************************************
* Contact support@asreml.co.uk for licensing and support *
***************************************************** ARG *
Folder: C:\Test\ASmall\RandomRegression
id !P
sire !P
dam !P
BWcg !I 1195
WWcg !I 1246
YWcg !I 2042
Region !A 9

Notice: Some Pedigree options have changed in ASReml 3
C:\Test\ASmall\RandomRegression\020_SPed.csv !ALPHA !SKIP 1 !DIAG !GIV
Reading pedigree file C:\Test\ASmall\RandomRegression\020_SPed.csv: skipping
1 lines
31656 identities in the pedigree over 16 generations.
Assuming first parent is Sire,
Sires SiresofSire DamsofSire Dams SiresofDam DamsofDam
2531 845 1847 16856 2217 8143
Using an adapted version of Meuwissen & Luo GSE 1992 305-313:
PEDIGREE [C:\Test\ASmall\RandomRegression\020_SPed.csv ] has 31656 identities, 103293 Non zero elements
GIV0 Ainverse 31656 7 -16929.47
QUALIFIERS: !SKIP 1 !MAXIT 15 !EXTRA 2 !MVINCLUDE !AISING
Reading C:\Test\ASmall\RandomRegression\09_Small_Wt.csv FREE FORMAT skipping 1 lines

Multivariate analysis of BWT WWT YWT
Summary of 13277 records retained of 13277 read

Model term Size #miss #zero MinNon0 Mean MaxNon0 StndDevn
1 id !P 31656 0 0 587 21027 31656
2 sire !P 31656 0 0 267 12407 28207
3 dam !P 31656 0 0 64 13288 30860
4 BWcg 1195 0 0 1 606.1549 1195
5 WWcg 1246 0 0 1 630.3935 1246
6 YWcg 2042 0 0 1 1063.8418 2042
7 BWT Variate 0 0 50.00 82.29 128.0 10.48
8 WWT Variate 0 0 274.0 589.8 1129. 78.88
9 YWT Variate 4351 0 463.0 971.8 1592. 175.6
10 Gain 4351 0 5.000 374.7 875.0 136.9
11 Region 9 0 0 1 3.3201 9
12 Trait 3
13 Trait.sire 94968 12 Trait : 3 2 sire : 31656
14 sire.Region 284904 2 sire : 31656 11 Region : 9
15 at(Trait,1) 1
16 at(Trait,1).BWcg 1195 15 at(Trait,1: 1 4 BWcg : 1195
17 at(Trait,2) 1
18 at(Trait,2).WWcg 1246 17 at(Trait,2: 1 5 WWcg : 1246
19 at(Trait,3) 1
20 at(Trait,3).YWcg 2042 19 at(Trait,3: 1 6 YWcg : 2042
21 mv_estimates 4351
13277 identity
3 UnStructure [ 17: 22] 50.7037 75.2866 2500.6120 39.7826 -281.5450
1845.0020
39831 analysis records assumed pre-sorted 3 within 13277
3 UnStructure [ 23: 28] 36.6248 96.5568 1060.2200 51.9904 445.8460
723.0800
31656 Ainverse
Structure for sire has 94968 levels defined
Fault: Structure / Factor mismatch
View user's profile Send private message
df
Posted: Tue May 08, 2012 1:14 pm Reply with quote
Joined: 14 Feb 2012 Posts: 40
ASReml 3.0 [01 Jan 2009] Title: BW, WW and Gain analysis (Small dataset)
Build gt [26 Nov 2010] 64 bit
08 May 2012 08:09:52.713 1024 Mbyte Windows x64 Three_Trait_Sire_Region_Sire_1
License days 237
Random Number Seed 19343
11 11 C:\Test\ASmall\RandomRegression\020_SPed.csv !ALPH
Call G5VAIG 31656 0 3 31659
G5VAIG 63841718 #IDs= 31656 0.000000000000000E+000
0 0 0.000000000000000E+000 3 Group= 0
Xlink= 0
G5VAIP METH I II LINV NAN 3 31659 158282 103293 31656
Factor Labels: 10 5000 20
Equation ordering !EQO 3
21
Scratch: Three_Trait_Sire_Region_Sire_1
!NOS 0
Adding sire 7 31656
Adding Region 8 9
Adding at(Trait,1) 9 1
Adding BWcg 10 1195
Adding at(Trait,2) 11 1
Adding WWcg 12 1246
Adding at(Trait,3) 13 1
Adding YWcg 14 2042
Summary of 13277 records retained of 13277 read
Data is held on scratch file to increase RAM available
KWT KWTCOL KEY YXZ 234284 1 548230 294031
Order 4 at(Trait,1) 1 0.000 10 Region 9 0.000
Order 5 at(Trait,2) 1 0.000 12 BWcg 1195 0.000
Order 6 at(Trait,3) 1 0.000 14 WWcg 1246 0.000
Order 7 Region 9 0.000 12 sire 31656 0.000
Order 9 BWcg 1195 0.000 13 sire 31656 0.000
Order 11 WWcg 1246 0.000 14 sire 31656 0.000
Order 13 YWcg 2042 0.000 15 sire 31656 0.000
SUBMODEL 0 Trait
SUBMODEL 0 Trait.sire
SUBMODEL 0 sire.Region
SUBMODEL 1 at(Trait,1)
SUBMODEL 1 at(Trait,2)
SUBMODEL 1 at(Trait,3)
SUBMODEL 1 Region
SUBMODEL 0 at(Trait,1).BWcg
SUBMODEL 1 BWcg
SUBMODEL 0 at(Trait,2).WWcg
SUBMODEL 1 WWcg
SUBMODEL 0 at(Trait,3).YWcg
SUBMODEL 1 YWcg
SUBMODEL 0 mv_estimates
SUBMODEL 1 sire
234284 548230 294031 736523
39831 records in the design matrix.
39831 39831 39831
3 0 US !GPUPUUP ...
sire ...
View user's profile Send private message
df
Posted: Tue May 08, 2012 1:21 pm Reply with quote
Joined: 14 Feb 2012 Posts: 40
I have been using the code found on pg 149 of ver 3 manual.
***********************************************************
Random Regressions

!r !{ animal animal.time !}

animal 2
2 0 US 3 -.5 2
animal
************************************************************
Considering I have three traits and I am using a sire model instead of an animal model, I have changed the G structure to look like this.....
sire 2
3 0 US !GPUPUUP
36.6248
96.5568 1060.22
51.9904 445.846 723.08
sire #0 AINV

I don't know what information I am failing to provide. I hope the .asr and .asl files can be helpful.
View user's profile Send private message
df
Posted: Tue May 08, 2012 1:37 pm Reply with quote
Joined: 14 Feb 2012 Posts: 40
I used

!{ Trait.sire sire.Region !}

to get the EBVs for the sire for each trait, then get the slopes for the sire.Region part of the code.

I split the US into 9 regions. so I have 13277 records of calves in 9 regions for 3 traits. Each animal has a BW and WW but not necessarily a YW. I am using a sire model as the sires are represented in different regions, not the calves themselves. The regions are not uniform in the number of records.
View user's profile Send private message
Arthur
Posted: Tue May 08, 2012 10:38 pm Reply with quote
Joined: 05 Aug 2008 Posts: 277 Location: Orange, NSW
Dear df,

You have 3 traits BWT WWT and YWT

Your model is
BWT WWT YWT ~ Trait !r !{ Trait.sire sire.Region !} ,
!f at(Trait,1).BWcg at(Trait,2).WWcg at(Trait,3).YWcg mv


This model does not allow sire.region effects to differ between traits.
but there could be more than a 10 fold difference in size. So I would be fitting

... Trait.sire Trait.sire.Region ...

with 2 G structures

Trait.sire 2
3 0 US !GP
36.6248
96.5568 1060.22
51.9904 445.846 723.08
sire 0 AINV

Trait.sire.Region 3

3 0 US !GP
36.6248
96.5568 1060.22
51.9904 445.846 723.08
sire 0 AINV
Region 0 ID



But it is difficult to interpret such a model with a different trait variance structure
at the sire and region.sire levels

So maybe try dropping the Trait.sire term
... Trait.sire.Region ...

and use 1 G structures


sire 0 AINV
Trait.sire.Region 3

3 0 US !GP
36.6248
96.5568 1060.22
51.9904 445.846 723.08
sire 0 AINV
Region 0 CORU .8



and if that works, see if changing the last line to
Region 0 fa1 !GPPPPPPPPF
8*0.8 8*1.0

is better


There are a lot of things that could be tried with this data but
they all require clear thinking about the model.

_________________
Arthur Gilmour

Retired Principal Research Scientist (Biometrics)
View user's profile Send private message Send e-mail Visit poster's website

Display posts from previous:  

All times are GMT
Page 1 of 1
Post new topic

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum