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.normal

Function Description: minum.normal

The likelihood function for use by fitnorm.

Function Arguments:

ArgumentDefault Value
param
x
y

Function Source:

minum.normal=function(param,x,y)
{
m=param[1]
s=param[2]
k=param[3]
SD=param[4]

if(SD<=0 | s<=0) return(-Inf)

pred=k*dnorm(x,mean=m,sd=s)
llike=dnorm(y,mean=pred,sd=SD,log=TRUE)

return(sum(llike))
}