cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
%3CLINGO-SUB%20id%3D%22lingo-sub-72364%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BA%E6%98%BE%E7%A4%BApvalue%E7%9A%84%E7%9B%B8%E5%85%B3%E6%80%A7%EF%BC%88%E5%85%B7%E6%9C%89%E4%B8%8D%E5%90%8C%E9%A2%9C%E8%89%B2%EF%BC%89%E5%92%8C%E6%98%9F%E5%BD%A2%E7%9A%84HEATMAPS%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-72364%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-72454%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%EF%BC%9A%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BA%E6%98%BE%E7%A4%BApvalu%E7%9A%84%E7%9B%B8%E5%85%B3%E6%80%A7%EF%BC%88%E5%85%B7%E6%9C%89%E4%B8%8D%E5%90%8C%E9%A2%9C%E8%89%B2%EF%BC%89%E5%92%8C%E6%98%9F%E5%BD%A2%E7%9A%84HEATMAPS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-72454%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E8%BF%99%E6%98%AF%E4%B8%80%E4%B8%AA%E8%84%9A%E6%9C%AC%EF%BC%8C%E5%BA%94%E8%AF%A5%E6%98%AF%E5%88%9B%E5%BB%BA%E6%89%80%E9%9C%80%E5%86%85%E5%AE%B9%E7%9A%84%E8%89%AF%E5%A5%BD%E5%BC%80%E7%AB%AF%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20504px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22matrix.PNG%22%20style%3D%22width%3A%20504px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F12412i052CA6E1D86AE9CB%2Fimage-dimensions%2F504x537%3Fv%3Dv2%22%20width%3D%22504%22%20height%3D%22537%22%20role%3D%22button%22%20title%3D%22matrix.PNG%22%20alt%3D%22matrix.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0A%0A%2F%2F%20Open%20a%20sample%20data%20table%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2Fsemiconductor%20capability.jmp%22%20)%3B%0A%0A%2F%2F%20Run%20the%20Correlation%20Platform%20to%20get%20the%20data%0Amult%20%3D%20dt%20%26lt%3B%26lt%3B%20Multivariate(%0A%20invisible%2C%0A%20Y(%20%3ANPN1%2C%20%3APNP1%2C%20%3APNP2%2C%20%3ANPN2%2C%20%3APNP3%2C%20%3AIVP1%20)%2C%0A%20Estimation%20Method(%20%22Row-wise%22%20)%2C%0A%20Matrix%20Format(%20%22Square%22%20)%2C%0A%20Scatterplot%20Matrix(%200%20)%2C%0A%20Pairwise%20Correlations(%201%20)%0A)%3B%0A%0A%2F%2F%20Create%20data%20tables%20of%20the%20stats%20required%0AdtCorr%20%3D%20Report(%20mult%20)%5B%22Correlations%22%5D%5BMatrix%20Box(%201%20)%5D%20%26lt%3B%26lt%3B%20make%20into%20data%20table(invisible)%3B%0AdtSig%20%3D%20Report(%20mult%20)%5B%22Pairwise%20Correlations%22%5D%5BTable%20Box(%201%20)%5D%20%26lt%3B%26lt%3B%20make%20into%20data%20table(invisible)%3B%0A%0A%2F%2F%20Delete%20the%20Row%20Name%20column%2C%20not%20wanted%20in%20analysis%0AdtCorr%20%26lt%3B%26lt%3B%20delete%20columns(%201%20)%3B%0A%0A%2F%2F%20Set%20the%20100%20colors%20to%20be%20used%20to%20color%20the%20graph%0AcolorMatrix%20%3D%20%5B-16558990%2C%20-16558990%2C%20-16557962%2C%20-16557962%2C%20-16557191%2C%20-16557191%2C%20-16556419%2C%20-16556419%2C%20-16555391%2C%0A-16555391%2C%20-16554619%2C%20-16554619%2C%20-16553848%2C%20-16553848%2C%20-16553076%2C%20-16553076%2C%20-16552048%2C%20-16552048%2C%20-16551277%2C%0A-16551277%2C%20-16550506%2C%20-16550506%2C%20-16549735%2C%20-16549735%2C%20-16548964%2C%20-16548964%2C%20-16547936%2C%20-16547936%2C%20-16481629%2C%0A-16481629%2C%20-16480858%2C%20-16480858%2C%20-16480087%2C%20-16480087%2C%20-16479316%2C%20-16479316%2C%20-16478288%2C%20-16478288%2C%20-16477517%2C%0A-16477517%2C%20-16476746%2C%20-16476746%2C%20-16410184%2C%20-16410184%2C%20-16343621%2C%20-16343621%2C%20-16277315%2C%20-16277315%2C%20-16210752%2C%0A-16210752%2C%20-16144190%2C%20-16144190%2C%20-16077628%2C%20-16077628%2C%20-16011321%2C%20-16011321%2C%20-15944759%2C%20-15944759%2C%20-15878196%2C%0A-15878196%2C%20-15811634%2C%20-15811634%2C%20-15745328%2C%20-15745328%2C%20-15678765%2C%20-15678765%2C%20-15612459%2C%20-15612459%2C%20-15415082%2C%0A-15415082%2C%20-15217705%2C%20-15217705%2C%20-15020328%2C%20-15020328%2C%20-14822951%2C%20-14822951%2C%20-14625829%2C%20-14625829%2C%20-14428452%2C%0A-14428452%2C%20-14231075%2C%20-14231075%2C%20-14099234%2C%20-14099234%2C%20-13901857%2C%20-13901857%2C%20-13704735%2C%20-13704735%2C%20-13507358%2C%0A-13507358%2C%20-13309981%2C%20-13309981%2C%20-13113116%2C%20-13113116%2C%20-12916508%2C%20-12916508%2C%20-12719643%2C%20-12719643%2C%20-12522778%2C%0A-12522778%5D%3B%0A%0A%2F%2F%20Get%20the%20column%20names%20in%20the%20Corr%20data%20table%0AcolumnNamesList%20%3D%20dtCorr%20%26lt%3B%26lt%3B%20get%20column%20names(%20string%20)%3B%0A%0A%2F%2F%20Create%20the%20output%0Anw%20%3D%20New%20Window(%20%22Correlations%22%2C%0A%20gb%20%3D%20Graph%20Box(%0A%20%20Frame%20Size(%20800%2C%20800%20)%2C%0A%20%20X%20Scale(%200%2C%20N%20Col(%20dtCorr%20)%20%2B%202%20)%2C%0A%20%20Y%20Scale(%200%2C%20N%20Rows(%20dtCorr%20)%20%2B%202%20)%2C%0A%20%20%2F%2F%20Loop%20across%20the%20the%20rows%20and%20columns%20to%20find%20the%20correlation%20values%20and%20plot%20the%20results%0A%20%20For(%20x%20%3D%201%2C%20x%20%26lt%3B%3D%20N%20Cols(%20dtCorr%20)%2C%20x%2B%2B%2C%0A%20%20%20For(%20y%20%3D%201%2C%20y%20%26lt%3B%3D%20N%20Rows(%20dtCorr%20)%2C%20y%2B%2B%2C%0A%20%20%20%20%2F%2F%20Find%20the%20color%20to%20use%20from%20the%20color%20matrix%0A%20%20%20%20fc%20%3D%20Abs(%20Floor(%20(dtCorr%5By%2C%20x%5D%20*%20100)%20%2B%20.5%20)%20)%3B%0A%20%20%20%20If(%20fc%20%26lt%3B%201%2C%20fc%20%3D%201%20)%3B%0A%20%20%20%20fcc%20%3D%20colorMatrix%5Bfc%5D%3B%0A%20%20%20%20%2F%2F%20Set%20the%20color%0A%20%20%20%20Eval(%20Parse(%20%22Fill%20Color(%22%20%7C%7C%20Char(%20fcc%20)%20%7C%7C%20%22)%3B%22%20)%20)%3B%0A%20%20%20%20Pen%20Color(%20%22black%22%20)%3B%0A%20%20%20%20%0A%20%20%20%20%2F%2F%20create%20the%20output%20square%0A%20%20%20%20xlist1%20%3D%20Matrix(%20x%20)%20%7C%7C%20Matrix(%20x%20)%20%7C%7C%20Matrix(%20x%20%2B%201%20)%20%7C%7C%20Matrix(%20x%20%2B%201%20)%3B%0A%20%20%20%20xlist2%20%3D%20Matrix(%20N%20Cols(%20dtCorr%20)%20%2B%201%20-%20y%20)%20%7C%7C%20Matrix(%20N%20Cols(%20dtCorr%20)%20%2B%201%20-%20y%20%2B%201%20)%20%7C%7C%0A%20%20%20%20Matrix(%20N%20Cols(%20dtCorr%20)%20%2B%201%20-%20y%20%2B%201%20)%20%7C%7C%20Matrix(%20N%20Cols(%20dtCorr%20)%20%2B%201%20-%20y%20)%3B%0A%20%20%20%20Polygon(%20xlist1%2C%20xlist2%20)%3B%0A%20%20%20%20%2F%2F%20Draw%20a%20line%20around%20the%20square%0A%20%20%20%20Line(%20xlist1%2C%20xlist2%20)%3B%0A%20%20%20)%0A%20%20)%3B%0A%20%20%0A%20%20%2F%2F%20Add%20the%20%22*%22%20for%20significant%20correlations%2C%20by%20going%20through%20the%20significant%20data%20table%0A%20%20Text%20Color(%20%22Black%22%20)%3B%0A%20%20Text%20Size(%2020%20)%3B%0A%20%20%0A%20%20For(%20i%20%3D%201%2C%20i%20%26lt%3B%3D%20N%20Rows(%20dtSig%20)%2C%20i%2B%2B%2C%0A%20%20%20If(%20dtSig%3ASignif%20Prob%5Bi%5D%20%26lt%3B%3D%20.05%2C%0A%20%20%20%20textList%20%3D%20%7B%7D%3B%0A%20%20%20%20Insert%20Into(%20textList%2C%20Loc(%20columnNamesList%2C%20dtSig%3AVariable%5Bi%5D%20)%5B1%5D%20%2B%20.5%20)%3B%0A%20%20%20%20Insert%20Into(%20textList%2C%20N%20Cols(%20dtCorr%20)%20%2B%201%20-%20Loc(%20columnNamesList%2C%20dtSig%3Aby%20Variable%5Bi%5D%20)%5B1%5D%20%2B%20.5%20)%3B%0A%20%20%20%20%0A%20%20%20%20Text(%20Center%20Justified%2C%20textList%2C%20%22*%22%20)%3B%0A%20%20%20%20textList%20%3D%20%7B%7D%3B%0A%20%20%20%20Insert%20Into(%20textList%2C%20Loc(%20columnNamesList%2C%20dtSig%3Aby%20Variable%5Bi%5D%20)%5B1%5D%20%2B%20.5%20)%3B%0A%20%20%20%20Insert%20Into(%20textList%2C%20N%20Cols(%20dtCorr%20)%20%2B%201%20-%20Loc(%20columnNamesList%2C%20dtSig%3AVariable%5Bi%5D%20)%5B1%5D%20%2B%20.5%20)%3B%0A%20%20%20%20%0A%20%20%20%20%2F%2F%20Write%20the%20symbol%20in%20the%20middle%20of%20the%20square%0A%20%20%20%20Text(%20Center%20Justified%2C%20textList%2C%20%22*%22%20)%3B%0A%20%20%20)%0A%20%20)%3B%0A%20)%0A%20%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-72421%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%EF%BC%9A%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BA%E6%98%BE%E7%A4%BApvalu%E7%9A%84%E7%9B%B8%E5%85%B3%E6%80%A7%EF%BC%88%E5%85%B7%E6%9C%89%E4%B8%8D%E5%90%8C%E9%A2%9C%E8%89%B2%EF%BC%89%E5%92%8C%E6%98%9F%E5%BD%A2%E7%9A%84HEATMAPS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-72421%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E4%BD%A0%E8%83%BD%E7%BB%99%E6%88%91%E4%B8%80%E4%BA%9B%E5%85%B3%E4%BA%8E''%E8%84%9A%E6%9C%AC%E5%81%87%E4%BA%BA'%E7%9A%84%E6%9B%B4%E5%A4%9A%E4%BF%A1%E6%81%AF%E5%90%97%EF%BC%9F%3C%2FP%3E%3CP%3E%E6%88%91%E6%9C%80%E8%BF%91%EF%BC%88%E4%BB%8A%E5%A4%A9%EF%BC%89%E6%8C%89%E7%85%A7%E8%BF%99%E4%B8%AA%E9%9D%9E%E5%B8%B8%E6%9C%89%E7%94%A8%E7%9A%84%E8%A7%86%E9%A2%91%E4%B8%AD%E7%BB%99%E5%87%BA%E7%9A%84%E8%AF%B4%E6%98%8E%E5%9C%A8JMP%E4%B8%8A%E5%81%9A%E4%BA%86%E6%88%91%E7%9A%84%E7%AC%AC%E4%B8%80%E4%B8%AA%E7%83%AD%E5%9B%BE%EF%BC%9A%20%3CA%20href%3D%22https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DuaBFoI3l-8U%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%20https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DuaBFoI3l-8U%20%3C%2FA%3E%3C%2FP%3E%3CP%3E%E5%A6%82%E6%9E%9C%E6%9C%89%E4%BA%BA%E5%8F%AF%E4%BB%A5%E5%88%B6%E4%BD%9C%E7%B1%BB%E4%BC%BC%E7%9A%84%E8%A7%86%E9%A2%91%EF%BC%8C%E4%BD%86%E4%B9%9F%E5%8C%85%E6%8B%AC%E5%A6%82%E4%BD%95%E6%B7%BB%E5%8A%A0%E6%98%9F%E6%98%9F%E7%9A%84%E8%84%9A%E6%9C%AC%EF%BC%88%E4%BE%8B%E5%A6%82*%20p%20%26lt%3B0.05%EF%BC%8C**%20p%20%26lt%3B0.01%EF%BC%8C****%20p%20%26lt%3B0.001%EF%BC%89%EF%BC%8C%E6%88%91%E8%AE%A4%E4%B8%BA%E6%95%B4%E4%B8%AAJMP%E7%A4%BE%E5%8C%BA%E7%9C%9F%E7%9A%84%E5%BE%88%E5%BC%80%E5%BF%83%E5%85%B3%E4%BA%8E%E5%AE%83%20%EF%BC%9A%EF%BC%89%3C%2FP%3E%3CP%3E%E6%88%96%E8%80%85%EF%BC%8C%E5%A6%82%E6%9E%9C%E6%9C%89%E4%BA%BA%E6%9C%89%E6%97%B6%E9%97%B4%E9%80%90%E6%AD%A5%E8%A7%A3%E9%87%8A%E9%9C%80%E8%A6%81%E4%BB%80%E4%B9%88%E8%84%9A%E6%9C%AC%E4%BB%A5%E5%8F%8A%E5%A6%82%E4%BD%95%E5%B0%86%E5%85%B6%E5%90%88%E5%B9%B6%E5%88%B0JMP%E6%95%B0%E6%8D%AE%E9%9B%86%E4%B8%AD%EF%BC%8C%E9%82%A3%E4%B9%88%E5%AE%83%E4%BB%8D%E7%84%B6%E9%9D%9E%E5%B8%B8%E6%9C%89%E7%94%A8%E3%80%82%26nbsp%3B%3C%2FP%3E%3CP%3E%E8%B0%A2%E8%B0%A2%E4%BD%A0%E7%9A%84%E7%90%86%E8%A7%A3%EF%BC%81%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-72417%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%EF%BC%9A%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BA%E6%98%BE%E7%A4%BApvalu%E7%9A%84%E7%9B%B8%E5%85%B3%E6%80%A7%EF%BC%88%E5%85%B7%E6%9C%89%E4%B8%8D%E5%90%8C%E9%A2%9C%E8%89%B2%EF%BC%89%E5%92%8C%E6%98%9F%E5%BD%A2%E7%9A%84HEATMAPS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-72417%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E6%B2%A1%E6%9C%89%E5%86%85%E7%BD%AE%E9%80%89%E9%A1%B9%E6%9D%A5%E5%AE%8C%E6%88%90%E6%82%A8%E7%9A%84%E8%A6%81%E6%B1%82%E7%9A%84%E5%AE%8C%E6%95%B4%E5%88%97%E8%A1%A8%E3%80%82%26nbsp%3B%20%E4%BD%86%E6%98%AF%EF%BC%8C%E4%B8%80%E4%B8%AA%E4%B8%8D%E5%A4%AA%E5%9B%B0%E9%9A%BE%E7%9A%84%E8%84%9A%E6%9C%AC%E5%8F%AF%E4%BB%A5%E7%94%9F%E6%88%90%E5%9B%BE%E8%A1%A8%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-72403%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%EF%BC%9A%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BA%E6%98%BE%E7%A4%BApvalu%E7%9A%84%E7%9B%B8%E5%85%B3%E6%80%A7%EF%BC%88%E5%85%B7%E6%9C%89%E4%B8%8D%E5%90%8C%E9%A2%9C%E8%89%B2%EF%BC%89%E5%92%8C%E6%98%9F%E5%BD%A2%E7%9A%84HEATMAPS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-72403%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E6%98%AF%E7%9A%84%EF%BC%8C%E4%BD%86%E5%A6%82%E6%9E%9C%E6%82%A8%E8%BF%98%E5%B8%8C%E6%9C%9B%E5%9C%A8%E6%AF%8F%E4%B8%AA%E7%9B%B8%E5%85%B3%E6%80%A7%E4%B8%8A%E8%AE%BE%E7%BD%AE%E6%98%9F%E5%BD%A2%EF%BC%88%E8%A1%A8%E7%A4%BAp%E5%80%BC%26lt%3B0.05%EF%BC%89%EF%BC%8C%E8%AF%A5%E6%80%8E%E4%B9%88%E5%8A%9E%EF%BC%9F%E4%BE%8B%E5%A6%82%E9%99%84%E5%9C%A8%E7%85%A7%E7%89%87%E4%B8%AD%EF%BC%9F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-72385%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%EF%BC%9A%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BA%E6%98%BE%E7%A4%BApvalu%E7%9A%84%E7%9B%B8%E5%85%B3%E6%80%A7%EF%BC%88%E5%85%B7%E6%9C%89%E4%B8%8D%E5%90%8C%E9%A2%9C%E8%89%B2%EF%BC%89%E5%92%8C%E6%98%9F%E5%BD%A2%E7%9A%84HEATMAPS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-72385%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E4%BB%8EAnalyze%E4%B8%8B%E6%8B%89%E8%8F%9C%E5%8D%95%E4%B8%AD%EF%BC%9A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%20%E5%88%86%E6%9E%90%3D%3D%26gt%3B%E5%A4%9A%E5%8F%98%E9%87%8F%E6%96%B9%E6%B3%95%3D%3D%26gt%3B%E5%A4%9A%E5%8F%98%E9%87%8F%3C%2FP%3E%0A%3CP%3E%E5%9C%A8%E6%8A%A5%E5%91%8A%E8%BE%93%E5%87%BA%E7%9A%84%E7%BA%A2%E8%89%B2%E4%B8%89%E8%A7%92%E5%BD%A2%E4%B8%AD%EF%BC%8C%E9%80%89%E6%8B%A9%E2%80%9C%E9%A2%9C%E8%89%B2%E8%B4%B4%E5%9B%BE%E2%80%9D%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20271px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22colormap.PNG%22%20style%3D%22width%3A%20271px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F12398i3FEB8371860F9021%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22colormap.PNG%22%20alt%3D%22colormap.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar

How to create HEATMAPS that show the correlation (with different colour) and stars for the pvalue?

 
5 REPLIES 5
txnelson
Super User

Re: How to create HEATMAPS that show the correlation (with different colour) and stars for the pvalu

From the Analyze pulldown menu:

     Analyze==>Multivariate Methods==>Multivariate

In the report output's red triangle, select Color Maps

colormap.PNG

Jim

Re: How to create HEATMAPS that show the correlation (with different colour) and stars for the pvalu

yes, but what if you would also like to put stars on each correlation (denoting p values <0.05)? As eg in the photo attached?

txnelson
Super User

Re: How to create HEATMAPS that show the correlation (with different colour) and stars for the pvalu

There isn't a builtin option to complete the full list of your requirements.  However, a not very difficult script could generate the chart.

Jim

Re: How to create HEATMAPS that show the correlation (with different colour) and stars for the pvalu

Could you give some more info for ''script dummies'' as me?

I recently (today) did my 1st heatmap on JMP following the instructions given in this very useful video: https://www.youtube.com/watch?v=uaBFoI3l-8U

If somebody could create a similar video but also including the script for how to add the stars (eg *p<0.05, **p<0.01, **** p<0.001), i think the whole JMP community would be really happy about it :)

