Thanks, Charlie. I'm a bit stumped by how to set up the amat 3D array for my application. I've attached R code, and the necessary data files, to build and predict from the aster model I'm actually working with. (The large aster data file is too big too attach here; so it's
A brief summary of the experiment:
These are data from a transplant experiment with Clarkia xantiana in southern California, similar in design to the experiment Ryan Briscoe Runquist was analyzing with Aster previously. I had six sites (with six blocks per site), three seed sources (populations), and a caging treatment to test for effects of biotic interactions across the species' geographic range. The aster LHS graph is: germination, early survival, late survival, survival to flowering, any fruits produced, total seeds produced.
The actual model is more complicated than the example I gave before: the predictors are planting year, site (with block nested within), Seed source, Caging treatment, and the site X Seed and site X Caging interactions. All in all, there are 360 "hypothetical" individuals for the predictions. I'm interested in generating predictions for all the combinations of predictors
except block (i.e., averaging over block), meaning I'm interested in obtaining 60 estimates with SE's.
I'm stumped on how I can use amat to average over the 6 blocks at each site. I know the dimensions of the 3D amat array are: 1) the number of individuals, 2) number of nodes in the graph, 3) number of parameters we want point estimates for. I think I know these dimensions:
- 1 = 360 hypothetical individuals
- 2 = 6 nodes in my graphical model
- 3 = 60 mean fitness estimates
However, when I'm "setting" the components of the amat array, I don't know at what locations I need to change values (except I think for the 2nd dimension, where it would always be filling in the [x, 6, x] position, because the 6th and final node is total_seeds, which is our lifetime fitness estimate).
Of course, I may be far off base here, or missing something very obvious -- sorry if so. Any help is appreciated!
John