How to get best fitting model decision for data X and Y?

Hello everybody.
I have two sources of data, X and Y, which are basically counts, from 23 individual origins (3D ROIs in my case).
For example:
X_1 [1x2591 double] Y_1 [1x2591 double]
X_2 [1x839 double] Y_2 [1x839 double]
... ...
X_23 [1x3527 double] Y_23 [1x3527 double]
Now I want to know how these two data-sources correlate, so e.g. which of these ROIs show a linear relationship in X and Y, which a exponential/logarithmic/... relationship.
So I want to fit different models to X and Y for each ROI and get a decision, which model fits best.
I still struggle to get this working as I am unsure whats the best way to go and how to get this implemented. I think a Bayesian Model Selection approach would be suitable but couldn't find a good example of how to implement that. Furthermore, I am not quite sure if BMS would be the best way to go or if I should try another approach.
So I hope that somebody of you can give me information on how to get this question of 'type of relationship' solved.
Thanks a lot!

5 commentaires

nobody has a hint?
Without some representative samples of your data, it’s difficult to provide any real guidance. We prefer not to guess.
Foncl Brsch
Foncl Brsch le 21 Juin 2016
Modifié(e) : Foncl Brsch le 21 Juin 2016
Sorry, I thought there is a general approach to this problem but I didn't make the point as I tried to.
So e.g. some of my sample data look like that:
What I want to achieve is a 'decision' what's the underlying relationship of the data X and Y in each ROI. I already fitted a linear, exponential and power model to the data and got the GOF data for each. But I read that R^2 isn't as suitable as I thought, so I am looking for a more valid approach like e.g. Bayes Model Selection or similar.
Or maybe something like http://alumni.media.mit.edu/~tpminka/statlearn/demo/ at 'Polynomial fitting'. But I don't know how to get the likelihood and evidence plots as shown in his example.
Thanks a lot!
This question is still open and I am desperate to get this solved. Maybe anyone of you has just a hint to show a certain direction to look for?
That would be awesome, thanks a lot!!
Marc
Marc le 25 Juin 2016
Looks like you have a lot of data but what are you trying to discern?
Is something changing in each plot?
If so, try and pull out those changes as inputs and use the information from the fits/correlations as your outputs.
Kind of like a DOE. Then you may be able to use a linear model approach to see if any of these variables or changes are significant.
I don't think you have explained the physical problem well enough for me to help.
Otherwise, the curve fitting toolbox has a really nice tool for checking correlations.

Connectez-vous pour commenter.

Réponses (1)

Kiran Prasad
Kiran Prasad le 24 Juin 2016

0 votes

My guess would be to try either polyfit or glmfit. Even the fit function might help. To me it looks as though what you need is a 3rd variable. From my mathematics experience (which is more than my matlab experience) I would assume a 3rd intrinsic variable that would allow for a much more accurate surface fit.
Hope this is of some help, Kiran

Commenté :

le 25 Juin 2016

Community Treasure Hunt

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

Start Hunting!

Translated by