optim.gcp {mable}R Documentation

Choosing optimal model degree by gamma change-point method

Description

Choose an optimal degree using gamma change-point model with two changing shape and scale parameters.

Usage

optim.gcp(obj)

Arguments

obj

a class "mable" or 'mable_reg' object containig a vector M = (m0, m1), lk, loglikelihoods evaluated evaluated at m \in \{m_0, \ldots, m_1\}

Value

a list with components

Examples


 # simulated data
 p<-c(1:5,5:1)
 p<-p/sum(p)
 x<-rmixbeta(100, p)
 res1<-mable(x, M=c(2, 50), IC="none")
 m1<-res1$m[1]
 res2<-optim.gcp(res1)
 m2<-res2$m
 op<-par(mfrow=c(1,2))
 plot(res1, which="likelihood", add=FALSE)
 plot(res2, which="likelihood")
 #segments(m2, min(res1$lk), m2, res2$mloglik, col=4)
 plot(res1, which="change-point", add=FALSE)
 plot(res2, which="change-point")
 par(op)


[Package mable version 3.1.3 Index]