[R] expm() within the Matrix package

2007-03-15 Thread Laura Hill
Hi Could anybody give me a bit of advice on some code I'm having trouble with? I've been trying to calculate the loglikelihood of a function iterated over a data of time values and I seem to be experiencing difficulty when I use the function expm(). Here's an example of what I am trying to do

[R] multiplying matrix by vector of times

2007-03-13 Thread Laura Hill
On 8/3/07 22:12, Gad Abraham [EMAIL PROTECTED] wrote: Laura Hill wrote: On 7/3/07 00:15, Gad Abraham [EMAIL PROTECTED] wrote: On 6 Mar 2007, at 08:54, Laura Hill wrote: Hi, My name is Laura. I'm a PhD student at Queen's University Belfast and have just started learning R. I

[R] multiplying matrix by vector of times

2007-03-13 Thread Laura Hill
On 8/3/07 22:12, Gad Abraham [EMAIL PROTECTED] wrote: Laura Hill wrote: On 7/3/07 00:15, Gad Abraham [EMAIL PROTECTED] wrote: On 6 Mar 2007, at 08:54, Laura Hill wrote: Hi, My name is Laura. I'm a PhD student at Queen's University Belfast and have just started learning R. I

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

2007-03-08 Thread Laura Hill
(Q * y[i]) %*% q) ? Don't have a clue about the correctness of the contents of cox2.lik... Andy On 6 Mar 2007, at 08:54, Laura Hill wrote: Hi, My name is Laura. I'm a PhD student at Queen's University Belfast and have just started learning R. I was wondering if somebody could

[R] Estimating parameters of 2 phase Coxian using optim

2007-03-06 Thread Laura Hill
Hi, My name is Laura. I'm a PhD student at Queen's University Belfast and have just started learning R. I was wondering if somebody could help me to see where I am going wrong in my code for estimating the parameters [mu1, mu2, lambda1] of a 2-phase Coxian Distribution.

[R] Estimating parameters of 2 phase Coxian using optim

2007-03-06 Thread Laura Hill
Hi, My name is Laura. I'm a PhD student at Queen's University Belfast and have just started learning R. I was wondering if somebody could help me to see where I am going wrong in my code for estimating the parameters [mu1, mu2, lambda1] of a 2-phase Coxian Distribution. cox2.lik-function(theta,

[R] expm()

2007-03-06 Thread Laura Hill
Can the expm function be used to calculate the exponential of a matrix where the matrix is multiplied by a vector in a data frame? For example for (i in 1:length(y)){ expmN-expm(Q*y[i]) Q-Matrix(c(1, 2, 3, 4), 2, 2) return(expmN) } Sorry I am new to R and I have been