The rssoptim function is used to fit SAR models (as mmSAR model objects) to dataset (as mmSAR data objects). This function allow the optimisation of the model parameters, fitted values calculation, information criteria (AIC, AICc, BIC) and R<c2><b2> calculations and fit evaluation with residuals normality and homoscedasticity tests.
A mmSAR model object representing the model to fit.
A mmSAR data object representing the data to fit the model on.
A character string from "lillie" or "shapiro" for respectively test for the normality of the residuals with a Lilliefors or Shapiro test.
Bolean : should the function reports informations while running ?
The rssoptim function is basically a wrapper for the optim R built-in function. rssoptim obtains model parameters estimates by minimizing the residual sum of squares using the unconstrained Nelder<e2><80><93>Mead optimization algorithm. Assuming normality of the observations, this approach produces optimal maximum likelihood estimates of model parameters. rssoptim provides two tests for the normality of the residuals : the Lilliefors extension of the Kolmogorov normality test, which is advocated when sample size is large or when the data show a substantial variability (e.g. continental scale studies) and the Shapiro-Wilk test for normality, which focuses on skewness and kurtosis of the empirical distribution of the residuals and is useful for small sample size or when data results from small scale sampling. mmSAR tests for homoscedasticity by evaluating the correlation between residuals magnitude and areas (Pearson<e2><80><99>s product moment correlation coefficient).
A list :
$par : the parameters estimates.
$value : the value of the Residual Sum of Squares (RSS).
$counts : number of iterations for the convergence of the fitting algorithm
$convergence : optim convergence code (only 0 is OK).
$message : optim convergence message (only NULL is OK).
$sigConf : a p x 6 matrix with columns for the estimated coefficient, its standard error, t-statistic, corresponding (two-sided) p-value and lower & upper bounds of the 95
$pearson : Pearson<e2><80><99>s product moment correlation coefficient value.
$pearpval : Pearson<e2><80><99>s product moment correlation coefficient p.value.
$normaTest : residuals normality test used.
$normaStat : residuals normality test statistic value.
$normaPval : residuals normality test statistic p.value.
$startvalues : starting values for the fitting algorithm.
$data : the data.
$model : the mmSAR model object.
$calculated : vector of fitted values.
$residuals : vector of residuals.
$AIC : AIC value.
$AICc : AICc value.
$BIC : BIC value.
$R2a : R<c2><b2> value.
$data.name : the name of the dataset (from the mmSAR data object).
1 2 3 4 5 6 7 8 9 10 11 12 13
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.