condi4joint: computes some conditional distribution of a multinormal...

View source: R/f07.normal.code.r

condi4jointR Documentation

computes some conditional distribution of a multinormal vector

Description

returns the expectation and variance of a sub-vector conditionned with another (non overlapping) sub-vector from an initial random vector described by mn.

Usage

condi4joint(mn, par, pour, x2=NULL)

Arguments

mn

list defining the distribution of the initial vector with $mu, its expectation, and $gamma, its variance matrix.

par

names (or indices) of the sub-vector to give the distribution.

pour

names (or indices) of the conditionning sub-vector (can be NULL when for non conditionning.

x2

values to consider for the conditioning sub-vector. When NULL the general form is supplied, not a /mn/ object.

Details

when no names are given to mn$mu, par and pour are supposed containing indices and default sequential names are provided.

Value

A list:
when x2 provides the values taken by the conditioning part, it is a /mn/ object with its two components: $mu for the expectation vector and $gamma for the variance matrix.
when x2 is NULL the list has got three components: $mu for the fixed part of the expectation vector, $b for the regression coefficients to be associated to the non precised x2 values, varying part of the expectation and $gamma for the variance matrix.

Examples

 print8mn(condi4joint(rbmn0mn.04, c("1.1", "2.2", "1.2", "2.1"), NULL));
 print8mn(condi4joint(rbmn0mn.04, c("1.1", "2.2", "1.2", "2.1"), "C", 0));
 print(condi4joint(rbmn0mn.04, c("1.1", "2.2", "1.2", "2.1"), "C", NULL));

rbmn documentation built on July 9, 2023, 6:37 p.m.