Dear All, Is it possible to perform OLS using C code? I am trying to optimize a n-period "moving window" OLS on a huge dataset hence was wondering if such a thing is possible. Ideally the solution that I am looking for would involve a C-code accepting two float arrays and returning back computed parameters such as t-stat, coefficient etc. I have glanced thru the FAQ's and tried to google this information but wasn't able to find anything truly relevant, hence would really appreciate your help on this one. Thanks. Manoj
I have found "Numerical Recipes in C" to be extremely
helpful in my statistical studies. OLS is described
in detail in this book.
Best,
Greg
--- Manoj - Hachibushu Capital <Wanzare at HCJP.com>
wrote:
> Dear All,
> Is it possible to perform OLS using C code? I am
> trying to
> optimize a n-period "moving window" OLS on a huge
> dataset hence was
> wondering if such a thing is possible.
>
> Ideally the solution that I am looking for would
> involve a
> C-code accepting two float arrays and returning back
> computed parameters
> such as t-stat, coefficient etc.
>
> I have glanced thru the FAQ's and tried to google
> this
> information but wasn't able to find anything truly
> relevant, hence would
> really appreciate your help on this one.
>
>
> Thanks.
>
> Manoj
>
> ______________________________________________
> R-help at 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
>
> Is it possible to perform OLS using C code? I am trying to > optimize a n-period "moving window" OLS on a huge dataset hence was > wondering if such a thing is possible. > > Ideally the solution that I am looking for would involve a > C-code accepting two float arrays and returning back computed > parameters > such as t-stat, coefficient etc.It is probably not worth trying to call R to do OLS from C. I would look at GSL: http://www.gnu.org/software/gsl/manual/gsl-ref_toc.html GSL has a simple but elegant C interface for doing OLS and weighted least squares. It will give you the covariance matrix of the model parameters, from which you can derive t-stats. Jim M