File: order.Rout.save

package info (click to toggle)
r-cran-bbmle 1.0.18-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,192 kB
  • ctags: 8
  • sloc: sh: 50; makefile: 35
file content (58 lines) | stat: -rwxr-xr-x 2,181 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58

R Under development (unstable) (2012-07-27 r60013) -- "Unsuffered Consequences"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i686-pc-linux-gnu (32-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> set.seed(1001)
> x <- runif(10)
> y <- 1000+x+rnorm(10,sd=0.1)
> d <- data.frame(x,y)
> 
> library(bbmle)
> ## warning
> m1 = mle2(y~dnorm(a+b*x,sd=exp(s)),start=list(a=900,b=1,s=log(0.1)),
+   control=list(parscale=c(1000,1,0.1)),data=d)
Warning message:
In fix_order(call$control$parscale, "parscale") :
  parscale not named: rearranging to match 'start'
> 
> m2 = mle2(y~dnorm(a+b*x,sd=exp(s)),start=list(a=900,b=1,s=log(0.1)),
+   control=list(parscale=c(b=1,a=1000,s=0.1)),data=d)
> 
> m3 = mle2(y~dnorm(a+b*x,sd=exp(s)),start=list(a=1,b=1,s=log(0.1)),
+   method="L-BFGS-B",lower=c(a=1100,b=2,s=-Inf),data=d)
Warning message:
In mle2(y ~ dnorm(a + b * x, sd = exp(s)), start = list(a = 1, b = 1,  :
  some parameters are on the boundary: variance-covariance calculations based on Hessian may be unreliable
> 
> ## warning
> m4 = mle2(y~dnorm(a+b*x,sd=exp(s)),start=list(b=1,a=1200,s=log(0.1)),
+   method="L-BFGS-B",lower=c(2,1100,0.1),data=d)
Warning messages:
1: In fix_order(call$lower, "lower bounds", -Inf) :
  lower bounds not named: rearranging to match 'start'
2: In mle2(y ~ dnorm(a + b * x, sd = exp(s)), start = list(b = 1, a = 1200,  :
  some parameters are on the boundary: variance-covariance calculations based on Hessian may be unreliable
> 
> c1 = coef(m3)[c("a","b","s")]
> c2 = coef(m4)[c("a","b","s")]
> if (!all(abs(c1-c2)<1e-7)) stop("mismatch")
> 
> proc.time()
   user  system elapsed 
  1.012   1.024   1.896