Re: [R] Help needed please

2012-02-25 Thread R. Michael Weylandt
Look at ?optim and example(optim) Michael On Sat, Feb 25, 2012 at 11:47 AM, Jaymin Shah wrote: > I was wondering how to make a function which minimises  a vector (a,b,c,d). > > I have an equation ( for simplicity) say its 5 -(3a+4b+6c+8d) and i want to > make this equation as small as possible.

Re: [R] Help needed please

2012-02-25 Thread Jaymin Shah
I was wondering how to make a function which minimises a vector (a,b,c,d). I have an equation ( for simplicity) say its 5 -(3a+4b+6c+8d) and i want to make this equation as small as possible. Thus need to find the values for a b c and d for which this happens. I know there is a function in r

Re: [R] Help needed please

2012-02-10 Thread ilai
Your script is rather inefficient with spurious cbind calls. Any particular reason not to use ?ar directly ? Call: ar.yw.default(x = simtimeseries, order.max = 4) Coefficients: 1234 1.9440 -1.9529 0.8450 -0.2154 Order selected 4 sigma^2 estimated as 15.29 To