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-37071%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EHow%20JMP%20calculates%20confidence%20interval%20for%20a%20linear%20fit%20model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-37071%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EFor%20the%20following%20set%20of%20data%2C%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%3EX%3C%2FTD%3E%0A%3CTD%3EY%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E7.9%3C%2FTD%3E%0A%3CTD%3E115%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E13%3C%2FTD%3E%0A%3CTD%3E154%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E10.8%3C%2FTD%3E%0A%3CTD%3E156%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E11.6%3C%2FTD%3E%0A%3CTD%3E182%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E10.5%3C%2FTD%3E%0A%3CTD%3E124%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E11.1%3C%2FTD%3E%0A%3CTD%3E157%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E8.8%3C%2FTD%3E%0A%3CTD%3E129%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E11.9%3C%2FTD%3E%0A%3CTD%3E181%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E11.1%3C%2FTD%3E%0A%3CTD%3E164%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E9%3C%2FTD%3E%0A%3CTD%3E122%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E7.4%3C%2FTD%3E%0A%3CTD%3E100%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E6.9%3C%2FTD%3E%0A%3CTD%3E86.2%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E9.4%3C%2FTD%3E%0A%3CTD%3E118.9%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E7.2%3C%2FTD%3E%0A%3CTD%3E94.2%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E8.8%3C%2FTD%3E%0A%3CTD%3E114.3%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E7.1%3C%2FTD%3E%0A%3CTD%3E104.9%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E12.4%3C%2FTD%3E%0A%3CTD%3E181.5%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E12.1%3C%2FTD%3E%0A%3CTD%3E166.1%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E15.1%3C%2FTD%3E%0A%3CTD%3E166.1%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E14.2%3C%2FTD%3E%0A%3CTD%3E157.7%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eone%20can%20generate%20a%20linear%20fit%20model%20%26nbsp%3Bas%20shown%20below%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELinear%20Fit%3CBR%20%2F%3EY%20%3D%2024.522739%20%2B%2011.068566*X%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3ESummary%20of%20Fit%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3ERSquare%200.743712%3CBR%20%2F%3ERSquare%20Adj%200.729474%3CBR%20%2F%3ERoot%20Mean%20Square%20Error%2016.17783%3CBR%20%2F%3EMean%20of%20Response%20138.695%3CBR%20%2F%3EObservations%20(or%20Sum%20Wgts)%2020%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20question%20I%20have%20is%3A%20how%20should%20I%20go%20about%20and%26nbsp%3Bgenerate%20the%2099%25%20confidence%20intervals%20for%20the%20projected%20Y%20when%20X%20%3D%2011.8%20and%2012.7%3F%20Or%20even%20better%20if%20you%20could%20elaborate%20the%20details%20on%20how%26nbsp%3BJMP%20calculates%20the%20confidence%20intervals%20(such%20as%2C%2095%25%2C%2099%25)%20for%26nbsp%3Ba%26nbsp%3Blinear%20fit%20model.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMany%20thanks%20in%20advance!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-421251%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20How%20JMP%20calculate%20confidence%20interval%20for%20a%20linear%20fit%20model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-421251%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EThis%20forum%20is%20wonderful!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-45627%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20How%20JMP%20calculate%20confidence%20interval%20for%20a%20linear%20fit%20model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-45627%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EI%20think%20my%20JMP%20is%20an%20old%20versiont%26nbsp%3B(10.0)%20so%20that%20in%20my%20drop%20down%20menu%20it%20does%20not%20have%20%22%22Mean%20Confidence%20Limit%20formula%22%20or%20%22Indiv%20Confidence%20Limit%20Formula%22.%20Any%20suggestion%20how%20to%20get%20those%20Y%2BCI%20and%20Y-CI%20numbers%3F%20Thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-43414%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20How%20JMP%20calculate%20confidence%20interval%20for%20a%20linear%20fit%20model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-43414%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHere%20is%20a%20script%20that%20demonstrates%20how%20the%20covariance%20of%20the%20estimates%20is%20computed%20using%20your%20sample%20of%20data.%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20to%20Here(%201%20)%3B%0A%0A%2F%2F%20make%20example%20into%20data%20table%0Adt%20%3D%20New%20Table(%20%22Example%20for%20CI%20in%20Regression%22%2C%0A%20Add%20Rows(%2020%20)%2C%0A%20New%20Column(%20%22X%22%2C%0A%20%20Numeric%2C%0A%20%20%22Continuous%22%2C%0A%20%20Format(%20%22Best%22%2C%2012%20)%2C%0A%20%20Set%20Values(%0A%20%20%20%5B7.9%2C%2013%2C%2010.8%2C%2011.6%2C%2010.5%2C%2011.1%2C%208.8%2C%2011.9%2C%2011.1%2C%209%2C%207.4%2C%206.9%2C%209.4%2C%207.2%2C%0A%20%20%208.8%2C%207.1%2C%2012.4%2C%2012.1%2C%2015.1%2C%2014.2%5D%0A%20%20)%0A%20)%2C%0A%20New%20Column(%20%22Y%22%2C%0A%20%20Numeric%2C%0A%20%20%22Continuous%22%2C%0A%20%20Format(%20%22Best%22%2C%2012%20)%2C%0A%20%20Set%20Values(%0A%20%20%20%5B115%2C%20154%2C%20156%2C%20182%2C%20124%2C%20157%2C%20129%2C%20181%2C%20164%2C%20122%2C%20100%2C%2086.2%2C%20118.9%2C%0A%20%20%2094.2%2C%20114.3%2C%20104.9%2C%20181.5%2C%20166.1%2C%20166.1%2C%20157.7%5D%0A%20%20)%0A%20)%0A)%3B%0A%0A%2F%2F%20perform%20regression%20analysis%0Afls%20%3D%20dt%20%26lt%3B%26lt%3B%20Fit%20Model(%0A%20Y(%20%3AY%20)%2C%0A%20Effects(%20%3AX%20)%2C%0A%20Personality(%20%22Standard%20Least%20Squares%22%20)%2C%0A%20Emphasis(%20%22Minimal%20Report%22%20)%2C%0A%20Run(%0A%20%20%3AY%20%26lt%3B%26lt%3B%20%7BSummary%20of%20Fit(%201%20)%2C%20Analysis%20of%20Variance(%201%20)%2C%0A%20%20Parameter%20Estimates(%201%20)%2C%20Plot%20Actual%20by%20Predicted(%200%20)%2C%0A%20%20Plot%20Residual%20by%20Predicted(%200%20)%2C%20Plot%20Studentized%20Residuals(%200%20)%2C%0A%20%20Plot%20Effect%20Leverage(%200%20)%2C%20Box%20Cox%20Y%20Transformation(%200%20)%7D%0A%20)%0A)%3B%0A%0A%2F%2F%20obtain%20model%20matrix%20x%0Axx%20%3D%20fls%20%26lt%3B%26lt%3B%20Get%20X%20Matrix%3B%0A%0A%2F%2F%20compute%20covariance%20matrix%20of%20parameter%20estimates%0Acov%20est%20%3D%20Inverse(%20xx%60%20*%20xx%20)%3B%0A%0A%2F%2F%20display%20covariance%20matrix%0ANew%20Window(%20%22Estimates%20Covariance%22%2C%0A%20Outline%20Box(%20%22Covariance%20of%20Estimates%22%2C%0A%20%20Matrix%20Box(%20cov%20est%20)%0A%20)%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20first%20part%20of%20the%20script%20produces%20a%20data%20table%20with%20the%20data%20that%20you%20first%20provided.%20I%20use%20the%20Fit%20Least%20Squares%20platform%20to%20get%20the%20regression%20model%20matrix%20but%20it%20could%20also%20be%20made%20using%20matrix%20operations.%20Then%20it%20computes%20and%20displays%20the%20covariance%20matrix.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Capture.PNG%22%20style%3D%22width%3A%20246px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Capture.PNG%22%20style%3D%22width%3A%20246px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Capture.PNG%22%20style%3D%22width%3A%20246px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F7232i0E7DC8A2650D9360%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Capture.PNG%22%20alt%3D%22Capture.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EYou%20should%20recognize%20this%20matrix%20as%20the%20first%20argument%20in%20the%20Vec%20Quadratic()%20function%20in%20the%20column%20formula%20that%20you%20saved.%3C%2FP%3E%0A%3CP%3EThe%20covariance%20matrix%20is%20the%20inverse%20of%20the%20information%20matrix%20for%20the%20parameters%2C%20which%2C%20in%20turn%2C%20is%20the%26nbsp%3BTranspose(%20XX%20)%20*%20XX%2C%20where%20XX%20is%20the%20model%20matrix.%20XX%20has%20a%20column%20for%20every%20term%20in%20the%20linear%20model.%20In%20your%20example%2C%20the%20frist%26nbsp%3Bcolumn%20is%20%3CSTRONG%3E1%3C%2FSTRONG%3E%20to%20estimate%20the%20intercept%20(constant%20response)%20and%20the%20second%20column%20is%20the%20X%20data%20column%20from%20the%20data%20table%20(your%20predictor).%20If%20you%20included%26nbsp%3Bthe%20quadratic%20term%2C%20the%20third%20column%20of%20XX%20would%20be%20X%5E2%2C%20and%20so%20on.%26nbsp%3BThe%20response%20column%20Y%20is%20not%20involved.%3C%2FP%3E%0A%3CP%3EI%20hope%20that%20this%20example%20illustrates%20what%20the%20covariance%20matrix%20is%20and%20where%20it%20comes%20from.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-43344%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20How%20JMP%20calculate%20confidence%20interval%20for%20a%20linear%20fit%20model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-43344%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EThe%20covariance%20matrix%20for%20the%20estimates%26nbsp%3Bis%20not%20provided%20in%20the%20JMP%20reports%20for%20Bivariate%20or%20Fit%20Least%20Squares.%20(Fit%20Least%20Squares%20provides%20an%20optional%26nbsp%3Breport%20about%20the%20correlation%20of%20the%20estimates%2C%20but%20that%20information%20is%20not%20what%20you%20want.)%20It%20is%20not%20available%20through%20a%20menu%20command%2C%20either.%20It%20is%20available%20as%20the%20first%20argument%20to%20the%20Vec%20Quadratic()%20function%20when%20you%20save%20the%20formula%20for%20confidence%20intervals%2C%20as%20you%20already%20discovered.%3C%2FP%3E%0A%3CP%3EAll%20of%20the%20textbooks%20about%20linear%20regression%20methods%20that%20I%20know%20of%20cover%20the%20linear%20model%2C%20parameter%20estimation%2C%20interval%20estimation%2C%20covariance%20of%20the%20estimates%2C%20and%20more.%20I%20am%20sure%20that%20much%20of%20the%20same%20information%20is%20available%20on%20reliable%20Web%20sites%20if%20you%20don't%20have%20or%20do%20not%20want%20to%20procure%20one%20of%20these%20textbooks.%3C%2FP%3E%0A%3CP%3EGiven%20that%20you%20are%20using%20JMP%20and%20JMP%20already%20provides%20these%20intervals%20graphically%20and%20numerically%2C%20I%20don't%20understand%20why%20you%20want%20to%20go%20through%20of%20the%20explicit%20computations.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-43336%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20How%20JMP%20calculate%20confidence%20interval%20for%20a%20linear%20fit%20model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-43336%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EThanks%20Mark!%20But%20where%20in%20the%20JMP%20report%20can%20i%20actually%20see%20these%20values%20(other%20than%20the%20formula%20box%20I%20showed%20here).%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-43272%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20How%20JMP%20calculate%20confidence%20interval%20for%20a%20linear%20fit%20model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-43272%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ETaken%20directly%20from%20the%20description%20and%20explanation%20I%20just%20posted%2C%20it%20is%20a%20%22symmetric%20matrix%2C%22%20the%20%22inverse%20covariance%20matrix.%22%20It%20refers%20to%20the%20covariance%20of%20the%20parameter%20estimates%2C%20of%20course.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-43271%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20How%20JMP%20calculate%20confidence%20interval%20for%20a%20linear%20fit%20model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-43271%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EThanks%20Jeff%20and%20Mark%20for%20your%20very%20quick%20reply.%20I%20got%20that%20part.%20However%2C%20in%20my%20formula%2C%20I%20have%20(see%20attached)%200.395%2C%200.051%2C%20and%200.007%20inside%20first%20term%20in%20Vec%20Quadratic.%20I%20was%20wondering%20what%20these%20values%20represent%3F%200.051%20and%200.007%20have%20something%20to%20do%20with%20the%20slope%2C%20but%20not%20very%20sure.%20Again%2C%20thanks%20for%20your%26nbsp%3Bassistance.%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Capture.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Capture.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Capture.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F7201iE9AA68F243C9C9F5%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Capture.PNG%22%20alt%3D%22Capture.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-43267%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20How%20JMP%20calculate%20confidence%20interval%20for%20a%20linear%20fit%20model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-43267%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EYes%2C%20I%20can%20show%20you%20how%20JMP%20performs%20the%20Vec%20Quadratic()%20calculation.%20Here%20is%20a%20direct%20excerpt%20from%20the%20guide%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Capture.PNG%22%20style%3D%22width%3A%20701px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Capture.PNG%22%20style%3D%22width%3A%20701px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Capture.PNG%22%20style%3D%22width%3A%20701px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F7199i7206FA903EF25019%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Capture.PNG%22%20alt%3D%22Capture.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ESelect%20%3CSTRONG%3EHelp%3C%2FSTRONG%3E%20%26gt%3B%20%3CSTRONG%3EBooks%3C%2FSTRONG%3E%20%26gt%3B%20%3CSTRONG%3EScripting%20Guide%3C%2FSTRONG%3E.%20Then%20press%20%3CSTRONG%3ECTRL-F%3C%2FSTRONG%3E%20and%20enter%20%22%3CSTRONG%3Equadratic(%3C%2FSTRONG%3E%22%20for%20the%20search%20string.%20Very%20easy.%3C%2FP%3E%0A%3CP%3EUsing%20the%20same%20simple%20technique%2C%20I%20found%20the%20answer%20to%20your%20next%20question%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Capture.PNG%22%20style%3D%22width%3A%20662px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Capture.PNG%22%20style%3D%22width%3A%20662px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Capture.PNG%22%20style%3D%22width%3A%20662px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F7200iEFC6A2A454DEB08E%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Capture.PNG%22%20alt%3D%22Capture.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThis%20entry%20is%20right%20above%20the%20one%20for%20Vec%20Quadratic().%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-43266%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20How%20JMP%20calculate%20confidence%20interval%20for%20a%20linear%20fit%20model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-43266%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHelp-%26gt%3BScripting%20Index%20will%20tell%20you%20that%20%3CA%20href%3D%22http%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2F13-1%2FMatrix_Functions.shtml%232695056%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EVec%20Quadratic(S%2C%20X)%3C%2FA%3E%20is%20a%20evaluated%20as%20Vec%20Diag(X%20*S%20*%20X%60).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2F13-1%2FMatrix_Functions.shtml%232695045%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EVec%20Diag(X)%3C%2FA%3E%20returns%20the%20diagonal%20elements%20of%20the%20square%20matrix%20as%20a%20vector.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-43263%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20How%20JMP%20calculate%20confidence%20interval%20for%20a%20linear%20fit%20model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-43263%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EI%20can't%20answer%20your%20second%20question%20about%20which%20kind%20of%20interval%20is%20appropriate%20because%20you%26nbsp%3B%20have%20not%20stated%20how%20you%20would%20use%20or%20interpret%20the%20interval.%20They%20are%20both%20appropriate%20but%20for%20different%20questions.%20It%20depends%20on%20the%20alternative%20hypothesis%20you%20are%20trying%20to%20test.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-43250%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20How%20JMP%20calculate%20confidence%20interval%20for%20a%20linear%20fit%20model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-43250%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EHI%20Mark!%3CBR%20%2F%3E%3CBR%20%2F%3ECan%20you%20show%20how%20JMP%20performs%20Vec%20Quadratic%20calculation%3F%20I%20am%20looking%20for%20a%20generic%20equation%20that%20JMP%20uses%20to%20calculate%20prediction%20interval%20for%20OLS.%20Thanks%3CBR%20%2F%3E%3CBR%20%2F%3ERam%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-37113%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20How%20JMP%20calculate%20confidence%20interval%20for%20a%20linear%20fit%20model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-37113%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EThanks%20for%20the%20detailed%20explanation!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-37112%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20How%20JMP%20calculate%20confidence%20interval%20for%20a%20linear%20fit%20model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-37112%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ESecond%20answer%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ENo%2C%20it%26nbsp%3Bis%20not%20more%20appropriate%20to%20use%20the%20prediction%20interval%20if%20you%20are%20estimating%20or%20testing%20the%20expected%20value%20(or%20mean)%20of%20the%20response%20with%20an%20interval.%3C%2FLI%3E%0A%3CLI%3EYes%2C%20it%20is%20more%20appropriate%20to%20use%20the%20prediction%20interval%20if%20you%20are%20estimating%20a%20proportion%20of%20the%20population.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EThey%20are%20both%20correct%20and%20both%20appropriate%2C%20depending%20on%20what%20you%20want%20to%20estimate%20or%20test.%20They%20answer%20different%20questions.%20They%20are%20not%20used%20for%20the%20same%20purpose.%20The%20former%20is%20for%20the%20statistic%20and%20the%20latter%20is%20for%20the%20data.%3C%2FP%3E%0A%3CP%3EBTW%2C%20you%20can%20easily%20visualize%20either%20one%20or%20both%20of%20these%20intervals%20when%20you%20fit%20the%20line%20in%20Bivariate.%20Use%20same%20menu%20under%20the%20plot%20and%20select%20%3CSTRONG%3EConfid%20Shaded%20Fit%3C%2FSTRONG%3E%20or%20%3CSTRONG%3EConfid%20Shaded%20Indiv%3C%2FSTRONG%3E.%20One%20is%20related%20to%20the%20uncertainty%20in%20the%20sample%20statistic%20(regression%20line)%20and%20the%20other%20is%20related%20to%20the%20uncertainty%20of%20individual%20observations.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-37110%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20How%20JMP%20calculate%20confidence%20interval%20for%20a%20linear%20fit%20model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-37110%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EThanks%20for%20the%20speedy%20feedback%2C%20Mark!%20BTW%2C%20could%20you%20please%20comment%20on%20my%202nd%20question%3A%20indiv%20or%20mean%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-37108%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20How%20JMP%20calculate%20confidence%20interval%20for%20a%20linear%20fit%20model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-37108%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EThe%20%3CSTRONG%3EVec%20Quadratic()%3C%2FSTRONG%3E%20function%20is%20an%20optimized%20way%20to%20perform%20the%20matrix%20computations%26nbsp%3Bbefore%20applying%20the%20scalar%20multipliers.%3C%2FP%3E%0A%3CP%3EYou%20want%20a%20two-sided%2099%25%20confidence%20interval%2C%20so%20the%20probability%20cutoff%20on%20each%20tail%20is%200.005%25.%20This%20calculation%26nbsp%3Bwith%20the%20given%2018%20degrees%20of%20freedom%20for%20the%20error%20indicates%20the%20correct%20multiplier%3A%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3Et%20Quantile(%200.995%2C%2018%20)%20-%26gt%3B%26nbsp%3B2.87844047273861%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3ENote%20that%20you%20can%20select%20Graph%20%26gt%3B%20Profiler%20and%20enter%20all%20three%20of%20the%20formula%20columns.%20You%20can%20now%20change%20X%20by%20dragging%20or%20typing%20over%20the%20current%20value%20(in%20red)%20and%20entering%20an%20exact%20value.%20The%20profilers%20will%20give%20the%20point%20estimates%2C%20lower%20and%20upper%20bounds.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-37102%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20How%20JMP%20calculate%20confidence%20interval%20for%20a%20linear%20fit%20model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-37102%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EThanks%20for%20the%20reply!%20This%20was%20what%20I%20did.%20However%2C%20I%20was%20puzzled%20by%20the%20Vec%20Quadratic%20term%20in%20the%20formula%20as%20shown%20belown%20and%20also%20I%20was%20expecting%202.576%20multiplying%20the%20standard%20error%26nbsp%3B(for%2099%25%20confidence%20interval%20calculation%20instead%20of%202.878%20or%201.96%20for%2095%25%20confidence%20interval%20calculation)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E(24.5227390655596%20%2B%2011.0685662563684%20*%20%3AX)%20-%202.87844047273861%20*%3CBR%20%2F%3ESqrt(%3CBR%20%2F%3EVec%20Quadratic(%3CBR%20%2F%3E%5B1.00352196297906%20-0.0924403260280234%2C%20-0.0924403260280234%3CBR%20%2F%3E0.00896173786020585%5D%2C%3CBR%20%2F%3E%5B1%5D%20%7C%7C%20%3AX%3CBR%20%2F%3E)%20*%20261.722077754035%3CBR%20%2F%3E)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E2nd%20quesition%3A%20is%20it%20more%20appropriate%20to%20use%20Indiv%20Confidence%20Limit%20Formula%20than%20Mean%20Confidence%20Limit%20Formula%3F%20If%20not%2C%20why%20so%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-37078%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20How%20JMP%20calculate%20confidence%20interval%20for%20a%20linear%20fit%20model%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-37078%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHi!%3C%2FP%3E%3CP%3Eto%20get%20the%20predicted%20values%20and%20confidence%20intervals%20you%20would%20do%20the%20following%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22ci.png%22%20style%3D%22width%3A%20623px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ci.png%22%20style%3D%22width%3A%20623px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ci.png%22%20style%3D%22width%3A%20623px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F5552iA3B039EB383AA9E5%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22ci.png%22%20alt%3D%22ci.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3COL%3E%3CLI%3EUse%20the%20hotspot%20(red%20triangle)%20next%20to%20%22Linear%20Fit%22.%26nbsp%3B%3C%2FLI%3E%3CLI%3EYou%20will%20find%20a%20menu%20entry%20%22Set%20alpha%20Level%22.%20Set%20this%20to%201%25%20if%20you%20are%20interested%20in%2099%25%20confidence.%3C%2FLI%3E%3CLI%3ENow%20use%20the%20same%20menu%20and%20choose%20%22Save%20predicteds%22%20and%20%22Mean%20Confidence%20Limit%20formula%22%20(or%20%22Indiv%20Confidence%20Limit%20Formula).%3C%2FLI%3E%3CLI%3EAs%20a%20result%20you%20will%20find%203%20new%20columns%20in%20the%20data%20table.%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22data.PNG%22%20style%3D%22width%3A%20985px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22data.PNG%22%20style%3D%22width%3A%20985px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22data.PNG%22%20style%3D%22width%3A%20985px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F5553i70D44596CFFAF8BD%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22data.PNG%22%20alt%3D%22data.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETo%20see%20how%20jmp%20calculates%20the%20prediction%2FCIs%20you%20could%20just%20klick%20on%20the%20%22%2B%22-symbol%20on%20the%20left%20hand%20side%20(next%20to%20the%20column%20names).%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3ETo%20get%20the%20prediction%20and%20CI%20for%20specific%20values%20of%20X%20you%20would%20just%20add%20new%20rows%26nbsp%3B(like%20it%20did%20in%20the%20picture%20above%3A%20Row%2021%20and%2022).%20JMP%20will%20automatically%20generate%20the%20predictions%20and%20CI-values%20for%20the%20X-values%20you%20enter.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20that%20helps.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
ILoveJMP
Level III

How JMP calculates confidence interval for a linear fit model

For the following set of data, 

 

X Y
7.9 115
13 154
10.8 156
11.6 182
10.5 124
11.1 157
8.8 129
11.9 181
11.1 164
9 122
7.4 100
6.9 86.2
9.4 118.9
7.2 94.2
8.8 114.3
7.1 104.9
12.4 181.5
12.1 166.1
15.1 166.1
14.2 157.7

 

one can generate a linear fit model  as shown below:

 

Linear Fit
Y = 24.522739 + 11.068566*X


Summary of Fit


RSquare 0.743712
RSquare Adj 0.729474
Root Mean Square Error 16.17783
Mean of Response 138.695
Observations (or Sum Wgts) 20

 

The question I have is: how should I go about and generate the 99% confidence intervals for the projected Y when X = 11.8 and 12.7? Or even better if you could elaborate the details on how JMP calculates the confidence intervals (such as, 95%, 99%) for a linear fit model.

 

Many thanks in advance!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How JMP calculate confidence interval for a linear fit model

Second answer:

  • No, it is not more appropriate to use the prediction interval if you are estimating or testing the expected value (or mean) of the response with an interval.
  • Yes, it is more appropriate to use the prediction interval if you are estimating a proportion of the population.

They are both correct and both appropriate, depending on what you want to estimate or test. They answer different questions. They are not used for the same purpose. The former is for the statistic and the latter is for the data.

BTW, you can easily visualize either one or both of these intervals when you fit the line in Bivariate. Use same menu under the plot and select Confid Shaded Fit or Confid Shaded Indiv. One is related to the uncertainty in the sample statistic (regression line) and the other is related to the uncertainty of individual observations.

View solution in original post

17 REPLIES 17
shoffmeister
Level V

Re: How JMP calculate confidence interval for a linear fit model

Hi!

to get the predicted values and confidence intervals you would do the following: 

 

ci.png

  1. Use the hotspot (red triangle) next to "Linear Fit". 
  2. You will find a menu entry "Set alpha Level". Set this to 1% if you are interested in 99% confidence.
  3. Now use the same menu and choose "Save predicteds" and "Mean Confidence Limit formula" (or "Indiv Confidence Limit Formula).
  4. As a result you will find 3 new columns in the data table. data.PNG

     

    To see how jmp calculates the prediction/CIs you could just klick on the "+"-symbol on the left hand side (next to the column names).

  5. To get the prediction and CI for specific values of X you would just add new rows (like it did in the picture above: Row 21 and 22). JMP will automatically generate the predictions and CI-values for the X-values you enter.

     

     

 

Hope that helps.

ILoveJMP
Level III

Re: How JMP calculate confidence interval for a linear fit model

Thanks for the reply! This was what I did. However, I was puzzled by the Vec Quadratic term in the formula as shown belown and also I was expecting 2.576 multiplying the standard error (for 99% confidence interval calculation instead of 2.878 or 1.96 for 95% confidence interval calculation)

 

(24.5227390655596 + 11.0685662563684 * :X) - 2.87844047273861 *
Sqrt(
Vec Quadratic(
[1.00352196297906 -0.0924403260280234, -0.0924403260280234
0.00896173786020585],
[1] || :X
) * 261.722077754035
)

 

2nd quesition: is it more appropriate to use Indiv Confidence Limit Formula than Mean Confidence Limit Formula? If not, why so?

 

Thanks!

Re: How JMP calculate confidence interval for a linear fit model

The Vec Quadratic() function is an optimized way to perform the matrix computations before applying the scalar multipliers.

You want a two-sided 99% confidence interval, so the probability cutoff on each tail is 0.005%. This calculation with the given 18 degrees of freedom for the error indicates the correct multiplier:

t Quantile( 0.995, 18 ) -> 2.87844047273861

Note that you can select Graph > Profiler and enter all three of the formula columns. You can now change X by dragging or typing over the current value (in red) and entering an exact value. The profilers will give the point estimates, lower and upper bounds.

ILoveJMP
Level III

Re: How JMP calculate confidence interval for a linear fit model

Thanks for the speedy feedback, Mark! BTW, could you please comment on my 2nd question: indiv or mean?

Re: How JMP calculate confidence interval for a linear fit model

I can't answer your second question about which kind of interval is appropriate because you  have not stated how you would use or interpret the interval. They are both appropriate but for different questions. It depends on the alternative hypothesis you are trying to test.

Re: How JMP calculate confidence interval for a linear fit model

HI Mark!

Can you show how JMP performs Vec Quadratic calculation? I am looking for a generic equation that JMP uses to calculate prediction interval for OLS. Thanks

Ram
Jeff_Perkinson
Community Manager Community Manager

Re: How JMP calculate confidence interval for a linear fit model

Help->Scripting Index will tell you that Vec Quadratic(S, X) is a evaluated as Vec Diag(X *S * X`).

 

Vec Diag(X) returns the diagonal elements of the square matrix as a vector.

 

 

-Jeff

Re: How JMP calculate confidence interval for a linear fit model

Thanks Jeff and Mark for your very quick reply. I got that part. However, in my formula, I have (see attached) 0.395, 0.051, and 0.007 inside first term in Vec Quadratic. I was wondering what these values represent? 0.051 and 0.007 have something to do with the slope, but not very sure. Again, thanks for your assistance. Capture.PNG

Re: How JMP calculate confidence interval for a linear fit model

Taken directly from the description and explanation I just posted, it is a "symmetric matrix," the "inverse covariance matrix." It refers to the covariance of the parameter estimates, of course.