ctChisqTest: Chi Square test wrapper for ctStanFit objects.

View source: R/ctCompare.R

ctChisqTestR Documentation

Chi Square test wrapper for ctStanFit objects.

Description

Chi Square test wrapper for ctStanFit objects.

Usage

ctChisqTest(fit1, fit2)

Arguments

fit1

One of the fits to be compared (better fit is assumed as base for comparison)

fit2

Second fit to be compared

Value

Numeric probability

Examples


    df <- data.frame(id=1, time=1:length(sunspot.year), Y1=sunspot.year)
    
    m1 <- ctModel(type='standt', LAMBDA=diag(1),MANIFESTVAR=0)
    m2 <- ctModel(type='standt', LAMBDA=diag(1),MANIFESTVAR=0,DRIFT = .9)
    
    f1 <- ctStanFit(df,m1,cores=1)
    f2 <- ctStanFit(df,m2,cores=1)
    
    ctChisqTest(f1,f2)


cdriveraus/ctsem documentation built on April 18, 2024, 5:24 a.m.