Learn R Programming

bclust (version 1.5)

meancss: computes statistics necessary for the evaluation of the log likelihood

Description

The function is useful for deriving arguments of the loglikelihood function.

Usage

meancss(x,rep.id=1:nrow(x))

Arguments

x
The data matrix, subjects in rows, variables in columns.
rep.id
A vector of positive integers refering to replication of the types. The same integer is associated to the the replicates of the same type. Not specifying this vector preproposes that the data are unreplicated.

Value

mean
The mean of types.
css
The corrected sum of squares of types.
repno
The vector containing the number of replications of types according to rep.id.

Details

This function facilitates the usage of the loglikelihood function.

See Also

loglikelihood.

Examples

Run this code
data(gaelle)
gaelle.id<-rep(1:14,c(3,rep(4,13))) 
# first 3 rows replication of ColWT, 4 for the rest
mc.gaelle<-meancss(gaelle,gaelle.id)
loglikelihood(x.mean=mc.gaelle$mean,x.css=mc.gaelle$css,
repno=mc.gaelle$repno,transformed.par=rep(0,6)) 
# evalutes likelihood at rep(0,6)

Run the code above in your browser using DataLab