Learn R Programming

OBASpatial (version 1.9)

dnsrposoba: Objective posterior density for the NSR model

Description

It calculates the density function \(\pi(\phi)\) (up to a proportionality constant) for the TSR model using the based reference, Jeffreys' rule, Jeffreys' independent and vague priors. In this context \(\phi\) corresponds to the range parameter.

Usage

dnsrposoba(x,formula,prior="reference",coords.col=1:2,
kappa=0.5,cov.model="exponential",data,asigma=2.1,intphi)

Value

Posterior density of x=\(\phi\).

Arguments

x

The \(\phi\) quantil value.

formula

A valid formula for a linear regression model.

prior

Objective prior densities avaiable for the TSR model: ( reference: Reference based, jef.rul: Jeffreys' rule, jef.ind: Jeffreys' independent).

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. matern: Matern, pow.exp: power exponential, exponential:exponential, cauchy: Cauchy, spherical: Spherical.

data

Data set with 2D spatial coordinates, the response and optional covariates.

asigma

Value of \(a\) for vague prior.

intphi

An interval for \(\phi\) used for vague prior.

Author

Jose A. Ordonez, Marcos O. Prates, Larissa A. Matos, Victor H. Lachos.

Details

The posterior distribution is computed for this priors under the improper family \(\frac{\pi(\phi)}{(\sigma^2)^a}\). For the vague prior, it was considered the structure where a priori, \(\phi\) folows an uniform distribution on the interval intphi.

For the Jeffreys independent prior, this family of priors generates improper posterior distribution when intercept is considered for the mean function.

References

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.

See Also

dtsrposoba,dtsrprioroba,dnsrprioroba

Examples

Run this code


data(dataelev)

######### Using reference prior ###########
dnsrposoba(x=5,prior="reference",formula=elevation~1,
kappa=1,cov.model="matern",data=dataelev)

######### Using Jeffreys' rule prior ###########
dnsrposoba(x=5,prior="jef.rul",formula=elevation~1,
kappa=1,cov.model="matern",data=dataelev)

######### Using vague independent prior ###########
dnsrposoba(x=5,prior="vague",formula=elevation~1,
kappa=0.3,cov.model="matern",data=dataelev,intphi=c(0.1,10))

Run the code above in your browser using DataLab