Re: [R] Estimating parameters of 2 phase Coxian using optim

2007-03-08 Thread Laura Hill
On 7/3/07 00:15, Gad Abraham [EMAIL PROTECTED] wrote: Andy Fugard wrote: Hi There, Perhaps the problem is the line loglik-log(p %*% expm(Q * y(i)) %*% q) You mention that y is a vector but here you're treating it as a function. Maybe try loglik-log(p %*%

Re: [R] Estimating parameters of 2 phase Coxian using optim

2007-03-08 Thread Gad Abraham
Laura Hill wrote: On 7/3/07 00:15, Gad Abraham [EMAIL PROTECTED] wrote: Andy Fugard wrote: Hi There, Perhaps the problem is the line loglik-log(p %*% expm(Q * y(i)) %*% q) You mention that y is a vector but here you're treating it as a function. Maybe try

Re: [R] Estimating parameters of 2 phase Coxian using optim

2007-03-06 Thread Andy Fugard
Hi There, Perhaps the problem is the line loglik-log(p %*% expm(Q * y(i)) %*% q) You mention that y is a vector but here you're treating it as a function. Maybe try loglik-log(p %*% expm(Q * y[i]) %*% q) ? Don't have a clue about the correctness of the contents of

Re: [R] Estimating parameters of 2 phase Coxian using optim

2007-03-06 Thread Gad Abraham
Andy Fugard wrote: Hi There, Perhaps the problem is the line loglik-log(p %*% expm(Q * y(i)) %*% q) You mention that y is a vector but here you're treating it as a function. Maybe try loglik-log(p %*% expm(Q * y[i]) %*% q) ? Don't have a clue about the