[Lme4-commits] r1524 - branches/roxygen/tests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Jan 26 22:54:48 CET 2012
Author: dmbates
Date: 2012-01-26 22:54:48 +0100 (Thu, 26 Jan 2012)
New Revision: 1524
Modified:
branches/roxygen/tests/nlmer-conv.R
branches/roxygen/tests/nlmer.R
Log:
Change the formulas in nlmer to the reduced form. These files are now redundant tests. Should remove one.
Modified: branches/roxygen/tests/nlmer-conv.R
===================================================================
--- branches/roxygen/tests/nlmer-conv.R 2012-01-26 21:53:02 UTC (rev 1523)
+++ branches/roxygen/tests/nlmer-conv.R 2012-01-26 21:54:48 UTC (rev 1524)
@@ -5,19 +5,15 @@
## 'Theoph' Data modeling
-Th.start <- c(lKe = -2.5, lKa = 0.5, lCl = -3)
+Th.start <- c(lKe=-2.5, lKa=0.5, lCl=-3)
-(nm2 <- nlmer(conc ~ SSfol(Dose, Time,lKe, lKa, lCl) ~
- 0+lKe+lKa+lCl+(0+lKe+lKa+lCl|Subject),
- Theoph, start = Th.start, control=list(maxfun=100000L)))
+(nm2 <- nlmer(conc ~ SSfol(Dose, Time,lKe, lKa, lCl) ~ lKe+lKa+lCl|Subject,
+ Theoph, start = Th.start))
(nm3 <- nlmer(conc ~ SSfol(Dose, Time,lKe, lKa, lCl) ~
- 0+lKe+lKa+lCl+(0+lKe|Subject)+(0+lKa|Subject)
- +(0+lCl|Subject),
- Theoph, start = Th.start, control=list(maxfun=100000L)))
+ (lKe|Subject)+(lKa|Subject)+(lCl|Subject),
+ Theoph, start = Th.start))
## dropping lKe from random effects:
-(nm4 <- nlmer(conc ~ SSfol(Dose, Time,lKe, lKa, lCl) ~
- 0+lKe+lKa+lCl+(0+lKa+lCl|Subject),
- Theoph, start = Th.start, control=list(maxfun=100000L)))
-(nm5 <- nlmer(conc ~ SSfol(Dose, Time,lKe, lKa, lCl) ~
- 0+lKe+lKa+lCl+(0+lKa|Subject)+(0+lCl|Subject),
- Theoph, start = Th.start, control=list(maxfun=100000L)))
+(nm4 <- nlmer(conc ~ SSfol(Dose, Time,lKe, lKa, lCl) ~lKa+lCl|Subject,
+ Theoph, start = Th.start, tolPwrss=1e-8))
+(nm5 <- nlmer(conc ~ SSfol(Dose, Time,lKe, lKa, lCl) ~(lKa|Subject)+(lCl|Subject),
+ Theoph, start = Th.start))
Modified: branches/roxygen/tests/nlmer.R
===================================================================
--- branches/roxygen/tests/nlmer.R 2012-01-26 21:53:02 UTC (rev 1523)
+++ branches/roxygen/tests/nlmer.R 2012-01-26 21:54:48 UTC (rev 1524)
@@ -3,48 +3,39 @@
allEQ <- function(x,y, tolerance = 4e-4, ...)
all.equal.numeric(x,y, tolerance=tolerance, ...)
-(nm1 <- nlmer(circumference ~ SSlogis(age, Asym, xmid, scal) ~
- 0 + Asym + xmid + scal + (0 + Asym|Tree),
- Orange,
- start = c(Asym = 200, xmid = 725, scal = 350)))
+(nm1 <- nlmer(circumference ~ SSlogis(age, Asym, xmid, scal) ~ (Asym|Tree),
+ Orange, start = c(Asym = 200, xmid = 725, scal = 350)))
fixef(nm1)
## 'Theoph' Data modeling
Th.start <- c(lKe = -2.5, lKa = 0.5, lCl = -3)
system.time(nm2 <- nlmer(conc ~ SSfol(Dose, Time,lKe, lKa, lCl) ~
- 0 + lKe + lKa + lCl +
- (0 + lKe+lKa+lCl|Subject),
+ (lKe+lKa+lCl|Subject),
Theoph, start = Th.start, tolPwrss=1e-8))
print(nm2, corr=FALSE)
system.time(nm3 <- nlmer(conc ~ SSfol(Dose, Time,lKe, lKa, lCl) ~
- 0 + lKe + lKa + lCl + (0 + lKe|Subject) +
- (0 + lKa|Subject) + (0 + lCl|Subject),
- Theoph, start = Th.start))
+ (lKe|Subject) + (lKa|Subject) + (lCl|Subject),
+ Theoph, start = Th.start))
print(nm3, corr=FALSE)
## dropping lKe from random effects:
-system.time(nm4 <- nlmer(conc ~ SSfol(Dose, Time,lKe, lKa, lCl) ~
- 0 + lKe + lKa + lCl + (0+lKa+lCl|Subject),
+system.time(nm4 <- nlmer(conc ~ SSfol(Dose, Time,lKe, lKa, lCl) ~ (lKa+lCl|Subject),
Theoph, start = Th.start, tolPwrss=1e-8))
print(nm4, corr=FALSE)
system.time(nm5 <- nlmer(conc ~ SSfol(Dose, Time,lKe, lKa, lCl) ~
- 0 +lKe + lKa + lCl + (0 + lKa|Subject) +
- (0 + lCl|Subject), Theoph,
- start = Th.start))
+ (lKa|Subject) + (lCl|Subject),
+ Theoph,
+ start = Th.start, tolPwrss=1e-8))
print(nm5, corr=FALSE)
if (require("PKPDmodels")) {
oral1cptSdlkalVlCl <-
PKmod("oral", "sd", list(ka ~ exp(lka), k ~ exp(lCl)/V, V ~ exp(lV)))
system.time(nm2a <- nlmer(conc ~ oral1cptSdlkalVlCl(Dose, Time, lV, lka, lCl) ~
- 0 + lV + lka + lCl + (0 + lV+lka+lCl|Subject),
- Theoph, start = c(lV=-1, lka=-0.5, lCl=-3), tolPwrss=1e-8))
+ (lV+lka+lCl|Subject),
+ Theoph, start = c(lV=-1, lka=-0.5, lCl=-3), tolPwrss=1e-8))
print(nm2a, corr=FALSE)
}
-
-showProc.time()
-
-
More information about the Lme4-commits
mailing list