cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
%3CLINGO-SUB%20id%3D%22lingo-sub-542415%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E8%87%AA%E5%8B%95%E5%B0%87%E9%A0%90%E6%B8%AC%E6%96%B9%E7%A8%8B%E5%BC%8F%E5%84%B2%E5%AD%98%E5%88%B0%E8%B3%87%E6%96%99%E8%A1%A8%E4%B8%AD%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-542415%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E5%A4%A7%E5%AE%B6%E5%A5%BD%EF%BC%8C%3C%2FP%3E%0A%3CP%3E%E6%88%91%E6%AD%A3%E5%9C%A8%E4%BD%BF%E7%94%A8%E6%93%AC%E5%90%88%E6%A8%A1%E5%9E%8B%E5%B7%A5%E5%85%B7%E7%82%BA%E6%9F%90%E5%80%8B%E8%B3%87%E6%96%99%E5%AD%90%E9%9B%86%E5%BB%BA%E7%AB%8B%E6%93%AC%E5%90%88%E6%96%B9%E7%A8%8B%EF%BC%8C%E7%84%B6%E5%BE%8C%E5%B0%87%E5%85%B6%E6%87%89%E7%94%A8%E5%9B%9E%E6%9B%B4%E5%A4%A7%E7%9A%84%E9%9B%86%E5%90%88%E4%B8%A6%E6%B8%AC%E9%87%8F%E9%A0%90%E6%B8%AC%E5%80%BC%E5%92%8C%E5%AF%A6%E9%9A%9B%E5%80%BC%E4%B9%8B%E9%96%93%E7%9A%84%20RMS%20%E5%80%BC%E3%80%82%20%E6%88%91%E6%9C%89%20231%20%E5%80%8B%E7%8D%A8%E7%89%B9%E7%9A%84%E6%A8%A3%E6%9C%AC%EF%BC%88%E6%A8%99%E8%A8%98%E7%82%BA%20RunID%EF%BC%89%EF%BC%8C%E5%9C%A8%E6%AF%8F%E5%80%8B%E6%A8%A3%E6%9C%AC%E4%B8%AD%E6%88%91%E6%9C%89%202%20%E5%80%8B%E6%AD%A3%E5%9C%A8%E8%A9%95%E4%BC%B0%E7%9A%84%E4%B8%8D%E5%90%8C%E9%80%9A%E9%81%93%E3%80%82%20%E9%80%99%E5%B0%8E%E8%87%B4%E7%B8%BD%E5%85%B1%20436%20%E5%80%8B%E6%93%AC%E5%90%88%E6%96%B9%E7%A8%8B%E5%BC%8F%E3%80%82%20%E6%88%91%E4%BD%BF%E7%94%A8%E2%80%9C%E6%93%AC%E5%90%88%E6%A8%A1%E5%9E%8B%E2%80%9D%E5%B7%A5%E5%85%B7%E5%89%B5%E5%BB%BA%20436%20%E5%80%8B%E6%96%B9%E7%A8%8B%EF%BC%8C%E4%B8%A6%E4%B8%94%E5%8F%AF%E4%BB%A5%E6%89%8B%E5%8B%95%E6%AA%A2%E6%9F%A5%E6%AF%8F%E5%80%8B%E8%BC%B8%E5%87%BA%E4%B8%A6%E5%B0%87%E6%AF%8F%E5%80%8B%E6%96%B9%E7%A8%8B%E4%BF%9D%E5%AD%98%E5%88%B0%E8%B3%87%E6%96%99%E8%A1%A8%E4%B8%AD%E7%9A%84%E5%88%97%E4%B8%AD%E3%80%82%20%E7%84%B6%E5%BE%8C%EF%BC%8C%E6%88%91%E5%B0%87%E8%A9%B2%E5%88%97%E7%9A%84%E5%85%AC%E5%BC%8F%E8%A4%87%E8%A3%BD%E4%B8%A6%E8%B2%BC%E4%B8%8A%E5%9B%9E%E6%9B%B4%E5%A4%A7%E7%9A%84%E8%B3%87%E6%96%99%E9%9B%86%E4%B8%AD%EF%BC%8C%E4%B8%A6%E6%B8%AC%E9%87%8F%E3%80%8C%E9%A0%90%E6%B8%AC%E8%88%87%E5%AF%A6%E9%9A%9B%E3%80%8D%E3%80%82%20%E6%88%91%E4%B8%8D%E6%83%B3%E6%89%8B%E5%8B%95%E6%8F%92%E5%85%A5%E6%96%B9%E7%A8%8B%EF%BC%8C%E4%BC%BC%E4%B9%8E%E5%B7%B2%E7%B6%93%E7%99%BC%E5%B8%83%E4%BA%86%E5%B9%BE%E5%80%8B%E8%A7%A3%E6%B1%BA%E6%96%B9%E6%A1%88%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FDiscussions%2FHow-to-Save-prediction-formula-for-different-categories-when%2Ftd-p%2F77409%22%20target%3D%22_self%22%3E%E9%80%99%E8%A3%A1%3C%2FA%3E%E5%92%8C%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FDiscussions%2FHow-to-get-equation-from-fit-model%2Ftd-p%2F38180%22%20target%3D%22_self%22%3E%E9%80%99%E8%A3%A1%3C%2FA%3E%EF%BC%8C%E4%BD%86%E6%88%91%E4%BC%BC%E4%B9%8E%E7%84%A1%E6%B3%95%E8%AE%93%E5%85%B6%E4%B8%AD%E4%BB%BB%E4%BD%95%E4%B8%80%E5%80%8B%E5%B7%A5%E4%BD%9C%E3%80%82%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%E9%80%99%E6%98%AF%E6%88%91%E6%89%80%E6%93%81%E6%9C%89%E7%9A%84%EF%BC%9A%3C%2FP%3E%0A%3CP%3EJMP%20%E7%89%88%E6%9C%AC%EF%BC%9A16%3C%2FP%3E%0A%3CP%3E%E6%88%91%E8%A9%A6%E5%9C%96%E5%BE%9E%20Xoffset%20%E5%92%8C%20Yoffset%20%E4%BD%8D%E7%BD%AE%E9%A0%90%E6%B8%AC%20Zoffset%EF%BC%8C%E6%89%80%E4%BB%A5%E6%88%91%E6%87%89%E8%A9%B2%E7%82%BA%E6%AF%8F%E5%80%8B%E3%80%8CRunID%2FChannel%E3%80%8D%E7%B5%84%E5%90%88%E5%BE%97%E5%88%B0%E4%B8%80%E5%80%8B%E6%96%B9%E7%A8%8B%E5%BC%8F%E3%80%82%3C%2FP%3E%0A%3CP%3E%E7%95%B6%E6%88%91%E9%81%8B%E8%A1%8C%E4%B8%8B%E9%9D%A2%E7%9A%84%E8%85%B3%E6%9C%AC%E6%99%82%EF%BC%8C%E6%88%91%E5%BE%97%E5%88%B0%EF%BC%9A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22rlangsner_0-1662664451338.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22rlangsner_0-1662664451338.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22rlangsner_0-1662664451338.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F45315iC5128B6031A1930D%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22rlangsner_0-1662664451338.png%22%20alt%3D%22rlangsner_0-1662664451338.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%E6%88%91%E5%8F%AA%E6%98%AF%E8%A4%87%E8%A3%BD%E4%B8%8A%E9%9D%A2%E9%80%A3%E7%B5%90%E7%9A%84%E6%96%B9%E6%B3%95%EF%BC%8C%E4%BD%86%E6%88%91%E7%9A%84%E7%A8%8B%E5%BC%8F%E7%A2%BC%E4%B8%AD%E4%B8%80%E5%AE%9A%E6%9C%89%E4%B8%80%E4%BA%9B%E4%B8%8D%E5%90%8C%E7%9A%84%E5%9C%B0%E6%96%B9%EF%BC%8C%E4%B8%8D%E5%A4%AA%E4%B8%80%E8%87%B4%E3%80%82%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Eobj%20%3D%20Fit%20Model(%0A%20Y(%3AZOffset)%2C%0A%20By(%3ARunID%2C%20%3AChannel%20Only%20Location)%2C%0A%20Effects(%0A%20%20%3AXOffset%2C%20%3AXOffset%20*%20%3AXOffset%2C%20%3AXOffset%20*%20%3AXOffset%20*%20%3AXOffset%2C%20%3AYOffset%2C%20%3AYOffset%20*%20%3AYOffset%2C%0A%20%20%3AYOffset%20*%20%3AYOffset%20*%20%3AYOffset%2C%20%3AXOffset%20*%20%3AYOffset%0A%20)%2C%0A%20Personality(%22Standard%20Least%20Squares%22)%2C%0A%20Emphasis(%22Minimal%20Report%22)%2C%0A%20Run(%0A%20%20%3AZOffset%20%26lt%3B%26lt%3B%20%7BSummary%20of%20Fit(1)%2C%20Analysis%20of%20Variance(1)%2C%20Parameter%20Estimates(1)%2C%20Lack%20of%20Fit(0)%2C%20Scaled%20Estimates(0)%2C%0A%20%20Plot%20Actual%20by%20Predicted(0)%2C%20Plot%20Regression(0)%2C%20Plot%20Residual%20by%20Predicted(0)%2C%20Plot%20Studentized%20Residuals(0)%2C%0A%20%20Plot%20Effect%20Leverage(0)%2C%20Plot%20Residual%20by%20Normal%20Quantiles(0)%2C%20Box%20Cox%20Y%20Transformation(0)%7D%0A%20)%0A)%3B%0Aobj%20%26lt%3B%26lt%3B%20(Fit%5B1%5D%20%26lt%3B%26lt%3B%20Save%20Prediction%20Formula)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-542415%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3E%E8%B3%87%E6%96%99%E6%B7%B7%E5%90%88%E8%88%87%E6%B8%85%E7%90%86%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E%E6%95%B8%E6%93%9A%E6%8E%A2%E7%B4%A2%E5%92%8C%E8%A6%96%E8%A6%BA%E5%8C%96%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E%E5%A4%A7%E8%A6%8F%E6%A8%A1%E5%AE%A2%E8%A3%BD%E5%8C%96%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-542679%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E8%A6%86%EF%BC%9A%E8%87%AA%E5%8B%95%E5%B0%87%E9%A0%90%E6%B8%AC%E6%96%B9%E7%A8%8B%E5%BC%8F%E5%84%B2%E5%AD%98%E5%88%B0%E8%B3%87%E6%96%99%E8%A1%A8%E4%B8%AD%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-542679%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E8%A6%AA%E6%84%9B%E7%9A%84%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F43473%22%20target%3D%22_blank%22%3E%40rlangsner%3C%2FA%3E%20%EF%BC%8C%E9%99%A4%E4%BA%86%20Jarmo%20%E4%B9%8B%E5%A4%96%EF%BC%8C%E8%AB%8B%E6%B3%A8%E6%84%8F%EF%BC%8C%E5%A6%82%E6%9E%9C%E4%BD%BF%E7%94%A8%20by%20group%EF%BC%8C%E9%81%8B%E8%A1%8C%E6%A8%A1%E5%9E%8B%E7%9A%84%E8%BF%94%E5%9B%9E%E6%98%AF%E4%B8%80%E5%80%8B%E5%88%97%E8%A1%A8%EF%BC%8C%E8%AB%8B%E5%8F%83%E8%A6%8B%E4%B8%8B%E9%9D%A2%E7%9A%84%E7%AF%84%E4%BE%8B%E3%80%82%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0A%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FBig%20Class.jmp%22%20)%3B%0A%0Aobj%20%3D%20dt%20%26lt%3B%26lt%3B%20fit%20model(%20Y(%20%3Aweight%20)%2C%20effects(%20%3Aage%2C%20%3Aheight%20)%2C%20Personality(%20%22Standard%20Least%20Squares%22%20))%3B%0Amod1%20%3D%20obj%20%26lt%3B%26lt%3B%20run%3B%0Amod1%20%26lt%3B%26lt%3B%20prediction%20formula%3B%0A%0Aobj_by%20%3D%20dt%20%26lt%3B%26lt%3B%20fit%20model(%20Y(%20%3Aweight%20)%2C%20by(%20%3Asex%20)%2C%20effects(%20%3Aage%2C%20%3Aheight%20)%2C%20Personality(%20%22Standard%20Least%20Squares%22%20)%20)%3B%0Amod2%20%3D%20obj_by%20%26lt%3B%26lt%3B%20run%3B%0AFor%20Each(%20%7Bvalue%7D%2C%20mod2%2C%20value%20%26lt%3B%26lt%3B%20prediction%20formula%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-542611%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E8%A6%86%EF%BC%9A%E8%87%AA%E5%8B%95%E5%B0%87%E9%A0%90%E6%B8%AC%E6%96%B9%E7%A8%8B%E5%BC%8F%E5%84%B2%E5%AD%98%E5%88%B0%E8%B3%87%E6%96%99%E8%A1%A8%E4%B8%AD%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-542611%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E5%97%A8%EF%BC%8C%E8%B3%88%E8%8E%AB%EF%BC%8C%3C%2FP%3E%3CP%3E%E8%AC%9D%E8%AC%9D%E3%80%82%20%E6%88%91%E6%9B%B4%E6%96%B0%E4%BA%86%E8%85%B3%E6%9C%AC%EF%BC%8C%E5%8F%AA%E9%9C%80%E8%AA%AA%E2%80%9Cobj%20%26lt%3B%26lt%3B%E9%A0%90%E6%B8%AC%E5%85%AC%E5%BC%8F%E2%80%9D%EF%BC%8C%E7%84%B6%E5%BE%8C%E5%B0%87%E8%B3%87%E8%A8%8A%E4%BF%9D%E5%AD%98%E5%88%B0%E6%88%91%E7%9A%84%E8%B3%87%E6%96%99%E9%9B%86%E4%B8%AD%E7%9A%84%E6%96%B0%E5%88%97%E4%B8%AD%E3%80%82%E9%80%99%E6%98%AF%E6%88%91%E7%9A%84%E4%B8%8B%E6%8B%89%E6%B8%85%E5%96%AE%E4%B8%AD%E7%9A%84%E9%81%B8%E9%A0%85%EF%BC%9A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22rlangsner_0-1662668359052.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22rlangsner_0-1662668359052.png%22%20style%3D%22width%3A%20378px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22rlangsner_0-1662668359052.png%22%20style%3D%22width%3A%20378px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F45326i39325B066A093F25%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22rlangsner_0-1662668359052.png%22%20alt%3D%22rlangsner_0-1662668359052.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-542474%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E8%A6%86%EF%BC%9A%E8%87%AA%E5%8B%95%E5%B0%87%E9%A0%90%E6%B8%AC%E6%96%B9%E7%A8%8B%E5%BC%8F%E5%84%B2%E5%AD%98%E5%88%B0%E8%B3%87%E6%96%99%E8%A1%A8%E4%B8%AD%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-542474%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E6%82%A8%E5%8F%AF%E8%83%BD%E5%BF%85%E9%A0%88%E4%BD%BF%E7%94%A8%E4%B8%8D%E5%90%8C%E7%9A%84%E8%A8%8A%E6%81%AF%E3%80%82%20%E6%AA%A2%E6%9F%A5%E6%82%A8%E5%BE%9E%E7%B4%85%E8%89%B2%E5%B0%8F%E4%B8%89%E8%A7%92%E9%81%B8%E5%96%AE%E4%B8%AD%E7%8D%B2%E5%BE%97%E5%93%AA%E4%BA%9B%E9%81%B8%E9%A0%85%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22jthi_0-1662665619097.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1662665619097.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1662665619097.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F45320i2C3FCCA8DF2FB0FC%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22jthi_0-1662665619097.png%22%20alt%3D%22jthi_0-1662665619097.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(1)%3B%0Adt%20%3D%20Open(%22%24SAMPLE_DATA%2FAnimals.jmp%22)%3B%0A%0Aobj%20%3D%20dt%20%26lt%3B%26lt%3B%20Fit%20Model(%0A%20Y(%3Amiles)%2C%0A%20Effects(%3Aspecies%2C%20%3Asubject%5B%3Aspecies%5D%20%26amp%3B%20Random%2C%20%3Aseason%2C%20%3Aspecies%20*%20%3Aseason)%2C%0A%20Personality(Standard%20Least%20Squares)%2C%0A%20Run(%0A%20%20%3AZOffset%20%26lt%3B%26lt%3B%20%7BSummary%20of%20Fit(1)%2C%20Analysis%20of%20Variance(1)%2C%20Parameter%20Estimates(1)%2C%20Lack%20of%20Fit(0)%2C%20Scaled%20Estimates(0)%2C%0A%20%20Plot%20Actual%20by%20Predicted(0)%2C%20Plot%20Regression(0)%2C%20Plot%20Residual%20by%20Predicted(0)%2C%20Plot%20Studentized%20Residuals(0)%2C%0A%20%20Plot%20Effect%20Leverage(0)%2C%20Plot%20Residual%20by%20Normal%20Quantiles(0)%2C%20Box%20Cox%20Y%20Transformation(0)%7D%0A%20)%0A)%3B%0A%0Aobj%20%26lt%3B%26lt%3B%20Prediction%20Formula%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
rlangsner
Level II

Saving Prediction Equations into Data Table Automatically

Hi all,

I am using the fit model tool to create fit equations for a certain subset of data that I would then like to apply back to a larger set and measure the RMS value between the predicted and actual value. I have 231 unique samples (labeled as RunID) and within each sample I have 2 different channels that I am evaluating. This leads to 436 total fit equations. I use the Fit Model tool to create the 436 equations and I can manually go through each output and save each of the equations to a column in the data table. I then copy and paste the formula for that column back into my larger data set and measure the "predicted vs actual". I would like to not manually insert the equations and it seems like there are a couple of solutions that have been posted here and here, but I can't seem to get either of these to work. 

 

Here is what I have:

JMP Version: 16

I am trying to predict the Zoffset from the Xoffset and Yoffset positions, so I should be getting an equation for each "RunID/Channel" combination. 

When I run the script below I get this:

rlangsner_0-1662664451338.png

I was just copying the approaches linked above, but there must be somethign different in my code that does not quite line up. 

 

obj = Fit Model(
	Y(:ZOffset),
	By(:RunID, :Channel Only Location),
	Effects(
		:XOffset, :XOffset * :XOffset, :XOffset * :XOffset * :XOffset, :YOffset, :YOffset * :YOffset,
		:YOffset * :YOffset * :YOffset, :XOffset * :YOffset
	),
	Personality("Standard Least Squares"),
	Emphasis("Minimal Report"),
	Run(
		:ZOffset << {Summary of Fit(1), Analysis of Variance(1), Parameter Estimates(1), Lack of Fit(0), Scaled Estimates(0),
		Plot Actual by Predicted(0), Plot Regression(0), Plot Residual by Predicted(0), Plot Studentized Residuals(0),
		Plot Effect Leverage(0), Plot Residual by Normal Quantiles(0), Box Cox Y Transformation(0)}
	)
);
obj << (Fit[1] << Save Prediction Formula);
3 REPLIES 3
jthi
Super User

Re: Saving Prediction Equations into Data Table Automatically

You might have to use different message. Check what options you get from red triangle menu

jthi_0-1662665619097.png

 

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Animals.jmp");

obj = dt << Fit Model(
	Y(:miles),
	Effects(:species, :subject[:species] & Random, :season, :species * :season),
	Personality(Standard Least Squares),
	Run(
		:ZOffset << {Summary of Fit(1), Analysis of Variance(1), Parameter Estimates(1), Lack of Fit(0), Scaled Estimates(0),
		Plot Actual by Predicted(0), Plot Regression(0), Plot Residual by Predicted(0), Plot Studentized Residuals(0),
		Plot Effect Leverage(0), Plot Residual by Normal Quantiles(0), Box Cox Y Transformation(0)}
	)
);

obj << Prediction Formula;
-Jarmo
rlangsner
Level II

Re: Saving Prediction Equations into Data Table Automatically

Hi Jarmo,

Thank you. I updated the scripto just say "obj << Prediction Formula" and that saved the information to a new column in my data set.  Here is what the options were in my dropdown:

rlangsner_0-1662668359052.png

 

Georg
Level VII

Re: Saving Prediction Equations into Data Table Automatically

Dear @rlangsner , in addition to Jarmo, please notify, that the return of run model is a list in case of using a by group, see below example.

Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

obj = dt << fit model( Y( :weight ), effects( :age, :height ), Personality( "Standard Least Squares" ));
mod1 = obj << run;
mod1 << prediction formula;

obj_by = dt << fit model( Y( :weight ), by( :sex ), effects( :age, :height ), Personality( "Standard Least Squares" ) );
mod2 = obj_by << run;
For Each( {value}, mod2, value << prediction formula );
Georg