How to do the equivalent of Excel linest function?

18 visualizaciones (últimos 30 días)
Tom Graney
Tom Graney el 13 de Ag. de 2017
Comentada: Tom Graney el 14 de Ag. de 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.

Respuestas (1)

Walter Roberson
Walter Roberson el 14 de Ag. de 2017
  1 comentario
Tom Graney
Tom Graney el 14 de Ag. de 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.

Iniciar sesión para comentar.

Categorías

Más información sobre Data Import from MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by