cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Multi-variable correlation

AshehadAl
1-Newbie

Multi-variable correlation

Hi All,

Is it possible to do multi-variable correlation in MathCAD? I have got 8 variables. See the attached file.

Cheers,

Ashehad

4 REPLIES 4

Because all your variables are x.1, ...multivariate correlation is just bivariate correlation to extended to more than two variables, and for all pair-wise combinations of the variables, measuring the simple bivariate correlation. Are you looking for a linear regression? Simply regress the data in pairs and look at all the combos. You will gen correlation coefs which you can then evaluate for yourself.

I've never used regress and interp, so I don't know what values are returned in the vector from regress. I don't think that it is specified in Help. Writing your regression in code is fairly straightforward, but this may be of some value to you wrt regress ()

For regress, the first three components of the output vector are vr0=3 (a code telling interp that vr is the output of regress as opposed to a spline function or loess), vr1=3 (the index within vr where the polynomial coefficients begin), and vr2=n (the order of the fit). The remaining n + 1 components are the coefficients of the fitting polynomial from the lowest degree term to the highest degree term. Unfortunately, this still doesn't get you the correlation coefs.

OTOH, (Oops) I just looked in the (M15) Help > Quicksheets > Data Analysis > Mulit Regression, and there is help for that ...

~R~

Hi Rich,

I have done linear regression first (pair-wise) and have looked at the correlations. It turns out that "x4" can be regressed in terms of other 7 variables. So I would like to express "x4" in terms of other 7 variables.

Cheers,

Ashehad

A simple linear regression, ignoring all interaction terms, will look like x4 = c0 + c1.x1 + c2.x2 + c3.x3 + c4.x5 + c5.x6 + c6.x7 + c7.x8

There are 8 unknown constants (c0 to c7) to be fitted here, but you only have 7 values of x4.

Either you need to get at least one more data set, or you need to specify a different relationship among the variables that involves no more than 7 unknowns.

Alan

Thanks Alan!

Cheers,

Ashehad

Top Tags