Hi Jeff,
That worked great - thanks! But one last (related) problem.
I'm now trying to graph both Year (2 dummy variables representing 2009, 2010, and 2012) AND a continuous covariate (% bare ground) simultaneously. It works well predicting DSR at various levels of the continuous variable ("bare"), but is ignoring my arguments for Year2009 (0 or 1) and Year2010 (0 or 1). It just returns the DSR as if both were 0, no matter what I put in. Here is the model and prediction code:
- Code: Select all
#model
gp1year.bare=mark(gp1,nocc=103,model="Nest",model.parameters=list(S=list(formula=~year2009+year2010+bare)), groups=c("year2009","year2010"))
#beta estimates
estimate se lcl ucl
S:(Intercept) 3.0221740 0.5396361 1.9644872 4.0798608
S:year20091 0.3838193 0.6793767 -0.9477590 1.7153977
S:year20101 0.6545762 0.3754082 -0.0812239 1.3903763
S:bare -1.2772674 0.9206077 -3.0816586 0.5271237
#covariate predictions
covariate.predictions(gp1year.bare,data=data.frame(bare=seq(min(gp1$bare),max(gp1$bare),length=10),year2009=rep(1,10),year2010=rep(0,10)),indices=1)
Again, no matter what value of Year2009 or Year2010 I put into covariate.predictions, it always returns the same set of dsr:
$estimates
vcv.index model.index par.index bare year2009 year2010 estimate se lcl ucl fixed
1 1 1 1 0.0000000 1 0 0.9535659 0.02389400 0.8770178 0.9833714
2 2 1 1 0.1230165 1 0 0.9460914 0.02231640 0.8815761 0.9764007
3 3 1 1 0.2460330 1 0 0.9374926 0.02007459 0.8845753 0.9670532
4 4 1 1 0.3690496 1 0 0.9276272 0.01762251 0.8845571 0.9554379
5 5 1 1 0.4920661 1 0 0.9163436 0.01645984 0.8779144 0.9434555
6 6 1 1 0.6150826 1 0 0.9034839 0.01929397 0.8584993 0.9352462
7 7 1 1 0.7380991 1 0 0.8888872 0.02748818 0.8225804 0.9324483
8 8 1 1 0.8611157 1 0 0.8723946 0.04038604 0.7705184 0.9329778
9 9 1 1 0.9841322 1 0 0.8538565 0.05737670 0.7034877 0.9350138
10 10 1 1 1.1071487 1 0 0.8331403 0.07825519 0.6235711 0.9376939
Any help is appreciated!
Thanks,
Mike