View source: R/prinfunctions.R
nsroba | R Documentation |
This function performs Bayesian estimation of θ=(\bold{β},σ^2,φ) for the NSR model using the based reference, Jeffreys' rule ,Jeffreys' independent and vague priors.
nsroba(formula, method="median", prior = "reference",coords.col = 1:2,kappa = 0.5, cov.model = "matern", data,asigma=2.1, intphi = "default", ini.pars, burn=500, iter=5000, thin=10, cprop = NULL)
formula |
A valid formula for a linear regression model. |
method |
Method to estimate (\bold{beta},σ,φ). The methods availables are |
prior |
Objective prior densities avaiable for the TSR model: ( |
coords.col |
A vector with the column numbers corresponding to the spatial coordinates. |
kappa |
Shape parameter of the covariance function (fixed). |
cov.model |
Covariance functions available for the TSR
model. |
data |
Data set with 2D spatial coordinates, the response and optional covariates. |
asigma |
Value of a for the vague prior. |
intphi |
An interval for φ used for the uniform proposal. See |
ini.pars |
Initial values for (σ^2,φ) in that order. |
burn |
Number of observations considered in the burning process. |
iter |
Number of iterations for the sampling procedure. |
thin |
Number of observations considered in the thin process. |
cprop |
A constant related to the acceptance probability
(Default = NULL indicates that cprop is computed as the interval length of intphi). See
|
For the "unif"
proposal, it was considered the structure where a priori, φ follows an uniform distribution on the interval intphi
. By default, this interval is computed using the empirical range of data as well as the constant cprop
.
For the Jeffreys independent prior, the sampling procedure generates improper posterior distribution when intercept is considered for the mean function.
$dist |
Joint sample (matrix object) obtaining for (\bold{beta},σ^2,φ). |
$betaF |
Sample obtained for \bold{beta}. |
$sigmaF |
Sample obtained for σ^2. |
$phiF |
Sample obtained for φ. |
$coords |
Spatial data coordinates. |
$kappa |
Shape parameter of the covariance function. |
$X |
Design matrix of the model. |
$type |
Covariance function of the model. |
$theta |
Bayesian estimator of (\bold{beta},σ,φ). |
$y |
Response variable. |
$prior |
Prior density considered. |
Jose A. Ordonez, Marcos O. Prates, Larissa A. Matos, Victor H. Lachos.
Berger, J.O, De Oliveira, V. and Sanso, B. (2001). Objective Bayesian Analysis of Spatially Correlated Data. Journal of the American Statistical Association., 96, 1361 – 1374.
dnsrposoba
,dtsrprioroba
,dnsrprioroba,tsroba
set.seed(25) data(dataelev) ######covariance matern: kappa=0.5 res=nsroba(elevation~1, kappa = 0.5, cov.model = "matern", data=dataelev, ini.pars=c(10,390)) summary(res) ######covariance matern: kappa=1 res1=nsroba(elevation~1, kappa = 1, cov.model = "matern", data=dataelev, ini.pars=c(10,390)) summary(res1) ######covariance matern: kappa=1.5 res2=nsroba(elevation~1, kappa = 1.5, cov.model = "matern", data=dataelev, ini.pars=c(10,390)) summary(res2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.