Internal functions used to temporarily store data and other information before adding to dataSDM.
dataOrganize$makeData()Function to form the data into sf objects, as well as extract other information about the model required.
dataOrganize$makeData(
datapoints,
datanames,
coords,
proj,
marktrialname,
paresp,
countsresp,
trialname,
speciesname,
marks,
pointcovnames,
markfamily,
temporalvar,
offsetname
)datapointsA list of datasets as either sf, data.frame or SpatialPoints objects.
datanamesA vector of the names of the datasets.
coordsNames of the coordinates used in the model.
projThe projection reference system used in the model.
marktrialnameName of the trial variable used by the binomial marks.
parespName of the response variable used by the presence absence datasets.
countsrespName of the response variable used by the counts data.
trialnameName of the trial variable used by the presence absence datasets.
speciesnameName of the species name variable.
marksName of the marks considered in the model.
pointcovnamesName of the point covariates used in the model.
markfamilyA vector describing the distribution of the marks.
temporalvarThe name of the temporal variable.
offsetnameThe name of the offset
dataOrganize$makeSpecies()Function used to separate the datasets by species.
dataOrganize$makeSpecies(speciesname, repl = FALSE)speciesnameThe name of the species variable.
replAre species effects replicate. Defaults to FALSE.
dataOrganize$makeMultinom()Function to make multinomial marks, if any are included in the model.
dataOrganize$makeMultinom(multinomVars, return, oldVars, repl = FALSE)multinomVarsName of the multinomial marks.
returnWhat to return: species or marks.
oldVarsIf any multinomial marks were included in a previous iteration, what where their names.
replSpecies replicate model included. Defaults to FALSE.
dataOrganize$makeFormulas()Function used to create formulas for the processes.
dataOrganize$makeFormulas(
spatcovs,
spatcovclass,
speciesname,
paresp,
countresp,
marks,
marksspatial,
speciesintercept,
speciesenvironment,
spatial,
intercept,
temporalname,
speciesindependent,
markintercept,
pointcovs,
speciesspatial,
biasformula,
covariateformula
)spatcovsNames of the spatial covariates used in the model.
spatcovclassClass of the spatial covariates.
speciesnameName of the species variable.
parespName of the presence absence response variable.
countrespName of the count data response variable.
marksName of the marks used in the model.
marksspatialLogical: should spatial fields be included for the marks.
speciesinterceptLogical: should specific species intercept terms be created for the species.
speciesenvironmentLogical: should species specific environmental terms be created.
spatialLogical: are spatial effects run in the model.
interceptLogical: are intercepts run in the model.
temporalnameName of the temporal variable used in the model.
speciesindependentLogical: make independent species effects.
markinterceptLogical: are intercepts run for the marks in the model.
pointcovsName of the point covariates.
speciesspatialLogical: should the species have spatial fields.
biasformulaTerms to include for PO data.
covariateformulaTerms to include for the covariate formula.
dataOrganize$makeComponents()Function used to make components for the model.
dataOrganize$makeComponents(
spatial,
intercepts,
datanames,
marks,
speciesname,
multinomnames,
pointcovariates,
covariatenames,
covariateclass,
marksspatial,
marksintercept,
temporalname,
speciesspatial,
speciesenvironment,
speciesintercept,
numtime,
temporalmodel,
offsetname,
copymodel,
speciesindependent,
biasformula,
covariateformula,
marksCopy
)spatialLogical: are spatial effects run in the model.
interceptsLogical: are intercepts run in the model.
datanamesNames of the datasets used in the model.
marksNames of the marks used in the model.
speciesnameName of the species variable.
multinomnamesNames of the multinomial marks.
pointcovariatesNames of the point covariates.
covariatenamesNames of the spatially varying covariates.
covariateclassThe classes of the spatially varying covariates.
marksspatialLogical: should spatial fields be included for the marks.
marksinterceptLogical: should intercepts be included for the marks.
temporalnameName of the temporal variable used in the model.
speciesspatialLogical: Should the species be run with spatial fields.
speciesenvironmentLogical: Should the species have their own environmental effects.
numtimeNumber of time increments included in the model.
offsetnameName of the offset column in the datasets.
copymodelList of the hyper parameters for the copy model.
speciesindependentLogical: should species effects be made independent.
biasformulaTerms to include for PO data.
covariateformulaTerms to include for the covariate formula.
marksCopyNames of where each mark occurs in the dataset.
speciesintercept:Logical: should intercept terms be created for each species.
dataOrganize$makeLhoods()Function to make the datasets into likelihoods.
dataOrganize$makeLhoods(
mesh,
ips,
paresp,
ntrialsvar,
markstrialsvar,
speciesname
)meshAn fm_mesh_2d object.
ipsIntegration points used.
parespThe response variable name for the presence absence datasets.
ntrialsvarThe trials variable name for the presence absence datasets.
markstrialsvarThe trial variable name for the binomial marks.
speciesnameThe name of the species variable used.
dataOrganize$clone()The objects of this class are cloneable with this method.
dataOrganize$clone(deep = FALSE)deepWhether to make a deep clone.