[vsni.co.uk] Contact us
Author Message
Post new topic

  ASReml  ~  how to save time using vm function in ASReml-R

Zhiqiang
Posted: Fri Mar 15, 2019 3:31 pm Reply with quote
Joined: 07 Dec 2014 Posts: 12
Hi all,

I am running the below model in ASReml 4. It works very quickly with 19444 individuals. It only takes 20 seconds.

Data and .as files have been attached.

but when I ran the data in ASReml-R4, it is really slow. It took more than 10 minutes for each iterative. Loglikelihood and variance were showed slightly different as in ASReml 4. I was wondering any syntax which I used is wrong for the new version of ASREml-R.

I have put my R scripts below. Could anyone help to explain the reason?

#****************************
# ASReml 4

FullsibpedgreeSouth.csv !SKIP 1 !make !ALPHA
Fullsib_4SouthT.csv !SKIP 1 !DDF 1

!part 1
Tabulate Dia_12 ~ Fami Geno !STATS
Dia_12 ~ mu Site Site.Block, # Specify fixed model
!r Geno Site.Geno Fami Site.Fami ide(Geno) Site.ide(Geno) # Specify random model
residual sat(Site).id(units)

#**************************************
# ASReml R4
#**************************************
# read data and pedigree
mdat<-read.csv("Fullsib_4SouthT.csv", header = TRUE, sep="," , na.strings=c("",".", "NA"))
ped<-read.csv("FullsibpedgreeSouth.csv", header = TRUE, sep="," , na.strings=c("",".", "NA"))

mdat<- within(mdat, {
Genotype_id <- as.factor(Genotype_id)
Trials <- as.factor(Trials)
Block<-as.factor(Block)
Dia_12<-as.numeric(Dia_12)
})

ped$Genotype_id<-factor(ped$Genotype_id)

# produce inverse A matrix
mdat.ainv <- ainverse(ped)

asr <- asreml(fixed = Dia_12 ~ Trials + Trials:Block,
random = ~ vm(Genotype_id,mdat.ainv ) + idv(Trials):vm(Genotype_id,mdat.ainv ) + Family_name + Trials:Family_name + idv(Genotype_id) + Trials:idv(Genotype_id) ,
residual= ~dsum(~id(units) | Trials) ,
dense = ~ vm(Genotype_id, mdat.ainv),
data=mdat,
workspace=15e8 )


Cheers
Chen



data file.zip
 Description:

Download
 Filename:  data file.zip
 Filesize:  111.56 KB
 Downloaded:  132 Time(s)

View user's profile Send private message
Zhiqiang
Posted: Wed Mar 20, 2019 12:45 pm Reply with quote
Joined: 07 Dec 2014 Posts: 12
Hi all,

The question has been solved by David Bulter, but he is not sure what it is doing for ASReml R4

I need to use ide(Genotype_id) instead of idv(Genotype_id) for unrelated genetic effects as below.

random = ~ vm(Genotype_id,mdat.ainv ) + idv(Trials):vm(Genotype_id,mdat.ainv ) + Family_name + Trials:Family_name + ide(Genotype_id) + Trials:ide(Genotype_id)

Cheers
Zhiqiang
View user's profile Send private message

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