-1
$\begingroup$

At the moment I'm using linear regression of 4 series with:

mod <- lm(x ~ y + z + v + 0) # I need zero intercept

I'm using the linear regression to calculate the coefficients of y, z and v to predict the x value.

Is there something more accurate then lm? For example, I heard about orthogonal regression; could it be good?

$\endgroup$
  • $\begingroup$ How do you measure accuracy of your current model? In general this question is unanswerable without knowing details about what you are trying to model. If the true model is linear, then linear regression will be the most accurate, for appropriate definition of what is accurate. $\endgroup$ – mpiktas Jul 29 '11 at 9:07
  • $\begingroup$ @mpiktas Those vectors (x, y, z, v) are stocks. I mean... historical prices of 4 differents stocks. Example 4 stocks on nasdaq, 4 stocks on nyse etc etc. $\endgroup$ – Dail Jul 29 '11 at 9:11
  • 7
    $\begingroup$ I'm a bit skeptical when I hear "stock prices" and "accuracy" in the same sentence. Stock price prediction is the deep, dark morass of statistics, and I'm not sure that anything in the market can be considered linear. $\endgroup$ – Wayne Jul 29 '11 at 12:11
  • 2
    $\begingroup$ @Dail Your accounts were merged once again (Thanks @Gavin!). Please don't create new accounts each time you ask a question, but use this registered one instead. $\endgroup$ – chl Jul 29 '11 at 12:28
  • 3
    $\begingroup$ @Dail Please focus more at reading answers than asking the same question again and again. Total least squares is not a magic wand that will make linear regression a universal, robust model -- you should first try to identify why lm is not satisfying (outliers? nonlinear dependence? leverage?) and then try to select appropriate solution. $\endgroup$ – user88 Jul 31 '11 at 14:54
9
$\begingroup$

More "accurate" depends on

  1. What you define as accurate (for example the technique that will give you the closest predicted to the actual observed values) and

  2. The nature of your data.

Linear regression for example is most accurate when the nature of the phenomenon you study is indeed linear. If not other techniques might prove more useful.

If you are only interested in prediction I would recommend Machine Learning techniques like Random Forest or Support Vector Machines to you:

http://cran.r-project.org/web/views/MachineLearning.html.

Considering that your data is financial the financial task view on CRAN might also be a good starting point:

http://cran.r-project.org/web/views/Finance.html.

$\endgroup$
  • $\begingroup$ Another key topic here is overfitting. By using fancy, flexible methods, you can get your regression line to go exactly through all of your data, 100% accurate... but of course useless for understanding or predicting. I remember one fellow in a machine learning class I took, who wanted his electricity usage predictions to be "accurate" and he was convinced it just boiled down to using a sophisticated-enough methodology. $\endgroup$ – Wayne Jul 29 '11 at 12:14
  • $\begingroup$ Thank you for a clear, thoughtful reply, @Johannes, and welcome to our site! $\endgroup$ – whuber Jul 29 '11 at 12:54
  • $\begingroup$ @Wayne Thank you for this comment. Overfitting is indeed always a problem when using Machine Learning techniques. One might even argue that in complex high-dimensional settings linear effects are often good enough approximations to reality and prefereble to more complex approaches because they are more easily interpreted. $\endgroup$ – Johannes Jul 29 '11 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.