On Thu, 1 Oct 2009, Vik wrote:
Thanks Charles, I have been able to change the function and to make it work.
I have also gotten the same results using nlm().
Now the question I have (and that google has not helped on) is which
optimization functions can I use for solving for two distinct variabl
Thanks Charles, I have been able to change the function and to make it work.
I have also gotten the same results using nlm().
Now the question I have (and that google has not helped on) is which
optimization functions can I use for solving for two distinct variables
instead of only one? Thanks aga
On Thu, 1 Oct 2009, Vik wrote:
Hello,
I am trying to figure out how to use optimize() with array variables
as inputs. I have a for loop in the function definition:
SS <- function(int,slo,x,y){
for(i in 1:length(x)) ((int+slo*x[i])-y[i])^2->squares[i]
sum(squares)->>sum_squares
output_txt = c (
Hello,
I am trying to figure out how to use optimize() with array variables
as inputs. I have a for loop in the function definition:
SS <- function(int,slo,x,y){
for(i in 1:length(x)) ((int+slo*x[i])-y[i])^2->squares[i]
sum(squares)->>sum_squares
output_txt = c ("The sum of squares is", sum_squar
4 matches
Mail list logo