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

Some problem with conditional prediction and nsample #7

Open
miguel-porto opened this issue Sep 14, 2017 · 0 comments
Open

Some problem with conditional prediction and nsample #7

miguel-porto opened this issue Sep 14, 2017 · 0 comments

Comments

@miguel-porto
Copy link

miguel-porto commented Sep 14, 2017

Hello,
The example of conditional predictions in the manual on page 46 does not run in this line

predValCond[,i,j] <- predict(model, newdata=fungiValTmp,
	conditional=condSp, nsample=nsamp)[,i]

because the predictions come in a 3 dimensional array. The third dimension has the predictions for each sample of nsample. However, this somewhat confuses me because in the help of the function, the returning value is said to be

A matrix with the predicted values for each species at the sites in ‘newdata’ or a matrix of the same dimension as the fitted values.

This does not mention that predictions will be returned for each sample in nsample. On the other hand, the example of page 46 is written assuming that only one set of predictions is returned, regardless of nsample.
So, afterall, where is the problem, is it in function predict.hmsc() or in the example of page 46?

EDIT: (note that the example in help(predict.hmsc) does not run for the same reason)
All the best,
Miguel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant