Dear members, I'd like to carry out certain analysis on matrix format data - pairwise ratings of certain items, symmetric matrices. The aim is to compare the responses of participants to these items (how similar the score matrices are among participants). I carried out some analysis but for more insight I'm considering to assess the Euclidean distance between participants' response matrices and to assess the similarity among matrices via the quadratic assignment procedure correlation. The analysis will be conducted in SPSS. I'd like to ask you if the Correlations -> Distances -> Pearson correlation analysis in SPSS is the same analysis as the QAP correlation in UCINET, that is if the algorithm is the same and by using the Correlation between matrices in SPSS I would obtain the same result as when conducting the analysis in UCINET. I hope that someone can share some insight on this issue. Best regards And |
Administrator
|
" QAP correlation in UCINET, that is if the algorithm is the same and by using the Correlation between matrices in SPSS I would obtain the same result as when conducting the analysis in UCINET. "
Perhaps post a link to the UCINET algorithm? That would maybe get the ball rolling...
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Andra, Correlation matrices in SPSS and Network Matrices for QAP correlation are, for the most part, totally unrelated except for their shape. UCINET is a package for Social Network Analysis. IBM/SPSS has or had a separate package for Social Network Analysis called IBM SPSS Modeler, of which version 16.0 was released in December 2013. It was launched on top of the data mining product nee SPSS Clementine / IBM PASW Modeler The Social Network Analyis component was added in 2012, I have seen Clementine years ago, but have never seen the new packages (none since 2010). Perhaps Jon or David or some current or former IBM/SPSS guru can provide more information. ... Mark Miller On Tue, Jan 27, 2015 at 5:13 PM, David Marso <[hidden email]> wrote: " QAP correlation in UCINET, that is if the algorithm is the same and by |
Mark, thank you for the insights. Indeed I've found some information about a SNA package for SPSS and also that this package is not updated. I was considering to run these calculations in SPSS and not with the SPSS Modeler, - I've found some information that QAP correlations can also be run in SPSS but unfortunately the article where I found this information did not offer additional details on the analysis. David, the algorithm as described on the UCINET webpages: "The algorithm
proceeds in two steps. In the first step, it computes Pearson's
correlation coefficient (plus simple matching, Jaccard, Goodman Kruskal
Gamma and Hamming distance) between corresponding cells of the two data
matrices. In the second step, it randomly permutes rows and columns
(synchronously) of one matrix (the observed matrix, if the distinction
is relevant) and recomputes the correlation and other measures. The second step is carried out hundreds of times in order to compute the proportion of times that a random measure is larger than or equal to the observed measure calculated in step 1. A low proportion (< 0.05) suggests a strong relationship between the matrices that is unlikely to have occurred by chance." As far as I understand based on this information (I have little knowledge on this so far), the QAP correlation analysis in Ucinet uses the same input as the Correlation - Distances - Pearson (Proximities) in SPSS (square matrices of similarities/dissimilarities). What is not clear to me is whether in SPSS the bootstrapping is also performed when running the correlation - since I assume that this would make the procedures equivalent (but this conception may be wrong!). I hope this is more clear now and you can share some more insights. Regards Andra On Wednesday, January 28, 2015 2:55 AM, Mark Miller <[hidden email]> wrote: Andra, Correlation matrices in SPSS and Network Matrices for QAP correlation are, for the most part, totally unrelated except for their shape. UCINET is a package for Social Network Analysis. IBM/SPSS has or had a separate package for Social Network Analysis called IBM SPSS Modeler, of which version 16.0 was released in December 2013. It was launched on top of the data mining product nee SPSS Clementine / IBM PASW Modeler The Social Network Analyis component was added in 2012, I have seen Clementine years ago, but have never seen the new packages (none since 2010). Perhaps Jon or David or some current or former IBM/SPSS guru can provide more information. ... Mark Miller On Tue, Jan 27, 2015 at 5:13 PM, David Marso <david.marso@...> wrote: " QAP correlation in UCINET, that is if the algorithm is the same and by |
In reply to this post by Andra Th
Without further detail it is hard to be specific. However, if you have a square matrix with similarity measures of some kind, that sounds like individual differences multidimensional scaling. under help type "multidimensional scaling"
I suggest that you google "class-L" for the discussion list for the Classification Society and ask (1) to compare/contrast QAP vs INDSCAL or ALSCAL (2) what are other names for QAP
Art Kendall
Social Research Consultants |
P.S. The Classification Society has been around since the late 60's specifically to deal with MDS, networks, clustering, etc.
Art Kendall
Social Research Consultants |
This post was updated on .
In reply to this post by Art Kendall
Another point to make is that if this is already available in some SNA library for R or python then you can just call that code. The UCINET page description is pretty vague (and gives no other citation), but here is my guess as to what is going on:
If you had distance matrix A 0 1 0 2 3 0 4 5 6 0 You would subsequently reshape this into a column vector, where the brackets are the original row and column indices: [2,1] 1 [3,1] 2 [3,2] 3 [4,1] 4 [4,2] 5 [4,3] 6 (The UCINET page mentions dropping the diagonal, I don't know why you would want to keep the redundant off-diagonal entries assuming a symmetric matrix as well.) Then you would do the same for your other distance matrix B, match the two files, and then calculate the correlation between the two column vectors. These operations are all pretty simple to do right in SPSS. To calculate the permutations (note - bootstrapping is not the same as permutations), I'm guessing UCINET simply permutates items in the distance matrix (since it does not seem to accept the original variables for the program). I would need to walk through this to see if this is reasonable (is a permutation of a distance matrix is still a possible distance matrix?) as opposed to permutating the original variables that the distances were based off of. But the operation itself can be done in SPSS as well, and I wrote some eye-bleeding if you look at it too long MATRIX code to accomplish permutations. ******************************. *Permutates the order of a column vector (or rows of a matrix). DEFINE !PERMC (!POSITIONAL !ENCLOSE("(",")") ) (!1(GRADE(UNIFORM(NROW(!1),1)),:)) !ENDDEFINE. MATRIX. COMPUTE x = T({0:10}). COMPUTE xN = !PERMC(x). PRINT {x,xN}. END MATRIX. ******************************. If you submit your two column vectors, it is just some more number crunching to calculate the correlation between the two vectors and loop through however many permutations that you want. I used this code for some spatial statistics in my dissertation with a column of length 21,506. It was pretty slow, but chugged away at the problem like a champ. (1,000 cases or fewer and this will be pretty fast for even many more than 100 permutations.) |
First off, I admit to knowing diddly about QAP analysis even though
I've had some experience with network analysis but that was at a theoretical network. Second, of more direct relevance, R appears to have Social Network Analysis (SNA) tools and this might be useful in this situation since R can be called from within SPSS. For the SNA tools see: http://www.inside-r.org/packages/cran/sna and http://www.inside-r.org/packages/cran/sna/docs/qaptest Third, Stata appears to have a QAP procedure that could be used in a pinch; see: www.stata.com/meeting/1nasug/simpson.pdf Fourth, apparently one has to be careful in how one structures the data for analysis -- here is a case of where different data layouts produced different results in R and UCINET: http://stats.stackexchange.com/questions/114728/why-might-ucinet-and-r-return-different-results-for-a-qap-logistic-regression-o Fifth, as some probably anticipated, SNA has been implemented in several specialized software programs, UCINET being just one of them. For a review and comparison of some of these packages by Mark Huisman et al (2004) see: www.gmw.rug.nl/~stocnet/content/downloads/HuismanVanDuijn.pdf And here's Huisman's page on SNA packages and resources: http://www.gmw.rug.nl/~huisman/sna/software.html NOTE: R-based Statnet: http://statnet.csde.washington.edu/index.shtml R-based tnet: http://www.inside-r.org/packages/cran/tnet Python-based UrlNet (for WWW network analysis): https://code.google.com/p/urlnet-python-library/ Perhaps this can be converted into a general purpose program. Sixth, from the superficial examination of these sources above and elsewhere it appears to me that one probably has to have some specific goals for an analysis and one should tailor the analysis to the structure of their data (e.g., is one group or two group [dyads] being analyzed). Some general references for SNA include: Analyzing Social Networks By Stephen P Borgatti, Martin G Everett, Jeffrey C Johnson, available on books.google.com https://books.google.com/books?id=dHhpBAAAQBAJ&pg=PT346&lpg=PT346&dq=Borgatti,+Everett,+%26+Freeman+%282002%29+Borgatti,+S.+P.+,+Everett,+M.+G.+,+%26+Freeman,+L.+C.+%282002%29.+UCINET+6+for+Windows.+Harvard,+MA:+Analytic+Technologi&source=bl&ots=6GyDrtHrgJ&sig=pKwyyBQem0IojNJQuvNaVLPZml0&hl=en&sa=X&ei=lfTIVL6hHveJsQSq5IDgDw&ved=0CFUQ6AEwCQ#v=onepage&q=Borgatti%2C%20Everett%2C%20%26%20Freeman%20%282002%29%20Borgatti%2C%20S.%20P.%20%2C%20Everett%2C%20M.%20G.%20%2C%20%26%20Freeman%2C%20L.%20C.%20%282002%29.%20UCINET%206%20for%20Windows.%20Harvard%2C%20MA%3A%20Analytic%20Technologi&f=false Hannerman & Riddle's (2005) "Introduction to Social Network Methods" (book in html format): http://faculty.ucr.edu/~hanneman/nettext/index.html And some YouTube video on QAP correlation via UCINet: https://www.youtube.com/watch?v=R12mM5OLE60 I assume that one may find additional videos on doing SNA on the YouTube. Seventh, given all the yadda-yadda above, it still would be nice to have an SPSS based procedure/macro/whatever that performs this analysis which might give rise to additional statistical tools for doing SNA in SPSS. -MIke Palij New York University [hidden email] ----- Original Message ----- From: "Andy W" <[hidden email]> To: <[hidden email]> Sent: Wednesday, January 28, 2015 8:24 AM Subject: Re: QAP correlation SPSS > Another point to make is that if this is already available in some SNA > library for R or python then you can just call that code. The UCINET > page > description is pretty vague (and gives no other citation), but here is > my > guess as to what is going on: > > If you had distance matrix A > > 0 > 1 0 > 2 3 0 > 4 5 6 0 > > You would subsequently reshape this into a column vector, where the > brackets > are the original row and column indices: > > [2,1] 1 > [3,1] 2 > [3,2] 3 > [4,1] 4 > [4,2] 5 > [4,3] 6 > > (The UCINET page mentions dropping the diagonal, I don't know why you > would > want to keep the redundant off-diagonal entries assuming a symmetric > matrix > as well.) Then you would do the same for your other distance matrix B, > match > the two files, and then calculate the correlation between the two > column > vectors. > > These operations are all pretty simple to do right in SPSS. To > calculate the > permutations (note - bootstrapping is not the same as permutations), > I'm > guessing UCINET simply permutates items in the distance matrix (since > it > does not seem to accept the original variables for the program). I > would > need to walk through this to see if this is reasonable (is a > permutation of > a distance matrix is still a possible distance matrix?) as opposed to > permutating the original variables that the distances were based off > of. > > But the operation itself can be done in SPSS as well, and I wrote some > eye-bleeding if you look at it too long MATRIX code to accomplish > permutations. > > ******************************. > *Permutates the order of a column vector (or rows of a matrix). > DEFINE !PERMC (!POSITIONAL !ENCLOSE("(",")") ) > (!1(GRADE(UNIFORM(NROW(!1),1)),:)) > !ENDDEFINE. > > MATRIX. > COMPUTE x = T({0:10}). > COMPUTE xN = !PERMC(x). > PRINT {x,xN}. > END MATRIX. > ******************************. > > If you submit your two column vectors, it is just some more number > crunching > to calculate the correlation between the two vectors and loop through > however many permutations that you want. I used this code for some > spatial > statistics in my dissertation with a column of length 21,506. It was > pretty > slow, but chugged away at the problem like a champ. (1,000 cases fewer > and > this will be pretty fast for even many more than 100 permutations.) > > > > ----- > Andy W > [hidden email] > http://andrewpwheeler.wordpress.com/ > -- > View this message in context: > http://spssx-discussion.1045642.n5.nabble.com/QAP-correlation-SPSS-tp5728505p5728512.html > Sent from the SPSSX Discussion mailing list archive at Nabble.com. > > ===================== > To manage your subscription to SPSSX-L, send a message to > [hidden email] (not to SPSSX-L), with no body text except > the > command. To leave the list, send the command > SIGNOFF SPSSX-L > For a list of commands to manage subscriptions, send the command > INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
Free forum by Nabble | Edit this page |