Learn R Programming

scov

Implements the cthe WSCE, SCE or IVE estimator for large covariances in the presence of pairwise and spatial covariates from Metodiev et al. (2024).

Installation

You can install the development version of regexcite from GitHub with:

# install.packages("devtools")
devtools::install_github("m-metodiev/scov")

Usage

See the vignette for details.

Copy Link

Version

Install

install.packages('scov')

Monthly Downloads

146

Version

0.1.2

License

GPL (>= 3)

Maintainer

Martin Metodiev

Last Published

October 25th, 2025

Functions in scov (0.1.2)

calc_mean_neighbor_effect

Calculates the average correlation for the spatial effect
forward_transform_param

Transforms the parameter using a logit and inverse softmax
mat_support_distance

Computes a measure of distance between the support of two matrices
sce

Computes the structured covariance matrix estimator (SCE)
calc_tilde_G_inv_partial_beta

Calculates the derivative of the inverse of G (the CAR model matrix)
tilde_G_inv

Computes the inverse of the correlation matrix of the CAR model
frob_scalar_prod

Calculates the Frobenius inner product between to square matrices
eta_D_der

Calculates the derivative of the spatial average effect
get_M_A

Computes the matrices needed for the spatial effect
wsce

Computes the weighted structured covariance matrix estimator (WSCE)
ive

Computes the initial value estimator (IVE)
correlation_matrix

Estimates the correlation matrix of the dataset
GradLogLikLogParm_02

Calculates the gradient of the function of the transformed parameter
LogLikLogParm_02

Computes (a translation of) the loglikelihood for the transformed parameter
compute_marginal_cor

Computes non-positive-semidefinite approximation of correlation matrix
cor_from_standard_errors

Computes correlation matrix from a normalized dataset (=standard errors)
backward_transform_param_jacobian

Calculates the Jacobian of the backwards transformation
backward_transform_param

Calculates the backward transformation of the parameter
avg_effect

Calculate average effects (the mean effect over the matrix support)
LogLikParm_02

Computes (a translation of) the loglikelihood
calc_Dmat

Calculates the matrix D used in the quadratic minimization problem
GradLogLikParm_02

Calculates the gradient of the loglikelihood or the gradient of Sigma
combined_matList

Adds combined effects to the matList via the Hadamard product
Fisher_information

Computes the Fisher information matrix
combined_matList_partial_der

Computes the derivative of the correlation matrix w.r.t. beta
calc_Sigma_opt_frob

Minimizes the Frobenius norm via quadratic optimization
CovMat_03

Computes the correlation matrix corresponding to the SCE model
calc_dvec

Calculates the vector d used in the quadratic minimization problem
scov

Computes a structured estimator for covariance matrices
to_positive_definite

Maps the pairwise covariates to symmetric, positive definite matrices
true_LogLikParm_02

Computes the "true" (i.e., not translated) log-likelihood (needed for BIC)