Alternatively if someone had some time to explain step by step what script would be needed and how it could be incorporated in a JMP dataset it would still be very useful. 

Thanks for the understanding!

Since recording this video I have produced an add-in to generate all the output show in this video. You can find the add-in here: https://community.jmp.com/docs/DOC-9923 In this video we see several methods for generating a scatterplot matrix as well as a heatmap of correlations between one set of
txnelson
Super User

Re: How to create HEATMAPS that show the correlation (with different colour) and stars for the pvalu

Here is a script that should be a good start in creating what you want

matrix.PNG

Names Default To Here( 1 );

// Open a sample data table
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );

// Run the Correlation Platform to get the data
mult = dt << Multivariate(
	invisible,
	Y( :NPN1, :PNP1, :PNP2, :NPN2, :PNP3, :IVP1 ),
	Estimation Method( "Row-wise" ),
	Matrix Format( "Square" ),
	Scatterplot Matrix( 0 ),
	Pairwise Correlations( 1 )
);

// Create data tables of the stats required
dtCorr = Report( mult )["Correlations"][Matrix Box( 1 )] << make into data table(invisible);
dtSig = Report( mult )["Pairwise Correlations"][Table Box( 1 )] << make into data table(invisible);

// Delete the Row Name column, not wanted in analysis
dtCorr << delete columns( 1 );

