AR model computation time, spatial effect and genetics effect

56 views
Skip to first unread message

Gabriel Maurin

unread,
Dec 10, 2019, 5:54:38 AM12/10/19
to breedR
Hello to all breedR users,

i'm currently running the following script:

res_AR.sm <- remlf90(fixed = PV ~ 1,
                     generic=list(MATERIEL= list(Z,K1)),
                     spatial = list(model = 'AR', coord = Phen[, c('Xchamp','Ychamp')]),
                     data    = Phen)  


my goal is to fit an AR model on the trait PV without fixed effect 
the genetic effect ( MATERIEL) is random and modeled by the kinship matrice K (dim = 1976x1976)
The matrice coefficient are calculated based on the pedigree.

I run the model and it seems really long (more than 1day), i have about 2000 individuals
I already stop the run one time and there was a warning message " the model did not converge"

Is it normal that it takes so much time ? 

I was wonderring if it has something to do with the fact that most related individuals are grouped together in the field. 
The design is made of 21 plots, in each plot individuals are full sib, and plot to plot individuals have 3 grand parents or one grandparent in common. There also 2 control plant in each plot   

Can this causes problems in differentiating the genetic effect from the environmental effect? 
or
Maybe using the kinship coefficient based on pedigree and not on markers causes calculation issues because most of the individuals have the same coefficient because they have the same pedigree

I have also some gaps in the field. For example x=25 is empty 

However I tried with model=spline and it works , it was quite quick (few hours). But i'm affraid that genetics effect are confounded with spatial effect because of the field design. The best familly (phenotypic value) seems to have the best "spatial effect". 
but in some cases I suspect an environmental effect within one or two family which seems to be distinguished by the model   

Do you any suggestions concerning the calculation time or the hability of breedR to distinguish spatial and genetic effect in my case ?

A last question concerning the spline model output, the genetic s.e effect are almost all equals to 3 with sligth variation within familly and small between familly, only control or parents (12 individuals) are different, between 1.5-2.5.
I don't understand why the s.e are not 0 centred 


Regards, 

Gabriel

Facundo Muñoz

unread,
Dec 10, 2019, 7:59:10 AM12/10/19
to bre...@googlegroups.com

Dear Gabriel,

There are a lot of questions here, some of which are difficult to answer without seeing the data and the results.

Your main concern seems to be the computing time of the AR model. Note that since you have not specified any value for the autocorrelation parameters (argument rho = c(rho_x, rho_y)) in the spatial component, breedR is conducting by default a grid search in all combinations of four values for rho_x and rho_y (-.8, -.2, .2, .8). This means that you are fitting 16 models, rather than one.

Moreover, as you say, the plot design makes it difficult to tell apart the spatial and genetic effects, specially with small spatial autocorrelations. This might cause the model to take longer to fit when either rho is -.2 or .2, or even don't converge at all.

Given your situation, I'd recommend fixing rho at c(.9, .9) or so, and fit that model alone. This will force the spatial effect to identify the large-scale spatial variations, which will be easier to tell apart from the short-scale variations that are confounded with the genetic component.

On the other hand, since you are working with a pedigree, why using a "generic" rather than a "genetic" component? I'm not completely sure, but it will probably be faster to use the specialised term. Even though in theory is the same model.

The gaps in the rows or columns are not a problem, as long as they remain a few.

By the "genetic s.e effects" you mean the standard errors? Is yes, since they are a standard deviation, they are necessarily positive. They cannot be centered at 0.

Hope it helps.

ƒacu.-

--
Report issues at https://github.com/famuvie/breedR/issues
---
You received this message because you are subscribed to the Google Groups "breedR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to breedr+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/breedr/3902915d-c310-438b-b442-3935027ee97a%40googlegroups.com.

Gabriel Maurin

unread,
Dec 10, 2019, 9:29:23 AM12/10/19
to breedR

Thank for the quick answer.

It works with fixed rho = (.9,.9) ! and the results are quite similar to the spline but the spatial and residuals variance decrease, increasing the genetic variance 
I also try with rho = (.2,.2) and it is still running, So, I think that your hypothesis is rigth 
I'm am going to fit rho manually as described in BreedR overview.
Mathematically rho represents the correlation between the value at Xn-1 and Xn ? 
 

I'm using generic because the pedigree is quite complex involving sevral generation, and lattely i will probably try to use the Kinship coefficient based on marker so it will be necessary to use generic.

Thank for your great help.

Gabriel

Reply all
Reply to author
Forward
0 new messages