Hi there, I have a question here.
I want to fit my data to a biexponential decay model like this :
y = A0*(1-f)*exp(-r1*t) + f*A1*exp(-r2*t) with A1, f, r1, and r2 as my parameter. I want to use treatment effect between group 1 and 0 and in the end i want to see if the difference in the treatment effect is significant or not.
The data looks like this :

Subject Group Day Cell
1 1 0 5000
1 1 1 3000
1 1 2 2500
1 0 0 10000
1 0 1 7600
1 0 2 5000
2 1 0 7000
2 1 1 4000
2 1 2 2000
2 0 0 15000
2 0 1 8000
2 0 2 5000
etc..

So far, I have used nlme library, but there are some problems :
1. Can I do the fitting in log scale instead of biexponential model ?
2. As far as I know, I will ot be able to fit this biexponential model in a log scale, so instead I use weights option in nlme. So, what is the suitable VarFunction and the form for this kind of fitting ?

So far, my code is :
fun<-function(A1,r1,f,r2,day){(1-f)*A1*exp(-r1*day)+f*A1*exp(-r2*day)}

fit <- nlme(cell~fun(A1,lrc1,f,lrc2,day),fixed=list(A1~group,lrc1~group,f~group,lrc2~group),random = pdDiag(A1+lrc1+f+lrc2~1),verbose=TRUE,start = list(fixed=with(svec,c(A1,lrc1,f,lrc2))),data=dat,method='REML',control=a,corr=corCAR1(),weights=varConstPower(form=~fitted(.)|group))

The problem is, when I use form = ~fitted|group, the fit will give you very small random effect...
So, what is the problem here ?

Thank you

	[[alternative HTML version deleted]]

