Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement spatial analysis #20

Closed
priviere opened this issue May 4, 2017 · 6 comments
Closed

Implement spatial analysis #20

priviere opened this issue May 4, 2017 · 6 comments
Assignees
Labels
Agro Related to agro functions
Milestone

Comments

@priviere
Copy link
Owner

priviere commented May 4, 2017

cf SpATS package

@priviere
Copy link
Owner Author

priviere commented May 4, 2017

@priviere priviere self-assigned this Jul 15, 2017
@priviere
Copy link
Owner Author

priviere commented Jul 21, 2017

Done in v0.21

  • add new functions that implement spatial analysis :
    • spatial.R
    • check_model.fit_model_spatial.R
    • plot.check_model_spatial.R
    • mean_comparisons.check_model_spatial.R
    • plot.mean_comparisons_model_spatial.R
  • udpate the vignette

Still to do :

priviere pushed a commit that referenced this issue Jul 21, 2017
@priviere priviere added the Agro Related to agro functions label Apr 4, 2018
@priviere priviere added this to the v1 milestone Apr 4, 2018
@priviere
Copy link
Owner Author

How to choose between SAP() or PSANOVA() in the spatial argument ?

It seems not to change lots of things

d = data

d$col = as.numeric(as.character(d$X))
d$row = as.numeric(as.character(d$Y))
d$col_f = as.factor(d$col)
d$row_f = as.factor(d$row)

Several options:

options spatial random
1 "~ PSANOVA(col, row)" "~ col_f + row_f"
2 "~ SAP(col, row)") NULL
3 "~ PSANOVA(col, row)" "~ col_f + row_f"
4 "~ SAP(col, row)") NULL

Option 1 is the one used in the example in the article https://arxiv.org/abs/1607.08255 page 33 of the pdf

m1 = SpATS(
  response = "intervalle_floraison_dj", 
  genotype = "germplasm", 
  genotype.as.random = TRUE,
  spatial = ~ PSANOVA(col, row),
  random = ~ col_f + row_f, 
  data = d)
s1 = summary.SpATS(m1, which = "variances")$p.table.vc

m2 = SpATS(
  response = "intervalle_floraison_dj", 
  genotype = "germplasm", 
  genotype.as.random = TRUE,
  spatial = ~ PSANOVA(col, row),
  data = d)
s2 = summary.SpATS(m2, which = "variances")$p.table.vc

m3 = SpATS(
  response = "intervalle_floraison_dj", 
  genotype = "germplasm", 
  genotype.as.random = TRUE,
  spatial = ~ SAP(col, row),
  random = ~ col_f + row_f, 
  data = d)
s3 = summary.SpATS(m3, which = "variances")$p.table.vc

m4 = SpATS(
  response = "intervalle_floraison_dj", 
  genotype = "germplasm", 
  genotype.as.random = TRUE,
  spatial = ~ SAP(col, row),
  data = d)
s4 = summary.SpATS(m4, which = "variances")$p.table.vc

Look at link between BLUPs estimation

plot(m1$fitted, m2$fitted)
plot(m1$fitted, m3$fitted)
plot(m1$fitted, m4$fitted)
plot(m2$fitted, m3$fitted)
plot(m2$fitted, m4$fitted)
plot(m3$fitted, m4$fitted)

Regarding variznces, variances are more important on germplasm when row and col are not in random

c(s1["germplasm", "Variance"], s2["germplasm", "Variance"], s3["germplasm", "Variance"], s4["germplasm", "Variance"])

For residual variance, it changed nothing

c(s1["Residual", "Variance"], s2["Residual", "Variance"], s3["Residual", "Variance"], s4["Residual", "Variance"])

So lets choose model m1

@priviere
Copy link
Owner Author

how to choose value for nseg ?
for other argument, I guess the default option is good !

Lets use the default arg ...

@priviere
Copy link
Owner Author

priviere commented Mar 26, 2019

Done in v0.25

  • update mean comparisons
  • supress message from SpATS ? Not done, not useful I guess
  • create a data_model_spatial with y1
  • update documentation

@priviere
Copy link
Owner Author

Regarding mean comparisons, cf #124

priviere pushed a commit that referenced this issue Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agro Related to agro functions
Projects
None yet
Development

No branches or pull requests

1 participant