This update was focused on enhancing SSN2 alignment with spmodel.
"wave" tail-up and tail-down covariance types. The wave covariance has oscillatory behavior that decays in magnitude with distance.conditional() for ssn_lm() and ssn_glm() model objects, which draws simulated values from the distribution of newdata conditional on observed data.ranger, randomForest, or xgboost) account for spatial covariance. ssn_decorrelate() estimates decorrelation parameters via a grid search evaluated on training/test splits or cross-validation and fits a machine learning model to the decorrelated data; ssn_decorrelate_data(), ssn_decorrelate_grid(), ssn_decorrelate_newdata(), and ssn_recorrelate_newdata() support the underlying transformation and grid search steps; and predict(), print(), and tidy() methods are provided for ssn_decorrelate() model objects.ssn_lm() model objects, for t-based (rather than asymptotic z-based) inference in small samples.
satterthwaite(), which computes Satterthwaite ddfs for the fixed effect coefficients of an ssn_lm() model object.ddf argument to ssn_lm() and anova() that controls whether Satterthwaite or asymptotic degrees of freedom are used for hypothesis tests. In ssn_lm(), if n (the sample size) is less than or equal to 500, Satterthwaite ddf are computed and used, which implies a breaking change in summary() and tidy() output.confint() for confidence intervals.emmeans::joint_tests() with Satterthwaite ddf."cov", "ssn", "tailup", "taildown", "euclid", "nugget", and "randcov" values to the type argument in vcov() for ssn_lm() model objects when using Satterthwaite ddf."weight" value to the type argument in predict(), which returns the prediction (i.e., Kriging) weights.kcv() for ssn_lm() and ssn_glm() model objects. kcv() generalizes loocv() (leave-one-out cross validation) by holding out k (approximately equally-sized) folds instead of single observations.reltol) passed to stats::optim(method = "Nelder-Mead", ...) from 1e-4 to 1e-6, affecting ssn_lm() and ssn_glm() model objects. The intent of this change is to help prevent convergence to a local maximum that is not a global maximum. This change may affect default backwards compatibility of fitted models, depending on the shape of their objective function. If the fitted model has changed due to the change in reltol, adding control = list(reltol = 1e-4) as an argument to ssn_lm() and ssn_glm() will reproduce the original fitted model.eacf argument to Torgegram() to compute the empirical autocovariance function.range_constrain argument to ssn_lm() and ssn_glm() to constrain the range parameter to enhance numerical stability. The default for range_constrain is FALSE, implying the range is not constrained.ssn_lmRF() functions to fit random forest spatial residual models.
ssn_lmRF().predict() to perform prediction.ssn_lm() and ssn_glm().n / 2 * log(2 * pi) so likelihood-based statistics are comparable on the standard scale. This is a breaking change that affects backwards compatibility.spmodel.spmodel.spmodel.amongSitesBigDistMat() function from the list of exported functions (i.e., it is now only able to be called internally).spmodel.SSN2 website titled "Adding Explanatory Variables to 'SSN' Objects Directly in R Using StreamCat".SSN2 website titled "Fitting 'SSN' Models to Large Data Sets and Making Predictions (i.e., Kriging)"size argument to the local argument in ssn_lm() and ssn_glm() from 100 to 200. This enhances the approximation's accuracy but can slightly increase computational complexity.size argument to the local argument in predict() and augment() from 2000 to 4000. This enhances the approximation's accuracy but can slightly increase computational complexity.local was specified (for large data sets) in ssn_lm() or ssn_glm().local_index in ssn_lm() or ssn_glm() model objects.spmodel version at least 0.7.0 so that AUROC() methods are properly called.partition_factor from working properly when non-NULL (#32).emmeans R package for estimating marginal means of ssn_lm() and ssn_glm() models.ssn_create_bigdist() function was added to create large distance matrices using the filematrix R package. Estimation for large data sets is performed by leveraging the local argument to ssn_lm() and ssn_glm(). Prediction for large data sets is performed by leveraging the local argument to predict() (and augment()). When local is used, SSN2 looks for distance matrices created using ssn_create_bigdist().ssn_import() so that it does not force an overwrite of the netgeom column when it already exists.verbose argument to ssn_import(), ssn_import_predpts(), and createBinaryID() to control whether warning messages are printed to the R console.na.action argument to predict.ssn_lm() and predict.ssn_glm() functions to clarify that missing values in newdata return an error.type argument in augment() for ssn_glm() models to type.predict to match broom::augment.glm().augment() for ssn_glm() models now returns fitted values on the link scale by default to match broom::augment.glm().type.residuals argument for ssn_glm() models to match broom::augment.glm().logLik() to match lm() and glm() behavior. logLik() now returns a vector with class logLik and attributes nobs and df.AIC() and BIC() from stats and removed SSN2-specific AIC() methods.warning argument to glances() that determines whether relevant warnings should be displayed or not.glances() about interpreting likelihood-based statistics (e.g., AIC, AICc, BIC) when a one model has estmethod = "ml" and another model has estmethod = "reml".glances() about interpreting likelihood-based statistics (e.g., AIC, AICc, BIC) when two models with estmethod = "reml" have distinct formula arguments.glances() about interpreting likelihood-based statistics (e.g., AIC, AICc, BIC) when two models have different sample sizes.glances() about interpreting likelihood-based statistics (e.g., AIC, AICc, BIC) when two models have different family supports (which can happen with ssn_glm() models).cloud argument to Torgegram() to return a cloud Torgegram.cex to plot.Torgegram().Torgegram(); see the robustargument to Torgegram()AUROC() function to compute the area under the receiver operating characteristic (AUROC) curve for ssn_glm models when family is "binomial" and the response is binary (i.e., represents a single success or failure).type argument to loocv() when cv_predict = TRUE and using ssn_glm() models so that predictions may be obtained on the link or response scale."terms" prediction for ssn_lm() and ssn_glm() models.scale and df arguments to predict() for ssn_lm() models.dispersion argument to predict() for ssn_glm() models.anova(model1, model2)) when estmethod is "ml" for both models #25.anova(object1, object2) when the name of object1 had special characters (e.g., $).ssn_glm() models when family = "beta" (#23).reexport.Rd to reflect changes in spmodel v0.8.0's handling of AIC() and AICc().README.md) updates as part of a submission to Journal of Open Source Software. Relevant issues associated with the review are available at #11, #12, #13, #14, #15, #16, #17, #20, #21. The review is linked here..ssn folder that is accessed when importing SSN objects via ssn_import().ssn_names() to return column names in the edges, obs, and preds elements of an SSN object.Matrix::rankMatrix(X, method = "tolNorm2") to Matrix::rankMatrix(X, method = "qr") to enhance stability when determining linear independence in X, the design matrix of explanatory variables.X has perfect collinearities (i.e., is not full rank).format_additive argument from ssn_import() because of transition to geopackage support, which eliminates the need to convert additive function values to text.create_netgeom() function to create the network geometry column for the edges, obs, and preds elements in an SSN object.SSN_to_SSN2() that caused an error using ssn_write() with no prediction sites.names.SSN() with ssn_names(), as names.SSN() prevented proper naming of elements in the SSN object.netgeometry to netgeom to avoid exceeding the 10 character limit for column/field names while writing to shapefiles (#2).family is missing in ssn_glm() (#8).SSN_to_SSN2().Torgegram() that prevented intended computation when cutoff was specified.plot.Torgegram() that occasionally prevented proper spacing of the legend.ssn_glm() model objects (and their summaries) when all covariance parameters were known.euclid_type was "none".taildown_type was "spherical".ssn_glm() objects.