make_splm: Make a spatial linear model

View source: R/make_splm.R

make_splmR Documentation

Make a spatial linear model

Description

Make spatial linear model object using estimated covariance parameters from optim().

Usage

make_splm(params, X, y, cov_type, dist_mtx = NULL, m2loglike = NULL,
  est_meth = NULL, hessian = NULL, dist_K = NULL, dist_S = NULL,
  knot_coord = NULL, optim_out = NULL)

Arguments

params

Numeric vector of fitted covariance parameter values (nugget, partial sill, and range, in that order).

X

Design matrix. Must include column of 1's for intercept.

y

Numeric response vector.

cov_type

character. Type of covariance model: exponential, gaussian, or spherical.

dist_mtx

Distance matrix used to compute covariance matrix.

m2loglike

Minus 2 times the log-likelihood (from optim()).

est_meth

character. Estimation method used for m2LL: 'REML' for restricted maximum likelihood, or 'ML' for maximum likelihood.

hessian

Hessian matrix from optim().

dist_K

Distance matrix for knot locations.

dist_S

Distance matric between data locations and knots (nrow is number of data points and ncol is number of knots).

knot_coord

data frame or matrix. Coordinates of knots used for reduced rank method. Optional to include (coordinates are just saved in 'splm' object for later reference).

optim_out

list output from optim().

Value

List of class splm containg features of fitted spatial linear model (e.g., covariance matrix, predictor coefficients, ...).

Author(s)

Eric W. Fox

See Also

m2LL, optim


ericwfox/slmrf documentation built on Feb. 24, 2024, 11:02 p.m.