From polzehl at wias-berlin.de  Fri Oct 10 14:29:15 2003
From: polzehl at wias-berlin.de (polzehl@wias-berlin.de)
Date: Fri Oct 10 14:28:22 2003
Subject: [Rd] incorrect behaviour of formals (PR#4511)
Message-ID: <200310101229.h9ACTF0P024485@pubhealth.ku.dk>

Full_Name: Jrg Polzehl
Version: 1.8.0
OS: Windows XP
Submission from: (NULL) (62.141.176.1)


I encountered a problem when playing with the mle library and specifying
negative
starting values for the parameters. 
The reason seems to be an incorrect behaviour of  function formals:

 glike<-function(a=1,b=1,c=1) a
> formals(glike)
$a
[1] 1
$b
[1] 1
$c
[1] 1
> unlist(formals(glike))
a b c 
1 1 1 
>  glike<-function(a=1,b=1,c= -1) a
> formals(glike)
$a
[1] 1
$b
[1] 1
$c
-1
> unlist(formals(glike))
$a
[1] 1
$b
[1] 1
$c
-1


Regards,

Jrg Polzehl

PS: The same happens in version 1.7.1


[Rd] incorrect behaviour of formals (PR#4511)
polzehl@wias-berlin.de