Learn R Programming

Delta (version 0.2.0.3)

GetCovariance: Calculate Covariance function

Description

This function calculate covariance for combinations Cov(Delta,Delta), Cov(Delta,Pi) and Cov(Pi,Pi).

Usage

GetCovariance(mx, Delta, Pi, B)

Arguments

mx

Matrix. Modified matrix to have a solution. Usually GetMx$M1 for k>2 and GetMx$M2 in case of k = 2.

Delta

Vector. Each element indicate the probability of recognize an element i.

Pi

Vector. Each element indicate the probability of classify at random an element in category i.

B

Double. Numerical solution to the equation given by the model.

Examples

Run this code
# NOT RUN {
GetCovariance(mx = matrix(c(1.5,0.5,0.5,0.5,2.5,0.5,0.5,0.5,3.5),3,3), 
			 Delta = c(0.4,0.5714286,0.666667), 
              Pi = c(0.3333,0.333333,0.33333),B = 4.5)
GetCovariance(mx = matrix(c(60,0,3,2,50,1,3,2,79),3,3), 
			Delta = c( 0.8945724, 0.9522836, 0.8962094), 
              Pi = c( 0.2703707, 0.1939561, 0.5356732), B = 17.94867)
# }

Run the code above in your browser using DataLab