Learn R Programming

rbmn (version 0.9-6)

condi4joint: 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)

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.

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.

Examples

Run this code
 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));

Run the code above in your browser using DataLab