Topic: Utilities

Topic Description:

Basic R utilities used in many packages and functions, such as date and string manipulations, statistical distributions, geometry of lines and distances. The R package date is required for the two data functions.



File: utilities/distributions.r

View File Source Download File No help file available

Function: minum.mixnorm

Function Description: minum.mixnorm

Fit a mixture of 2 normals.

Function Arguments:

ArgumentDefault Value
param
data

Function Source:

minum.mixnorm=function(param,data)
{
mean1=param[1]
mean2=param[2]
sd1=param[3]
sd2=param[4]
f=param[5]

llike=dmixnorm(data,mean1=mean1,mean2=mean2,sd1=sd1,sd2=sd2,f=f,log=TRUE)
return(sum(llike))
}