R/vuongtest.R

Defines functions vuongtest

Documented in vuongtest

vuongtest<-function(model1,model2,selection="AIC"){
    ll1<-model1$ll
    ll2<-model2$ll
    m<-ll1-ll2
    t.stat<-sqrt(length(m))*mean(m)/sd(m)
    if (selection=="AIC"){
	t.stat=t.stat -(model1$npar -model2$npar)
	}
    if (selection=="BIC"){
	n=length(ll1)
	t.stat=t.stat -(model1$npar*log(n)/2 - model2$npar*log(n)/2)
	}
    return(t.stat)



}

Try the CopulaRegression package in your browser

Any scripts or data that you put into this service are public.

CopulaRegression documentation built on May 29, 2017, 5:47 p.m.