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 |
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.
To unsubscribe from this group and stop receiving emails from it, send an email to bre...@googlegroups.com.