Learn R Programming

phylosim (version 3.0.5)

rescaleQMatrix.ToleranceSubstitution: Rescale the scaled rate matrix of a QMatrix object aggregated by a ToleranceSubstitution object

Description

Rescale the scaled rate matrix of a QMatrix object aggregated by a ToleranceSubstitution object.

The QMatrix objects aggregated by the ToleranceSubstitution objects store two rate matrices: one containes the rates provided by the user (unscaled rate matrix), the other matrix (scaled rate matrix) is rescaled to have the expected number of subsitutions per unit time equal to one when the process is at equlibrium. This method performes the re-scaling of the scaled rate matrix in the associated QMatrix object based on the equlibrium distribution and the unscaled rate matrix.

This method is mainly used internally as the scaled matrix is rescaled every time the unscaled matrix is modifed.

Usage

# S3 method for ToleranceSubstitution
rescaleQMatrix(this, ...)

Arguments

this

A ToleranceSubstitution object.

...

Not used.

Value

Invisible TRUE.

See Also

For more information see ToleranceSubstitution.

Examples

Run this code
# NOT RUN {
	# create a ToleranceSubstitution object
	# provide an Alphabet object and the rates
	p<-ToleranceSubstitution(alphabet=BinaryAlphabet(), rate.list=list("1->0"=1,"0->1"=3))
	# rescale rate matrix
	rescaleQMatrix(p)
 
# }

Run the code above in your browser using DataLab