extract.varcov: Get the covariance matrix from an already parsed .cov output...

View source: R/extract.varcov.r

extract.varcovR Documentation

Get the covariance matrix from an already parsed .cov output file.

Description

Get the covariance matrix from an already parsed .cov output file.

Usage

extract.varcov(text)

Arguments

text

A character or numeric string containing the .cov output.

Value

A named list. The sole item in the list should have a name that is the estimation method used (e.g. "First Order Conditional Estimation with Interaction"). That named item will be a data frame containing the covariance matrix.

Notes

function not to be called alone - is called by qP function nm.covmat.extract inside get.covmat

See Also

nm.covmat.extract, get.covmat

Examples

## Not run: 
nm.unzip(
  path = file.path(getOption("qpExampleDir"),"run11"),
  run = "run11",extension = ".cov"
)
covText = scan(
  file = file.path(getOption("qpExampleDir"),"run11","run11.cov"),
  what = "character",sep = "\n", quiet = T
)

## the heart of the function: parse space delimited text into a matrix
cov = extract.varcov(covText[-1])

## warning: this matrix is LARGE. View only start and end of output
head(cov)
tail(cov)

file.remove(file.path(getOption("qpExampleDir"),"run11","run11.cov")) ## clean things up

## End(Not run)

qPharmetra/qpToolkit documentation built on May 24, 2023, 8:52 a.m.