Description Usage Arguments Details See Also Examples
A quick function to perform wald tests of likfit objects.
1 |
object |
Result from a likfit based function. Must be of class |
probs |
Result from |
terms |
An index indicating variable to be included. Equivalent to Terms in |
levels |
An index indicating variable to be compared. Equivalent to L in |
factor |
A character string which represents the factor string of names in the probs argument. Default is NULL. |
A wrapping function of the wald.test
function.
If only object is specified the function uses terms=1:length(object$beta)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | data(meuse)
temp <- na.omit(meuse)
geoData <- as.geodata(temp,coords.col=1:2,data.col=5, covar.col = c(3:4,6:13))
formula. <- "~elev+soil+lime+om+soil+dist+landuse"
fullModel <- likfit_step(geodata=geoData,
formula=formula.,
ini.=c(0.3,100),
nugget=0.01,
lambda=0,
fix.lambda=FALSE,
fix.nugget=FALSE,
lik.method="RML",
noBackSelection=TRUE,
useRcpp=TRUE)
# Perform a wald test on all.
likfit_wald(fullModel[[3]])
# Perform a wald test on landuse.
likfit_wald(fullModel[[3]],probs=fullModel[[2]], factor="landuse")
#Perform a wald test on specific covariates
likfit_wald(fullModel[[3]], terms=1:5)
#Perform a wald test on specific levels of a factor.
l= t(rep(0,length(fullModel[[3]]$beta)))
l[8] = -1
l[9] = 1
likfit_wald(fullModel[[3]], levels=l)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.