mmSAR usage
Loading mmSAR
After installation, load mmSAR :
library(mmSAR)
Use case 1 : the simple case.
Basic non linear SAR model fits are obtained with the rssoptim function, this function takes for arguments a model object and a data set object. Further arguments are available (see 'Functions'). A basic run :
#loading the exponential model
data(expo)
#loading the Galapagos Islands plants data set (Preston, 1962)
data(data.galap)
#fitting the exponential model to the Galapagos dataset
res <- rssoptim(expo,data.galap)
data(expo)
#loading the Galapagos Islands plants data set (Preston, 1962)
data(data.galap)
#fitting the exponential model to the Galapagos dataset
res <- rssoptim(expo,data.galap)
Use case 2 : multimodel SARs.
Multimodel SAR fits are obtained with the multiSAR function, this function takes for arguments a vector of character strings for model names and a data set object. Further arguments are available (see 'Functions'). A basic run :
#loading all available models
data(power)
data(expo)
data(negexpo)
data(monod)
data(ratio)
data(logist)
data(lomolino)
data(weibull)
#loading the Galapagos Islands plants data set (Preston, 1962)
data(data.galap)
#creating a vector of model names
mods <- c("power","expo","negexpo","monod","logist","ratio","lomolino","weibull")
#fitting all the models to the Galapagos dataset and perform multimodel averaging
resAverage <- multiSAR(modelList=mods,data.galap)
data(power)
data(expo)
data(negexpo)
data(monod)
data(ratio)
data(logist)
data(lomolino)
data(weibull)
#loading the Galapagos Islands plants data set (Preston, 1962)
data(data.galap)
#creating a vector of model names
mods <- c("power","expo","negexpo","monod","logist","ratio","lomolino","weibull")
#fitting all the models to the Galapagos dataset and perform multimodel averaging
resAverage <- multiSAR(modelList=mods,data.galap)