Finding Weighted Coefficients of Variables
Afficher commentaires plus anciens
I have a data set of 15 experiments, which are separated into 11 columns (15x11 matrix). There are 10 variables (10 columns) that I would like to analyze to see how they play a role in the 11th column (the result). What method or option would be the best route for this analysis?
Thanks!
Réponses (1)
Star Strider
le 11 Juil 2017
It depends what your experiment is and if you have a mathematical model of the process that produced your data. If you do and the process is nonlinear, then use a nonlinear function fit with a nonlinear regression function (such as nlinfit and lsqcurvefit) to get the parameter estimates and then confidence intervals for them (with nlparci). You can also use fitnlm for nonlinear models, and fitlm for linear models.
If your process can be modeled by a linear regression, this could work:
A = Your_Matrix; % Create Data
[b,bint] = regress(A(:,11), A(:,1:10)); % Return Parameter Estimates & Confidence Intervals
Coefficients (here the ‘b’ vector, but it applies to all regressions) with confidence intervals that include zero (have opposite signs) are not needed in the model.
5 commentaires
Star Strider
le 11 Juil 2017
Kevin Hout’s ‘Answer’ moved here:
We did not have a mathematical model to generate our data, but we are trying to find the variables that have the most significant impact on the results in hopes of finding a predictor. My original thought was to use a PCA or MFA. Thank you for your help!
Star Strider
le 11 Juil 2017
My pleasure.
Kevin Hout
le 11 Juil 2017
Image Analyst
le 11 Juil 2017
I think PCA could work. Here's what the help says:
Partial Least Squares Regression and Principal Components Regression
This example shows how to apply Partial Least Squares Regression (PLSR) and Principal Components Regression (PCR), and discusses the effectiveness of the two methods. PLSR and PCR are both methods to model a response variable when there are a large number of predictor variables, and those predictors are highly correlated or even collinear. Both methods construct new predictor variables, known as components, as linear combinations of the original predictor variables, but they construct those components in different ways. PCR creates components to explain the observed variability in the predictor variables, without considering the response variable at all. On the other hand, PLSR does take the response variable into account, and therefore often leads to models that are able to fit the response variable with fewer components. Whether or not that ultimately translates into a more parsimonious model, in terms of its practical use, depends on the context.
There is a demo included in the help.
Star Strider
le 11 Juil 2017
Thank you, Image Analyst!
Catégories
En savoir plus sur Linear Regression dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!