stFit {telefit} | R Documentation |
Fit the remote effects spatial process (RESP) model
Description
Fit the remote effects spatial process (RESP) model
Usage
stFit(
stData = NULL,
priors,
maxIt,
X = stData$X,
Y = stData$Y,
Z = stData$Z,
coords.s = stData$coords.s,
coords.r = stData$coords.r,
rw.initsd = NULL,
returnll = T,
miles = T,
C = 1,
alpha = 0.44,
localOnly = F,
varying = F,
remoteOnly = F,
coords.knots
)
Arguments
stData |
Object with class 'stData' containing data needed to fit this model. The data need only be manually entered if not using a stData object. |
priors |
A list containing parameters for the prior distributions. The list needs to contain the following values
|
maxIt |
number of iterations to run the MCMC chain for |
X |
[ns, p, nt] array of design matrices with local covariates |
Y |
[ns, nt] matrix with response data |
Z |
[nr, nt] matrix with remote covariates |
coords.s |
matrix with coordinates where responses were observed (lon, lat) |
coords.r |
matrix with coordinates where remote covariates were observed (lon, lat) |
rw.initsd |
A list containing initial standard deviation parameters for the MCMC parameters requiring random walk updates
|
returnll |
TRUE to compute the model log-likelihood at each iteration |
miles |
TRUE if covariance matrix distances should be in miles, FALSE for kilometers |
C |
scaling factor used in adapting random walk proposal variances. |
alpha |
target acceptance rate for random walk proposals. |
localOnly |
TRUE to fit the model without the teleconnection effects (typically for evaluating impact of teleconnection effects) |
varying |
(depreceated) TRUE to fit the model with spatially varying local coefficients |
remoteOnly |
TRUE to fit the model without local effects. This will fit a local intercept, but will not incorporate local covariates. |
coords.knots |
matrix with coordinates where remote teleconnections will be based (lon, lat) |
Examples
library(dplyr)
library(foreach)
library(itertools)
set.seed(2018)
data("coprecip")
data("coprecip.fit")
attach(coprecip)
coprecip.fit = stFit(stData = coprecip, priors = coprecip.fit$priors,
maxIt = 10, coords.knots = coprecip.fit$coords.knots)