Interpreting the variogram

54 views
Skip to first unread message

Jaime Alberto Zapata Valenzuela

unread,
Apr 22, 2020, 12:47:53 PM4/22/20
to breedR
Good day 
I want to first give thanks to Facundo and the developers of BreedR.
I am not familiar in programming so I want to use the scripts already written.
I am forest geneticist so I have a questions about the spatial model.

I am using one site with different blocks, but he fixed effects give just one parameter for the block, should it be the number of parameters as number of blocks I gave?
The second question is how can I interpret the variogram isotropic? I read on internet but I can't understand the meaning of the blue curve and the dots around it. Basically, how the variogram shows either autocorrelation or not.
This is the model I used, thanks of any comments!!!

res.blk <- remlf90(fixed   = VolAj2 ~ Bloque,
                   random  = ~ Clon,
                   #genetic = gen.globulus, 
                   spatial = list(model = 'blocks', 
                                  coord = dat2[, c('Col', 'Fil')],
                                  id = 'Bloque'),
                   data    = dat2)
summary(res.blk)
Formula: VolAj2 ~ 0 + Intercept + Bloque + Clon + spatial 
   Data: dat2 
   AIC   BIC logLik
 -3217 -3199   1612
Parameters of special components:
spatial: n.blocks: 10
Variance components:
         Estimated variances      S.E.
Clon               0.0060993 5.726e-04
spatial            0.0001411 9.893e-05
Residual           0.0200760 5.129e-04
Fixed effects:
              value   s.e.
Intercept  0.240166 0.0102
Bloque   -0.0014390.0015      

Facundo Muñoz

unread,
Apr 23, 2020, 2:38:07 AM4/23/20
to bre...@googlegroups.com

Dear Jaime,

thans for your message.

1. Specifying blocks as fixed effects

I don't know how your data are, but my guess is that variable `Bloque` is quantitative (i.e. as opposed to categorical). Thus, breedR uses it as a covariate and fits a single coefficient for it. As in linear regression: Y ~ b*X + e

A block variable is typically categorical. For that, the variable in the data.frame should be declared as `Factor`, which is the way R represents categorical variables.

Here is a little example that demonstrates this point:

library(breedR)
#> Loading required package: sp
dat <- data.frame(y = runif(10), x1 = sample(4, 10, replace = TRUE))
dat$xf <- as.factor(dat$x1)
remlf90(y~x1 + xf, data = dat)
#> Using default initial variances given by default_initial_variance()
#> See ?breedR.getOption.
#>  
#>    Data: dat 
#> NULL
res <- remlf90(y~x1 + xf, data = dat)
#> Using default initial variances given by default_initial_variance()
#> See ?breedR.getOption.
summary(res)
#> Formula: y ~ 0 + x1 + xf 
#>    Data: dat 
#>    AIC   BIC logLik
#>  8.919 9.221 -3.459
#> 
#> 
#> Variance components:
#>          Estimated variances    S.E.
#> Residual              0.1431 0.08263
#> 
#> Fixed effects:
#>        value   s.e.
#> x1   0.00000 0.0000
#> xf.1 0.44809 0.2675
#> xf.2 0.31614 0.2184
#> xf.3 0.44850 0.2184
#> xf.4 0.21857 0.2675


On the other hand, you can also specify `Bloque` as a spatial effect of type "blocks" (which you did as well). In this case, you don't need to bother with the factor specification, as breedR will do it for you. But you either put the block as a fixed effect or as a spatial (random) effect. Not both.


2. The interpretation of isotropic variograms.

Basically, it boils down to this:

When there is no spatial autocorrelation, the variogram is flat.

A variogram that increases with distance indicates spatial autocorrelation. It typically stabilises at some point. This is the "range": the distance at which there is no longer autocorrelation.

A variogram measures the variance of the difference between residuals at some distance: v(h) = V(e(x) - e(y)), where d(x, y) = h. (Actually, scaled by 1/2, but this is technical detail). In the presence of autocorrelation, small distances lead to more similar residual values (on average), and to a reduced variance of the difference. Which is why the variogram value is smaller near the origin, and increases progressively, as correlation decreases. On the other hand, if there is no autocorrelation at all, the variance of the difference of residuals is independent of the distance between locations, thus the variogram is flat.


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/672a2594-e909-4d03-b42f-aeff59abc252%40googlegroups.com.

Jaime Alberto Zapata Valenzuela

unread,
Apr 23, 2020, 11:37:00 AM4/23/20
to breedR
Dear Facundo
A million of thanks for answer my questions, I will post another topic to help readers to search for topics
Gracias!
To unsubscribe from this group and stop receiving emails from it, send an email to bre...@googlegroups.com.

Jaime Alberto Zapata Valenzuela

unread,
Apr 27, 2020, 6:33:54 PM4/27/20
to breedR
Dear Facundo

I still not sure If am interpreting the variogram correctly.
I understand the definition, but not the plot.


As example, attached is pdf file with my case:
I ran a dataset of one site of clones of E,globulus, where we expected to have a spatial microsite effect. I used the volume deviate as phenotypes, and first I adjusted a basic model with no spatial component, and then I fit the spatial block model. The % of spatial component is low (0.5%) and variograms before/after look almost identical.

My question is what I can see from the variogram here: Which is the blue line and the blacks dots upper or below it?
I marked a point where I believe I reached the plateau, but I am not sure.

I searched for internet to examples of this variogram but I did not find it.

I would appreciate your comments
Thanks in advance
Test1.pdf
Reply all
Reply to author
Forward
0 new messages