11
2- R Under development (unstable) (2016-12-05 r71733 ) -- "Unsuffered Consequences"
3- Copyright (C) 2016 The R Foundation for Statistical Computing
2+ R Under development (unstable) (2017-10-27 r73634 ) -- "Unsuffered Consequences"
3+ Copyright (C) 2017 The R Foundation for Statistical Computing
44Platform: x86_64-pc-linux-gnu (64-bit)
55
66R is free software and comes with ABSOLUTELY NO WARRANTY.
@@ -17,6 +17,8 @@ Type 'demo()' for some demos, 'help()' for on-line help, or
1717'help.start()' for an HTML browser interface to help.
1818Type 'q()' to quit R.
1919
20+ [Previously saved workspace restored]
21+
2022> library(bbmle)
2123Loading required package: stats4
2224>
@@ -39,6 +41,18 @@ m1 0 1
3941> stopifnot(any(!is.na(aa$dAIC)),
4042+ any(!is.na(aa$weight)))
4143>
44+ > set.seed(101)
45+ > x <- rnorm(100)
46+ > dd <- data.frame(y=rnorm(100,2+3*x,sd=1),x)
47+ > m4A <- lm(y~x,dd)
48+ > m4B <- mle2(y~dnorm(mean=a+b*x,sd=exp(logsd)),
49+ + data=dd,
50+ + start=list(a=1,b=1,logsd=0))
51+ > ## cosmetic differences only
52+ > stopifnot(all.equal(AIC(m4A,m4B)[,"AIC"],
53+ + AIC(m4B,m4A)[,"AIC"]))
54+ >
55+ >
4256> proc.time()
4357 user system elapsed
44- 1.140 0.212 1.648
58+ 1.920 0.208 2.679
0 commit comments