s-news
[Top] [All Lists]

NLME question

To: s-news@lists.biostat.wustl.edu
Subject: NLME question
From: Darren Shaw <Darren.Shaw@ed.ac.uk>
Date: Fri, 23 Jan 2004 11:08:16 +0000
Dear Splus users

I have a problem related to the use of NLME (and given how busy Messieurs Bates and Pinheiro are I thought I would try the wider Splus community)

I think is simply a matter of getting the nlme coding correct, but i cannot get my brain around it

I am analysing some 24 growth curves of some cells , and i wanted to say that there are significant differences between the curves in two parameters that describe the pattern of growth. these parameters are from a logistic (r & k) . i have attempted to construct a self starting routine for nlme ie:

SSGrowth_function(x, r, k)
{
        .expr2 <- (k - 100000)/100000
        .expr5 <- exp(((r * -1) * x))
        .expr7 <- 1 + (.expr2 * .expr5)
        .expr13 <- .expr7^2
        .value <- k/.expr7
        .actualArgs <- match.call()[c("r", "k")]
        if(all(unlist(lapply(as.list(.actualArgs), is.name)))) {
.grad <- array(0, c(length(.value), 2), list(NULL, c("r", "k"))) .grad[, "r"] <- - ((k * (.expr2 * (.expr5 * (-1 * x))))/.expr13)
                .grad[, "k"] <- (1/.expr7) - ((k * (1e-005 * .expr5))/.expr13)
                dimnames(.grad) <- list(NULL, .actualArgs)
                attr(.value, "gradient") <- .grad
        }
        .value
}

where x = time, 100000 = known starting conditions, r = growth and k = carrying capacity

using the nomenclature Jose Pinheiro gives as an example then i guessed i should write

nlme(NoofCells~SSGrowth(Time,r,k),fixed=r+k~1,data=CellData,random=r+k~1)


So this I think I have understood and have got right! (and it runs and tells me that r & k's do differ)

BUT. The "CellData" actually consists of replicates - ie there are 4 cell types, but they are done 6 times each. Therefore, I do not want to ask if there is significant differences in r & k between 24 sets of data ("Runs")- rather I want to be able to say that there are differences between the four cell types occurring 6 times each. So how do i incorporate "CellType" explicitly into my model structure??

i.e. If i was lust looking at say linear growth and was using lme i would have written

lme(NoofCells~Time*CellType,random=~1|Runs,data=CellData)


any thoughts very gratefully received

Darren Shaw
-----------------------------------------------------------------

Dr Darren J Shaw
Centre for Tropical Veterinary Medicine (CTVM)
The University of Edinburgh
-----------------------------------------------------------------


<Prev in Thread] Current Thread [Next in Thread>
  • NLME question, Darren Shaw <=