HypoTest {CompRandFld}  R Documentation 
The function performs statistical hypothesis tests for nested models based on composite likelihood versions of: Waldtype, scoretype and Wilkstype (likelihood ratio) statistics.
HypoTest(object1, object2, ..., statistic)
object1 
An object of class 
object2 
An object of class 
... 
Further successively nested objects. 
statistic 
String; the name of the statistic used within the hypothesis test (see Details). 
The implemented hypothesis tests for nested models are based on the following statistics:
Waldtype (Wald
);
Scoretype, also known as Raotype (Rao
);
Wilkstype; also known as the composite likelihood ratio statistic. Available are variants of the basic version, in particular:
Rotnitzky and Jewell adjustment (WilksRJ
);
Satterhwaite adjustment (WilksS
);
Chandler and Bate adjustment (WilksCB
);
Pace, Salvan and Sartori adjustment (WilksPSS
);
More specifically, consider an pdimensional random vector Y with probability density function f(y;theta), where theta in Theta is a qdimensional vector of parameters. Suppose that theta=(psi, tau) can be partitioned in a q'dimensional subvector psi and q''dimensional subvector tau. Assume also to be interested in testing the specific values of the vector psi. Then, one can use some statistical hypothesis tests for testing the null hypothesis H_0: psi=psi_0 against the alternative H_1: psi <> psi_0. Composite likelihood versions of 'Wald' and 'score' statistics have the usual asymptotic chisquare distribution with q' degree of freedom. The Waldtype statistic is
W=(hat{psi}psi_0)^T (G^{psi psi})^{1} (hat{theta})(hat{psi}psi_0),
where G_{psi psi} is the q' x q' submatrix of the Godambe information pertaining to psi and hat{theta} is the maximum likelihood estimator from the full model. The scoretype statistic (Raotype) is
W=s_{psi}{psi_0, hat{tau}(psi_0)}^T H^{psi psi}(hat{theta}_psi) {G^{psi psi}(hat{theta}_psi)}^{1} H^{psi psi}(hat{theta}_psi) s_{psi}{psi_0, hat{tau}(psi_0)},
where H^{psi psi} is the q' x q'
submatrix of the inverse of H(theta) pertaining to
psi (the same for G) and
hat{theta}_psi is the constrained maximum
likelihood estimate of theta for fixed psi.
These two statistics can be called from the
routine HypoTest
assigning at the argument statistic
respectively the values: Wald
and Rao
.
Alternatively to the Waldtype and scoretype statistics one can use the composite version of the Wilkstype or likelihood ratio statistic, given by
W=2[Cl(hat{theta};y)  Cl{psi_0, hat{tau}(psi_0);y}].
The asymptotic distribution of the composite likelihood ratio statistic is given by
W ~ sum_i lambda_i Chi^2_i,
for i=1,...,q', where Chi^2_i are
q' iid copies of a chisquare one random variable and
lambda_1,...,lambda_{q'}
are the eigenvalues of the matrix (H^{psi psi})^1 G^{psi psi}. There exist several adjustments
to the composite likelihood ratio statistic in order to get an
approximated Chi^2_{q'}. For example, Rotnitzky and Jewell
(1990) proposed the adjustment W'= W /
bar{lambda} where bar{lambda} is the average
of the eigenvalues lambda_i. This statistic can be
called within the routine by the value: WilksRJ
. A better
solution is proposed by Satterhwaite (1946) defining W''= nu W / (q' bar{lambda}), where nu = sum_i lambda / sum_i lambda^2_i for
i=1...,q', is the effective number of the degree of
freedom. Note that in this case the distribution of the likelihood ratio
statistic is a chisquare random variable with nu degree of
freedom. This statistic can be called from the routine assigning the
value: WilksS
. For the adjustments suggested by Chandler and
Bate (2007) and Pace, Salvan and Sartori (2011) we refere to the articles (see
References), these versions can be called from the routine assigning
respectively the values: WilksCB
and WilksPSS
.
An object of class c("data.frame")
. The object contain a table
with the results of the tested models. The rows represent the
responses for each model and the columns the following results:
Num.Par 
The number of the model's parameters. 
Diff.Par 
The difference between the number of parameters of the model in the previous row and those in the actual row. 
Df 
The effective number of degree of freedom of the chisquare distribution. 
Chisq 
The observed value of the statistic. 
Pr(>chisq) 
The pvalue of the quantile

Simone Padoan, simone.padoan@unibocconi.it, http://faculty.unibocconi.it/simonepadoan; Moreno Bevilacqua, moreno.bevilacqua@uv.cl, https://sites.google.com/a/uv.cl/morenobevilacqua/home.
Chandler, R. E., and Bate, S. (2007). Inference for Clustered Data Using the Independence loglikelihood. Biometrika, 94, 167–183.
Pace, L., Salvan, A. and Sartori, N. (2011). Adjusting Composite Likelihood Ratio Statistics. Statistica Sinica, 21, 129–148.
Rotnitzky, A. and Jewell, N. P. (1990). Hypothesis Testing of Regression Parameters in Semiparametric Generalized Linear Models for Cluster Correlated Data. Biometrika, 77, 485–497.
Satterthwaite, F. E. (1946). An Approximate Distribution of Estimates of Variance Components. Biometrics Bulletin, 2, 110–114.
Varin, C., Reid, N. and Firth, D. (2011). An Overview of Composite Likelihood Methods. Statistica Sinica, 21, 5–42.
# Please remove the symbol hashtag to run the code library(CompRandFld) library(RandomFields) set.seed(3451) # Define the spatialcoordinates of the points: x < runif(300, 0, 10) y < runif(300, 0, 10) ################################################################ ### ### Example 1. Composite likelihoodbased hypothesis testing. ### Simulation of a Gaussian spatial random field with ### stable correlation. ### Estimation by composite likelihood using the setting: ### marginal pairwise likelihood objects. ### ############################################################### # Set the model's parameters: corrmodel < "stable" mean < 0 sill < 1 nugget < 1 scale < 1 power < 1.3 # Simulation of the spatial Gaussian random field: data < RFsim(x, y, corrmodel=corrmodel, param=list(mean=mean, sill=sill,nugget=nugget,scale=scale,power=power))$data # Maximum compositelikelihood fitting of the random field, full model: fit1 < FitComposite(data, x, y, corrmodel=corrmodel, maxdist=5, varest=TRUE,start=list(mean=mean,power=power,scale=scale,sill=sill), fixed=list(nugget=1)) # Maximum compositelikelihood fitting of the random field, first nasted model: fit2 < FitComposite(data, x, y, corrmodel=corrmodel, maxdist=5, varest=TRUE,start=list(mean=mean,power=power,scale=scale), fixed=list(nugget=1,sill=1)) # Maximum compositelikelihood fitting of the random field, second nasted model: fit3 < FitComposite(data, x, y, corrmodel=corrmodel, maxdist=5, varest=TRUE,start=list(scale=scale), fixed=list(nugget=1,sill=1,mean=0,power=1.3)) # Hypothesis testing results: # composite Waldtype statistic: HypoTest(fit1, fit2, fit3, statistic='Wald') # composite scoretype statistic: HypoTest(fit1, fit2, fit3, statistic='Rao') # composite likelihood ratio statistic with RJ adjustment: HypoTest(fit1, fit2, fit3, statistic='WilksRJ') # composite likelihood ratio statistic with S adjustment: HypoTest(fit1, fit2, fit3, statistic='WilksS') # composite likelihood ratio statistic with CB adjustment: HypoTest(fit1, fit2, fit3, statistic='WilksCB') # composite likelihood ratio statistic with PSS adjustment: HypoTest(fit1, fit2, fit3, statistic='WilksPSS')