var2cor: Convert Covariance Matrix to Correlation Matrix - Generic...

Description Usage Arguments Details Value See Also Examples

View source: R/nlreg.R

Description

This function converts the covariance matrix from a fitted model into the correlation matrix.

Usage

1
var2cor(object, ...)

Arguments

object

any fitted model object from which a covariance matrix may be extracted.

...

absorbs any additional argument.

Details

This function is generic (see methods); method functions can be written to handle specific classes of data. Classes which already have methods for this function include: nlreg, summary.nlreg, mpl and summary.mpl.

Value

the correlation matrix of the estimates from a fitted model.

See Also

var2cor.nlreg, var2cor.mpl, methods

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(metsulfuron)
metsulfuron.nl <- 
    nlreg( log(area) ~ log( b1+(b2-b1) / (1+(dose/b4)^b3) ), 
           weights = ~( 1+dose^exp(g) )^2, data = metsulfuron, 
           start = c(b1 = 138, b2 = 2470, b3 = 2, b4 = 0.07, g = log(0.3)),
           hoa = TRUE )
var2cor( metsulfuron.nl )
##
metsulfuron.sum <- summary( metsulfuron.nl, corr = FALSE )
var2cor( metsulfuron.sum )

nlreg documentation built on Jan. 30, 2019, 5:04 p.m.