// Set the 100 colors to be used to color the graph
colorMatrix = [-16558990, -16558990, -16557962, -16557962, -16557191, -16557191, -16556419, -16556419, -16555391,
-16555391, -16554619, -16554619, -16553848, -16553848, -16553076, -16553076, -16552048, -16552048, -16551277,
-16551277, -16550506, -16550506, -16549735, -16549735, -16548964, -16548964, -16547936, -16547936, -16481629,
-16481629, -16480858, -16480858, -16480087, -16480087, -16479316, -16479316, -16478288, -16478288, -16477517,
-16477517, -16476746, -16476746, -16410184, -16410184, -16343621, -16343621, -16277315, -16277315, -16210752,
-16210752, -16144190, -16144190, -16077628, -16077628, -16011321, -16011321, -15944759, -15944759, -15878196,
-15878196, -15811634, -15811634, -15745328, -15745328, -15678765, -15678765, -15612459, -15612459, -15415082,
-15415082, -15217705, -15217705, -15020328, -15020328, -14822951, -14822951, -14625829, -14625829, -14428452,
-14428452, -14231075, -14231075, -14099234, -14099234, -13901857, -13901857, -13704735, -13704735, -13507358,
-13507358, -13309981, -13309981, -13113116, -13113116, -12916508, -12916508, -12719643, -12719643, -12522778,
-12522778];

