How to do the equivalent of Excel linest function?

18 visualizzazioni (ultimi 30 giorni)
Tom Graney
Tom Graney il 13 Ago 2017
Commentato: Tom Graney il 14 Ago 2017
I have been solving these problems using Excel linest for years, but I want to solve problems that are too large for Excel. Something on the order of 200 independent variables (predictors) and 5000 observations. I've looked at some of the examples and tried to follow the help, but as with all programming, unless you do it exactly right you get nothing. I need a little guidance to build my first model. Once I have the coefficients, I will move them to another environment for further evaluation. The predictors are financial market technicals. The observations are hypothetical profit or loss.
Thanks for any assistance. I can load my data (csv file) into a workspace and then to the command window, but when I open the curvefit toolbox, I can get no further.

Risposte (1)

Walter Roberson
Walter Roberson il 14 Ago 2017
  1 Commento
Tom Graney
Tom Graney il 14 Ago 2017
This is what I have found with internet search: 1)Put my data in an Excel file, naming the columns with the independent and dependent variable names. 2) In the command window: MyTable = readtable("filespec") 3) In the command window: MyModel = fitlm(MyTable)
Presto, I have my answer. Thanks MatLab.

Accedi per commentare.

Categorie

Scopri di più su Data Import from MATLAB in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by