lotri

0th

Percentile

Easily Specify block-diagonal matrices with lower triangular info

Easily Specify block-diagonal matrices with lower triangular info

Usage
lotri(x, ...)
Arguments
x

list, matrix or expression, see details

...

Other arguments treated as a list that will be concatenated then reapplied to this function.

Details

This can take an R matrix, a list including matrices or expressions, or expressions

Expressions can take the form

name ~ estimate

Or the lower triangular matrix when "adding" the names

name1 + name2 ~ c(est1, est2, est3)

The matricies are concatenated into a block diagonal matrix, like bdiag, but allows expressions to specify matrices easier.

Value

named symmetric matrix useful in RxODE simulations (and perhaps elsewhere)

See Also

RxODE

Aliases
  • lotri
Examples
# NOT RUN {
## A few ways to specify the same matrix
lotri({et2 + et3 + et4 ~ c(40,
                           0.1, 20,
                           0.1, 0.1, 30)})

## You  do not need to enclose in {}
lotri(et2 + et3 + et4 ~ c(40,
                          0.1, 20,
                          0.1, 0.1, 30),
          et5 ~ 6)
## But if you do enclose in {}, you can use multi-line matrix specifications:

lotri({et2 + et3 + et4 ~ c(40,
                           0.1, 20,
                           0.1, 0.1, 30);
          et5 ~ 6;
          })

## You can also add lists or actual R matrices as in this example:
lotri(list(et2 + et3 + et4 ~ c(40,
                               0.1, 20,
                               0.1, 0.1, 30),
              matrix(1,dimnames=list("et5","et5"))))

## Overall this is a flexible way to specify symmetric block diagonal matrices.

# }
Documentation reproduced from package lotri, version 0.1.1, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.