R/response-class.R

# 
# response, transition and prior models for DEPMIX models
# 23-3-2008
# Maarten Speekenbrink & Ingmar Visser
# 

# 
# RESPONSE CLASS
# 

setClass("response",
	representation(parameters="list",
		fixed="logical",
		y = "matrix",
		x = "matrix",
		npar = "numeric", # this is not really needed as it simply is length(unlist(parameters))
		constr = "ANY"
	)
)

#
# RESPONSE CLASS METHODS
# 

setMethod("npar","response",
	function(object) {
		return(object@npar)
	}
)

setMethod("getdf","response",
	function(object) {
		return(sum(!object@fixed))
	}
)

Try the depmixS4 package in your browser

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

depmixS4 documentation built on Jan. 23, 2020, 3 p.m.