Learn R Programming

geostatsp (version 1.2.1)

profLlgm: Joint confidence regions

Description

Calculates profile likelihoods and approximate joint confidence regions for covariance parameters in linear geostatistical models.

Usage

profLlgm(fit, mc.cores = 1, ...)
informationLgm(fit,  ...)

Arguments

fit
Output from the lgm function
mc.cores
Passed to mcmapply
...
For profLlgm, one or more vectors of parameter values at which the profile likelihood will be calculated, with names corresponding to elements of fit$param. For informationLgm, arguments passed to

Value

  • one or more vectorsof parameter values
  • logLA vector, matrix, or multi-dimensional array of profile likelihood values for every combination of parameter values supplied.
  • fullData frame with profile likelihood values and estimates of model parameters
  • prob,breaksvector of probabilities and chi-squared derived likelihood values associated with those probabilities
  • MLE,maxLogLMaximum Likelihood Estimates of parameters and log likelihood evaluated at these values
  • baseparscombination of starting values for parameters re-estimated for each profile likelihood and values of parameters which are fixed.
  • colvector of colours with one element fewer than the number of probabilities
  • ci,ciLongwhen only one parameter is varying, a matrix of confidence intervals (in both wide and long format) is returned.

See Also

lgm, mcmapply, hessian

Examples

Run this code
# this example is time consuming
# the following 'if' statement ensures the CRAN
# computer doesn't run it
if(interactive() | Sys.info()['user'] =='patrick') {

library('geostatsp')
data('swissRain')

swissFit = lgm(data=swissRain, formula=rain~ SRTM_1km,
		grid=10, covariates=swissAltitude,
		shape=1,  fixShape=TRUE, 
		boxcox=0.5, fixBoxcox=TRUE, 
		aniso=TRUE,reml=TRUE,
		param=c(anisoAngleDegrees=37,anisoRatio=7.5,
		range=50000))


x=profLlgm(swissFit,
		anisoAngleDegrees=seq(30, 43 , len=4)
)


plot(x[[1]],x[[2]], xlab=names(x)[1],
		ylab='log L',
		ylim=c(min(x[[2]]),x$maxLogL),
		type='n')
abline(h=x$breaks[-1],
		col=x$col,
		lwd=1.5)
axis(2,at=x$breaks,labels=x$prob,line=-1.2,
	tick=FALSE,
		las=1,padj=1.2,hadj=0)
abline(v=x$ciLong$par,
		lty=2,
		col=x$col[as.character(x$ciLong$prob)])
lines(x[[1]],x[[2]])



}

Run the code above in your browser using DataLab