[R] [UPDATE] grofit issues with replicates - probit or logit or glmm
Marcelo Laia
marcelolaia at gmail.com
Thu Feb 12 11:27:46 CET 2015
I done a mistake when I paste the script in the message. An update:
url.csv <-
https://dl.dropboxusercontent.com/u/34009642/cepajabo07_wide_acumulado.csv
data02 <- read.table(url.csv, header=TRUE, sep="\t", dec=",")
head(data02)
timepoints <- 1:5 # 5 days
time <- t(matrix(rep(timepoints, 120), c(5, 120)))
# 5 days and 120 experimentos
# (6 iso * 4 doses
# * 5 rep)
time
MyOpt1 <- grofit.control(smooth.gc = 0.5, parameter = 28,
interactive = FALSE)
MyOpt2 <- grofit.control(smooth.gc = 0.5, parameter = 28,
interactive = FALSE, log.x.dr = TRUE)
TestRun1 <- grofit(time, data02, TRUE, MyOpt1)
TestRun2 <- grofit(time, data02, TRUE, MyOpt2)
TestRun1$drFit
TestRun2$drFit
colData <- c("black", "cyan", "magenta", "blue")
plot(TestRun1$gcFit, opt = "s", colData = colData, colSpline = 1,
pch = 1:4, cex = 1)
plot(TestRun2$gcFit, opt = "s", colData = colData, colSpline = 1,
pch = 1:4, cex = 1)
plot(TestRun1$drFit$drFittedSplines[[1]], colData = colData,
pch = 1:4, cex = 1)
plot(TestRun2$drFit$drFittedSplines[[1]], colData = colData,
pch = 1:4, cex = 1)
Thank you very much!
Marcelo
On 12/02/15 at 12:57am, Marcelo Laia wrote:
> Hello
>
> I tried use grofit package in our data set. We provide a subset of our
> data with X iso, and 4 doses, and insect died was count each day for
> long 5 days. We started with Y insects per dishes. When one is dead, it
> was counted and removed. Died insect is cumulative in the next days.
> i.e. day 1 died 1. day 2 no died, so, day 2 is assigned 1 died (from day
> 1).
>
> Here is the script:
>
> library(lattice)
> library(grofit)
> library(repmis)
>
> url.csv <- https://dl.dropboxusercontent.com/u/34009642/cepajabo07_wide_acumulado.csv
>
> data02 <- read.table(url.csv, header=TRUE, sep="\t", dec=",")
>
> head(data02)
>
> timepoints <- 1:5 # 5 days
> time <- t(matrix(rep(timepoints, 120), c(5, 120))) # 5 days and 120 experiments
> # (6 iso * 4 doses
> # * 5 rep)
> time
>
> TestRun1$drFit
> TestRun2$drFit
>
> colData <- c("black", "cyan", "magenta", "blue")
>
> plot(TestRun1$gcFit, opt = "s", colData = colData, colSpline = 1,
> pch = 1:4, cex = 1)
>
> plot(TestRun2$gcFit, opt = "s", colData = colData, colSpline = 1,
> pch = 1:4, cex = 1)
>
> plot(TestRun1$drFit$drFittedSplines[[1]], colData = colData,
> pch = 1:4, cex = 1)
>
> plot(TestRun2$drFit$drFittedSplines[[1]], colData = colData,
> pch = 1:4, cex = 1)
>
> The problem: grofit didn't deal with replicates and do a curve for each
> ones.
>
> Is it a way to get response curve with the replicates?
>
> We are interested in LD50, and dose response curve, and graphs.
>
> Any suggestion is very welcome!
>
> Thank you!
>
> --
> Marcelo
>
--
More information about the R-help
mailing list