Learn R Programming

CensSpatial (version 3.6)

derivQfun: Maximum Likelihood Expectation (\(logQ\) function and its derivates)

Description

It computes the \(logQ\) function, its derivates of first and second order and the inverse of the hessian matrix for the SAEM estimated parameters.

Usage

derivQfun(est, fix.nugget = TRUE)

Value

Qlogvalue

value of the \(logQ\) function evaluated in the SAEM estimates.

gradQ

gradient for the \(logQ\) function evaluated in the SAEM estimates.

HQ

hessian Matrix for the \(logQ\) function evaluated in the SAEM estimates.

Qinv

inverse of the negative Hessian matrix for the \(logQ\) function evaluated in the SAEM estimates.

Arguments

est

object of the class "SAEMSpatialCens". See SAEMSCL function.

fix.nugget

(logical) it indicates if the \(\tau^2\) parameter must be fixed.

Author

Alejandro Ordonez <<ordonezjosealejandro@gmail.com>>, Victor H. Lachos <<hlachos@ime.unicamp.br>> and Christian E. Galarza <<cgalarza88@gmail.com>>

Maintainer: Alejandro Ordonez <<ordonezjosealejandro@gmail.com>>

Details

The \(logQ\) function refers to the logarithm of the Maximum likelihood conditional expectation, the first and second moments of the truncated normal distribution of censored data are involved in its computation.

References

Diggle, P. & Ribeiro, P. (2007). Model-Based Geostatistics. Springer Series in Statistics.

Gradshtejn, I. S. & Ryzhik, I. M. (1965). Table of integrals, series and products. Academic Press.

See Also

SAEMSCL

Examples

Run this code
require(geoR)
data("Missouri")
data=Missouri[1:70,]
data$V3=log((data$V3))



cc=data$V5
y=data$V3
datare1=data
coords=datare1[,1:2]
data1=data.frame(coords,y)
data1=data1[cc==0,]
geodata=as.geodata(data1,y.col=3,coords.col=1:2)
v=variog(geodata)
v1=variofit(v)
cov.ini=c(0,2)

est=SAEMSCL(cc,y,cens.type="left",trend="cte",coords=coords,M=15,perc=0.25,MaxIter=5,pc=0.2,
cov.model="exponential",fix.nugget=TRUE,nugget=2,inits.sigmae=cov.ini[2],inits.phi=cov.ini[1],
search=TRUE,lower=0.00001,upper=50)


d1=derivQfun(est)
d1$QI

Run the code above in your browser using DataLab