Description Usage Arguments Details Value Note Author(s) See Also
Performs one iteration of the single component adaptative Metropolis (SCAM) algorithm with eigenvector rotation. scamH
is designed to apply the SCAM algorithm for models where a species community is modelled using habitat characteristics whereas scamHT
applies the SCAM algorithm to model a community with habitat characteristics and species traits.
1 2 3 4 5 6 7 8 9 10 11 | ## S3 method for class 'formula'
scamH(formula,data,start,priors,rotationVal,rotationVect,wParamX,wOuterParamX,sdvalue,accept,likelihoodtype="logit",burning=TRUE,rotation=TRUE,iter,...)
## S3 method for class 'HMSCdata'
scamH(data,start,priors,rotationVal,rotationVect,wParamX,wOuterParamX,sdvalue,accept,likelihoodtype="logit",burning=TRUE,rotation=TRUE,iter,...)
## S3 method for class 'HMSCdata'
scamHT(data,start,priors,rotationVal,rotationVect,wParamX,wOuterParamX,sdvalue,accept,likelihoodtype="logit",burning=TRUE,rotation=TRUE,iter,...)
## S3 method for class 'HMSCdata'
scamRandom(data,start,priors,rotationVal,rotationVect,wParamRandom,wOuterParamRandom,wRandomCov,sdvalue,accept,likelihoodtype="logit",burning=TRUE,rotation=TRUE,iter,...)
|
formula |
Model formula. The left side presents the response matrix and the right side gives the descriptors with their parameters. (See details) |
data |
Object of class HMSCdata. |
start |
Object of class HMSCparam. |
priors |
Object of class HMSCprior. |
rotationVal |
Matrix of eigenvalues independently weighting the importance of each parameter for a response variables. The matrix has as many rows as there are response variables and as many columns as parameters. |
rotationVect |
3-dimensional array where the first two dimensions present eigenvectors (indexed as the second dimension) for each response variables (third dimension). |
wParamX |
Matrix of the same dimensions as |
wOuterParamX |
3-dimensional array presenting covariance matrices (the first two dimensions are the rows and columns of the covariance matrix and the third dimension presents the different covariance matrices) used to weight the importance of the parameters for each response variable. |
wParamRandom |
Matrix of the same dimensions as |
wOuterParamRandom |
3-dimensional array presenting covariance matrices (the first two dimensions are the rows and columns of the covariance matrix and the third dimension presents the different covariance matrices) used to weight the importance of the random effect parameters for each response variable. |
wRandomCov |
A scalar weighting of the importance of |
sdvalue |
For |
accept |
For |
likelihoodtype |
Character string defining how the likelihood should be calculated. Any unambiguous variation of wording used in this argument is accepted. (See details) |
burning |
Logical. Whether or not standard deviation should be adapted. |
rotation |
Logical. Whether or not an eigenvector rotation should be carried out. |
iter |
Numeric. The number of time |
... |
Parameters passed to other functions. |
For the user the main difference between scamH
and scamHT
is within the data
and start
arguments. As for scamRandom
, it is specifically designed to estimate the parameter of the random effect and it is specifically it is heavily relying on the data and parameters available in the data
and start
arguments.
The algorithm implemented in this function assumes that the data follows a multivariate normal distribution. In that instance, it becomes valuable to check the distribution of the posterior to make sure that it is distributed following a pattern that look somewhat like a multivariate normal distribution. A way to do this is to use pairs
to study the different models parameters (paramX, paramTr,paramRandom, means, sigma,...), see example in hmscH
.
The formula
was designed so that it is necessary to include the parameters and the descriptors. This function is thus capable of carrying out non-linear regression analyses. *** IMPORTANT : Although the function will run, the estimation of the parameters for a non-linear model is very difficult and it is unlikely to converge unless many, many (many !!) iterations are carried out.***
Currently, two likelihood have been implemented, the binomial likelihood with a logit link, and the Poisson likelihood.
These functions were designed to converge to an accept ratio of 0.44.
These functions are constructed in such a way that if burning
is set to FALSE
, by default, rotation
will be considered FALSE
as well.
These functions are meant to be used within other functions such as hmscH
. However, this help file was written for user who want to develop new approaches using this basic algorithm.
start |
Object of class |
rotation |
List with the following items:
|
For scamH
and scamHT
:
|
An object of the same dimension as the argument |
|
An object of the same dimension as the argument |
For scamRandom
:
sdvalue |
A list of three component containing the updated standard deviations. This list includes exactly the same components as the ones first included in the function as argument. |
accept |
A list of three component containing the updated standard deviations. This list includes exactly the same components as the ones first included in the function as argument. |
No example are given for this function because this function is meant to be ran within another function. As explained in the Details section above.
F. Guillaume Blanchet
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.