Re: [R] how to use mle with a defined function

2007-07-09 Thread Lin Pan
Hi all, sorry for the misleading in the previous email. here is my function to calculate the maximum likelihood function for a multinormial distribution: mymle <- function (sigmaX, sigmaY, constraints, env){ # build omega omegaX = abs(sigmaX) * kin + abs(env) * diag(1.0, n, n)

Re: [R] how to use mle with a defined function

2007-07-03 Thread Ben Bolker
Lin Pan yahoo.com> writes: > > > Hi all, > > I am trying to use mle() to find a self-defined function. Here is my > function: > > test <- function(a=0.1, b=0.1, c=0.001, e=0.2){ > > # omega is the known covariance matrix, Y is the response vector, X is the > explanatory matrix > > odet = un

[R] how to use mle with a defined function

2007-07-03 Thread Lin Pan
Hi all, I am trying to use mle() to find a self-defined function. Here is my function: test <- function(a=0.1, b=0.1, c=0.001, e=0.2){ # omega is the known covariance matrix, Y is the response vector, X is the explanatory matrix odet = unlist(determinant(omega))[1] # do cholesky decompositio