I am relatively new to R, but I would like to use it find the values of b1 and
b2 that maximize the following equation:
(sum(cos(x3+2.33474-2(atan(b1*x1+b2*x2)
Any help would be greatly appreciated.
__
[EMAIL PROTECTED] mailing list
optim?
Josh Schmidt wrote:
I am relatively new to R, but I would like to use it find the values of b1 and
b2 that maximize the following equation:
(sum(cos(x3+2.33474-2(atan(b1*x1+b2*x2)
Any help would be greatly appreciated.
__
[EMAIL
Josh Schmidt wrote:
I am relatively new to R, but I would like to use it find the values of b1 and
b2 that maximize the following equation:
(sum(cos(x3+2.33474-2(atan(b1*x1+b2*x2)
Any help would be greatly appreciated.
Given b1 and b2 are scalars (we are minimizing f, hence
I tried:
f-function(b,x)-sum(cos(x1+2.33474-2*(atan(b[1]*x2+b[2]*x3
optim(c(0, 0), f, x1=x1, x2=x2, x3=x3)
and got this error.
Error in fn(par, ...) : unused argument(s) (x1 ...)
I am trying to solve for the circular-linear regression equation in Fisher
(1993).
= Original Message
Josh Schmidt wrote:
I tried:
f-function(b,x)-sum(cos(x1+2.33474-2*(atan(b[1]*x2+b[2]*x3
optim(c(0, 0), f, x1=x1, x2=x2, x3=x3)
Sorry, should have been:
f - function(b, x1, x2, x3){
-sum(cos(x1+2.33474-2*(atan(b[1]*x2+b[2]*x3
}
optim(c(0, 0), f, x1=x1, x2=x2, x3=x3)
Uwe Ligges