[R] How to get the minimum ?

From: Philippe Lamy <plamy_at_daimi.au.dk>
Date: Thu 07 Jul 2005 - 19:37:15 EST


I have a model with differents observations Xi. Each observation belongs to a group, either A or B. I would like to minimize a fonction like :

sum( Xi - Z)^2 + sum (Xi - aZ -b)^2

 A                B

The first sum contains all observations from group A and the second all observations from group B.
I want to find the Z-value wich minimize this function. a and b are predefined parameters.

Thanks for help.


R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jul 07 19:45:53 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:19 EST