Jump to content

Recommended Posts

Posted

Hello everyone

Consider a 10 x 10 table with 10 by 10 variables and in the cells their correlation coefficient. Suppose that I want to select every combinatory set of variables that have a correlation smaller than 0.1. Is there a way in, let's say, Excel, or SPSS, to do this?

E.g., VAR1 has a correlation smaller than 0.1 with VAR2, VAR3, and VAR4.

VAR2 and VAR3 have a correlation smaller than 0.1, VAR2 and VAR4 too, but VAR3 and VAR4 have a correlation of 0.2

The resultant sets are (1) VAR1, VAR2, and VAR3, and (2) VAR1, VAR2, and VAR4.

You can imagine that this gets really complicated for 10 variables of which some have correlation smaller than 0.1 with at least 6 other variables.

In short: of 10 variables, I need to define every possible set that is made from any combination of variables, of which their inter-variable correlation is less than 0.1.

How can I do this?

Thank you very much!

F.

Posted

How are you keeping data?

Is it Excel table? If so, you can export it to CSV (Comma Separated Values). It's easier to parse from external code.

Then you can write little script in PHP, Perl, Python, or C/C++, which will load row by row, and analyze them, and return result that you want.

 

ps. Maybe give the real example (CSV?) with just 2x2 fields.. so there will be 2x2 data per field. 16 total.

 

Posted

It's in SPSS, but I need to make a new table, e.g., in Excel, with variable-variable correlation coefficients.

However, I'm afraid I cannot program whatsoever, so I'd appreciate any help ...

You can find the original true values attachted in csv format.

 

Map1.csv

Posted (edited)
57 minutes ago, Function said:

However, I'm afraid I cannot program whatsoever, so I'd appreciate any help ...

Why not you cannot program? Everybody can program..

57 minutes ago, Function said:

You can find the original true values attachted in csv format.

It does not look like what you said in the first post, at all..

 

Describing what it all means, will probably take longer time, than time spend on writing script..

 

Edited by Sensei
Posted
1 minute ago, Sensei said:

Why not you cannot program? Everybody can program..

It does not look like what you said in the first post, at all..

 

Not everyone ;)

And how so?

I genuinely believe this is "a 10 x 10 table with 10 by 10 variables and in the cells their correlation coefficient" (correlation coefficient being the correlation coefficient of 2 variables).

So I'd need every possible set of variables, with none of the inter-variable correlation coefficients of the set exceeding, let's say, 0.1.

 10x10.PNG.91179053fd1ff3d0827bcaf6aa3eb27e.PNG

Posted

Oh, I see where was problem.. you exported in CSV, but you have comma as decimal separator, not CSV field separator..

After replacing comma by dot, then replacing semicolon by comma, it loaded correctly in Open Office.

 

Posted
1 minute ago, Sensei said:

Oh, I see where was problem.. you exported in CSV, but you have comma as decimal separator, not CSV field separator..

After replacing comma by dot, then replacing semicolon by comma, it loaded correctly in Open Office.

 

Ahh yes; sorry, my bad. SPSS has a period as decimal separator, but forgot that Excel is still set in my regional standards (where a decimal separator is a comma)

Posted (edited)

In Open Office there is such function which will filter cells depending on cell value.

e.g.

=IF(B2<0.1;B2;"" )

then select row, fill entire row, then select columns, fill entire columns.. and received this:

5a6bb011dc189_OpenOfficeFilter.png.2c9d9506255a8247faed78d008c2a0b3.png

 

Expected by your coefficients are these? They are lower than threshold 0.1 (even negative)

5a6bb84f82758_OpenOfficeFilter.png.edcbe400197928ecbc0a6ca7cf637dbe.png

Edited by Sensei

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.