// Get the column names in the Corr data table
columnNamesList = dtCorr << get column names( string );

// Create the output
nw = New Window( "Correlations",
	gb = Graph Box(
		Frame Size( 800, 800 ),
		X Scale( 0, N Col( dtCorr ) + 2 ),
		Y Scale( 0, N Rows( dtCorr ) + 2 ),
		// Loop across the the rows and columns to find the correlation values and plot the results
		For( x = 1, x <= N Cols( dtCorr ), x++,
			For( y = 1, y <= N Rows( dtCorr ), y++,
				// Find the color to use from the color matrix
				fc = Abs( Floor( (dtCorr[y, x] * 100) + .5 ) );
				If( fc < 1, fc = 1 );
				fcc = colorMatrix[fc];
				// Set the color
				Eval( Parse( "Fill Color(" || Char( fcc ) || ");" ) );
				Pen Color( "black" );
				
				// create the output square
				xlist1 = Matrix( x ) || Matrix( x ) || Matrix( x + 1 ) || Matrix( x + 1 );
				xlist2 = Matrix( N Cols( dtCorr ) + 1 - y ) || Matrix( N Cols( dtCorr ) + 1 - y + 1 ) ||
				Matrix( N Cols( dtCorr ) + 1 - y + 1 ) || Matrix( N Cols( dtCorr ) + 1 - y );
				Polygon( xlist1, xlist2 );
				// Draw a line around the square
				Line( xlist1, xlist2 );
			)
		);
		
		// Add the "*" for significant correlations, by going through the significant data table
		Text Color( "Black" );
		Text Size( 20 );
		
		For( i = 1, i <= N Rows( dtSig ), i++,
			If( dtSig:Signif Prob[i] <= .05,
				textList = {};
				Insert Into( textList, Loc( columnNamesList, dtSig:Variable[i] )[1] + .5 );
				Insert Into( textList, N Cols( dtCorr ) + 1 - Loc( columnNamesList, dtSig:by Variable[i] )[1] + .5 );
				
				Text( Center Justified, textList, "*" );
				textList = {};
				Insert Into( textList, Loc( columnNamesList, dtSig:by Variable[i] )[1] + .5 );
				Insert Into( textList, N Cols( dtCorr ) + 1 - Loc( columnNamesList, dtSig:Variable[i] )[1] + .5 );
				
				// Write the symbol in the middle of the square
				Text( Center Justified, textList, "*" );
			)
		);
	)
	
);
Jim