R/find.shapeMLE.R

Defines functions find.shapeMLE

Documented in find.shapeMLE

find.shapeMLE <-
function(x, delta=rep(1, length(x)), type="increasing", plot=FALSE){
	
	if(type=="increasing"){
		mle		<-	find.increasingMLE(x, w=rep(1, length(x)), delta, plot)
		mode	<-	NA
		} 
	if(type=="decreasing"){
		mle		<-	find.decreasingMLE(x, w=rep(1, length(x)), delta, plot)
		mode	<-	NA
		} 
	if(type=="unimodal"){
		mle		<-	find.unimodalMLE(x, w=rep(1, length(x)), delta, plot)
		mode	<-	mle$mode
		} 
	if(type=="ushaped"){
		mle		<-	find.ushapedMLE(x, w=rep(1, length(x)), delta, plot)
		mode	<-	mle$antimode
		} 
	
	res			<-	list(beta=NA, h.range=mle$ranges, h.val=mle$mle, phi=mle$phi, H=mle$H, mode=mode, type=type)
	class(res)	<-	"CPHshape"
	return(res)		

	
	} # find.shapeMLE 

Try the CPHshape package in your browser

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

CPHshape documentation built on May 30, 2017, 4:32 a.m.