cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-381181%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%E3%81%A8EWMA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-381181%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF%3C%2FP%3E%3CP%3E%E6%95%B0%E5%80%A4%E3%82%92%E5%90%AB%E3%82%80%E5%88%97%E3%81%8C%E4%B8%8E%E3%81%88%E3%82%89%E3%82%8C%E3%81%9F%E5%A0%B4%E5%90%88%E3%80%81%E6%AC%A1%E3%81%AE%E6%96%B9%E6%B3%95%E3%81%A7%20MA%20%E3%82%92%E8%A8%88%E7%AE%97%E3%81%97%E3%81%9F%E3%81%84%E3%81%A8%E6%80%9D%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3EMAi%3D1%2FN*SUM(j%3Di-1%EF%BD%9Ej%3Diw)%20Xj%3C%2FP%3E%3CP%3E%E3%81%93%E3%81%93%E3%81%A7%E3%80%81w%20%E3%81%AF%E3%82%A6%E3%82%A3%E3%83%B3%E3%83%89%E3%82%A6%E3%81%AE%E5%B9%85%E3%80%81i-1%20%E3%81%AF%E9%96%8B%E5%A7%8B%E8%A6%81%E7%B4%A0%E3%80%81iw%20%E3%81%AF%E6%9C%80%E5%BE%8C%E3%81%AE%E8%A6%81%E7%B4%A0%E3%81%A7%E3%81%99%E3%80%82%20w%3D2%20%E3%81%AE%E4%BE%8B%E3%81%AF%E8%A1%8C%E3%82%8F%E3%81%AA%E3%81%84%E3%81%A7%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84%E3%80%82%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E3%81%A6%C3%97%3C%2FP%3E%3CP%3E-------------%3C%2FP%3E%3CP%3E1%C3%971%3C%2FP%3E%3CP%3E2%C3%972%3C%2FP%3E%3CP%3E3%C3%973%E2%80%A6%E2%80%A6%3C%2FP%3E%3CP%3E4%C3%974%20MA%3D(X3%2BX2)%2F2%3C%2FP%3E%3CP%3E5%C3%975%20MA%3D(X4%2BX3)%2F2%3C%2FP%3E%3CP%3E6%C3%976%E2%80%A6%E2%80%A6%3C%2FP%3E%3CP%3E7%C3%977%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E6%96%B0%E3%81%97%E3%81%84%E6%95%B0%E5%BC%8F%E5%88%97%20--%26gt%3B%20%E8%A1%8C%E6%A9%9F%E8%83%BD%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%3C%2FP%3E%3CP%3EWeighting%E3%82%92%E3%80%8C%E7%AD%89%E3%81%97%E3%81%84%E3%80%8D%E3%81%AB%E8%A8%AD%E5%AE%9A%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%20%E4%BB%A5%E5%89%8D%E3%81%AB%E5%A0%B1%E5%91%8A%E3%81%97%E3%81%9F%E5%86%85%E5%AE%B9%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%80%81%E3%80%8C%E5%89%8D%E3%81%AE%E3%82%A2%E3%82%A4%E3%83%86%E3%83%A0%E3%80%8D%E3%81%A8%E3%80%8C%E5%BE%8C%E3%81%AE%E3%82%A2%E3%82%A4%E3%83%86%E3%83%A0%E3%80%8D%E3%81%AF%E3%81%A9%E3%81%86%E3%81%AA%E3%82%8B%E3%81%A7%E3%81%97%E3%82%87%E3%81%86%E3%81%8B%3F%3C%2FP%3E%3CP%3E%E6%8C%87%E6%95%B0%E9%87%8D%E3%81%BF%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%9F%E3%81%84%E5%A0%B4%E5%90%88%E3%82%82%E5%90%8C%E3%81%98%E8%B3%AA%E5%95%8F%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%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%20295px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Capture.PNG%22%20style%3D%22width%3A%20295px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Capture.PNG%22%20style%3D%22width%3A%20295px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F32462i6D2511871FF07551%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%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E3%81%82%E3%82%8A%E3%81%8C%E3%81%A8%E3%81%86%E3%83%95%E3%82%A7%E3%83%AA%E3%83%BC%E3%83%81%E3%82%A7%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-381181%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3E%E3%83%9E%E3%82%B9%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%9E%E3%82%A4%E3%82%BC%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-382460%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%E3%81%A8EWMA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-382460%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CDIV%3E%E3%81%82%E3%81%82%E3%80%81%E3%81%94%E3%82%81%E3%82%93%E3%81%AA%E3%81%95%E3%81%84%E3%80%81%E3%81%9D%E3%81%AE%E8%A9%B3%E7%B4%B0%E3%82%92%E8%A6%8B%E9%80%83%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%E3%81%93%E3%82%8C%E3%82%92%E9%81%94%E6%88%90%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%80%81%E5%88%97%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%E3%81%AE%E5%91%A8%E5%9B%B2%E3%81%AB%E3%83%A9%E3%82%B0%E5%BC%8F%E3%82%92%E8%BF%BD%E5%8A%A0%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ih_0-1620221585125.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ih_0-1620221585125.png%22%20style%3D%22width%3A%20385px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ih_0-1620221585125.png%22%20style%3D%22width%3A%20385px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F32609iD38D6FBB865410C5%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ih_0-1620221585125.png%22%20alt%3D%22ih_0-1620221585125.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%E3%81%82%E3%81%AA%E3%81%9F%E3%81%AE%E4%BE%8B%E3%81%AE%E5%A0%B4%E5%90%88%3A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENew%20Table(%20%22MA%20Example%22%2C%0A%20Add%20Rows(%2010%20)%2C%0A%20New%20Column(%20%22Data%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(%20%5B1%2C%202%2C%203%2C%204%2C%205%2C%206%2C%207%2C%208%2C%209%2C%2010%5D%20)%0A%20)%2C%0A%20New%20Column(%20%22MA%22%2C%0A%20%20Numeric%2C%0A%20%20%22Continuous%22%2C%0A%20%20Format(%20%22Best%22%2C%2012%20)%2C%0A%20%20Formula(%20Lag(%20Col%20Moving%20Average(%20%3AData%2C%201%2C%202%2C%200%20)%20)%20)%0A%20)%0A)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%E6%9C%9F%E5%BE%85%E3%81%A9%E3%81%8A%E3%82%8A%E3%81%AE%E7%B5%90%E6%9E%9C%E3%81%8C%E5%BE%97%E3%82%89%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ih_1-1620221625678.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ih_1-1620221625678.png%22%20style%3D%22width%3A%20107px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ih_1-1620221625678.png%22%20style%3D%22width%3A%20107px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F32611iE962D60CA03955F7%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ih_1-1620221625678.png%22%20alt%3D%22ih_1-1620221625678.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-382438%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%E3%81%A8EWMA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-382438%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E4%BE%8B%E3%82%92%E3%81%82%E3%81%92%E3%81%A6%E3%81%BF%E3%81%BE%E3%81%97%E3%82%87%E3%81%86%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E3%82%B7%E3%83%BC%E3%82%B1%E3%83%B3%E3%82%B9%201%202%203%204%205%206%207%208%209%20%E3%81%8C%E3%81%82%E3%82%8B%E3%81%A8%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E5%20%E3%81%8B%E3%82%89%E5%A7%8B%E3%82%81%E3%81%A6%E3%80%81%E5%89%8D%E3%81%AE%20w%20%E8%A1%8C%E3%81%AE%E5%B9%B3%E5%9D%87%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%97%E3%81%9F%E3%81%84%E3%81%A8%E6%80%9D%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%20w%3D3%E3%81%AE%E5%A0%B4%E5%90%88%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E(2%2B3%2B4)%2F3%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E3%81%9D%E3%81%97%E3%81%A6%E3%81%9D%E3%81%86%E3%81%A7%E3%81%AF%E3%81%82%E3%82%8A%E3%81%BE%E3%81%9B%E3%82%93%3C%2FP%3E%3CP%3E(3%2B4%2B5)%2F3%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERgds%E3%83%95%E3%82%A7%E3%83%AA%E3%83%BC%E3%83%81%E3%82%A7%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-382432%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%E3%81%A8EWMA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-382432%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E5%89%8D%E3%81%AB1%E8%A1%8C%E3%80%81%E5%BE%8C%E3%82%8D%E3%81%AB0%E8%A1%8C%E3%81%A7%E5%90%8C%E3%81%98%E9%87%8D%E3%81%BF%E4%BB%98%E3%81%91%E3%81%8C%E5%BF%85%E8%A6%81%E3%81%AA%E3%82%88%E3%81%86%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-382251%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%E3%81%A8EWMA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-382251%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E3%81%93%E3%81%AE%E9%96%A2%E6%95%B0%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6%E3%81%AF%E3%80%81%E3%83%89%E3%82%AD%E3%83%A5%E3%83%A1%E3%83%B3%E3%83%88%E3%81%A8%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E7%B4%A2%E5%BC%95%E3%81%A7%E5%8F%82%E7%85%A7%E3%81%97%E3%81%A6%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84%E3%80%82%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ma.PNG%22%20style%3D%22width%3A%20804px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ma.PNG%22%20style%3D%22width%3A%20804px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ma.PNG%22%20style%3D%22width%3A%20804px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F32590iE35A84154A92B33E%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22ma.PNG%22%20alt%3D%22ma.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-381862%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%E3%81%A8EWMA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-381862%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF%E3%80%81%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%E5%8D%98%E7%B4%94%E3%81%AA%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%E3%81%AE%E5%A0%B4%E5%90%88%E3%81%AF%E3%80%81%E6%95%B0%E5%BC%8F%E3%82%A8%E3%83%87%E3%82%A3%E3%82%BF%E3%83%BC%E3%81%AE%20Lag()%20%E9%96%A2%E6%95%B0%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E7%B0%A1%E5%8D%98%E3%81%AB%E8%A8%88%E7%AE%97%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%E4%BB%A5%E4%B8%8B%E3%81%AF%E3%80%81%E9%8C%A0%E5%89%A4%E8%A3%BD%E9%80%A0%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB%20%E3%83%87%E3%83%BC%E3%82%BF%20%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E3%81%AE%E6%BA%B6%E8%A7%A3%E5%88%97%E3%81%AE%E5%89%8D%E3%81%AE%203%20%E8%A1%8C%E3%81%AE%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%E3%82%92%E8%A8%88%E7%AE%97%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95%E3%81%AE%E4%BE%8B%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%2F%2F%20Open%20Data%20Table%3A%20Tablet%20Production.jmp%0A%2F%2F%20%E2%86%92%20Data%20Table(%20%22Tablet%20Production%22%20)%0AOpen(%20%22%24SAMPLE_DATA%2FTablet%20Production.jmp%22%20)%3B%0A%0A%0A%2F%2F%20New%20column%3A%20Dissolution_MA3%0AData%20Table(%20%22Tablet%20Production%22%20)%20%26lt%3B%26lt%3B%20New%20Column(%20%22Dissolution_MA3%22%2C%0A%20Numeric%2C%0A%20%22Continuous%22%2C%0A%20Format(%20%22Best%22%2C%2012%20)%2C%0A%20Formula(%0A%20%20(Lag(%20%3ADissolution%2C%201%20)%20%2B%20Lag(%20%3ADissolution%2C%202%20)%20%2B%20Lag(%20%3ADissolution%2C%203%20))%0A%20%20%20%2F%203%0A%20)%0A)%3B%0A%0A%0A%2F%2F%20Report%20snapshot%3A%20Tablet%20Production%20-%20Graph%20Builder%0AData%20Table(%20%22Tablet%20Production%22%20)%20%26lt%3B%26lt%3B%20Graph%20Builder(%0A%20Size(%20799%2C%20452%20)%2C%0A%20Show%20Control%20Panel(%200%20)%2C%0A%20Variables(%20Y(%20%3ADissolution%20)%2C%20Y(%20%3ADissolution_MA3%2C%20Position(%201%20)%20)%20)%2C%0A%20Elements(%20Line(%20Y(%201%20)%2C%20Y(%202%20)%2C%20Legend(%206%20)%2C%20Row%20order(%201%20)%20)%20)%0A)%3B%0A%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%E4%B9%BE%E6%9D%AF%E3%80%81%E3%83%9E%E3%83%83%E3%82%B7%E3%83%A2%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-381351%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%E3%81%A8EWMA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-381351%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF%E3%82%B8%E3%83%A0%20w%20%E3%81%AF%E5%88%97%E3%81%AE%E6%95%B0%E3%81%AB%E4%BE%9D%E5%AD%98%E3%81%97%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E3%81%82%E3%82%8A%E3%81%8C%E3%81%A8%E3%81%86%E3%83%95%E3%82%A7%E3%83%AA%E3%83%BC%E3%83%81%E3%82%A7%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-381274%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87%E3%81%A8EWMA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-381274%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3Ew%20%E3%81%AE%E5%80%A4%E3%81%AF%E3%83%87%E3%83%BC%E3%82%BF%20%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E3%81%AE%E5%88%97%E3%81%AE%E6%95%B0%E3%81%A8%E7%AD%89%E3%81%97%E3%81%84%E3%81%A7%E3%81%99%E3%81%8B%E3%80%81%E3%81%9D%E3%82%8C%E3%81%A8%E3%82%82%E3%83%87%E3%83%BC%E3%82%BF%20%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E3%81%AE%E5%88%97%E3%81%AE%E6%95%B0%E3%81%AB%E9%96%A2%E4%BF%82%E3%81%AA%E3%81%8F%E3%80%81w%20%E3%81%AF%E7%94%BB%E9%9D%A2%E3%81%AB%E8%A1%A8%E7%A4%BA%E3%81%95%E3%82%8C%E3%82%8B%E5%88%97%E3%81%AE%E6%95%B0%E3%81%A8%E7%AD%89%E3%81%97%E3%81%84%E3%81%A7%E3%81%99%E3%81%8B%3F%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
FR60
Level IV

Moving average and EWMA

Hi

Given a column with numerical values I would like to calculate the MA in this way:

MAi=1/N*SUM(j=i-1 to j=i-w) Xj

where w is the window width, i-1 the starting element and i-w the last one. Les't do an example with w=2   

 

t       x

-------------

1      x1

2      x2

3      x3        …..

4      x4        MA=(X3+X2)/2

5      x5        MA=(X4+X3)/2

6      x6        …..

7      x7

 

By using the New formula column-->Row feature

I set the Weighting to "equal". What about the Items Before and Items after to obtain what I reported before?

Same question if I want to use the Exponential weight.

 

Capture.PNG

 

Thanks  Felice

 

7 REPLIES 7
txnelson
Super User

Re: Moving average and EWMA

Is the value of w equal to the number of columns in the data table, or is w equal to the number of the columns displayed on the screen, regardless of the number of columns in the data table?
Jim
FR60
Level IV

Re: Moving average and EWMA

Hi Jim  w is not dependent on the number of column.

 

Thanks  Felice

Re: Moving average and EWMA

Hi,

 

if it is a simple moving average, you can easily compute it by using the Lag() function in Formula Editor.

 

Here below an example on how to calculate the moving average of previous 3 rows for Dissolution column in Tablet Production sample data table:

 

// Open Data Table: Tablet Production.jmp
// → Data Table( "Tablet Production" )
Open( "$SAMPLE_DATA/Tablet Production.jmp" );


// New column: Dissolution_MA3
Data Table( "Tablet Production" ) << New Column( "Dissolution_MA3",
	Numeric,
	"Continuous",
	Format( "Best", 12 ),
	Formula(
		(Lag( :Dissolution, 1 ) + Lag( :Dissolution, 2 ) + Lag( :Dissolution, 3 ))
		 / 3
	)
);


// Report snapshot: Tablet Production - Graph Builder
Data Table( "Tablet Production" ) << Graph Builder(
	Size( 799, 452 ),
	Show Control Panel( 0 ),
	Variables( Y( :Dissolution ), Y( :Dissolution_MA3, Position( 1 ) ) ),
	Elements( Line( Y( 1 ), Y( 2 ), Legend( 6 ), Row order( 1 ) ) )
);

Cheers, Massimo

Re: Moving average and EWMA

See this function in the documentation and Scripting Index:

 

ma.PNG

ih
Super User (Alumni) ih
Super User (Alumni)

Re: Moving average and EWMA

It looks like you want equal weighting with 1 row before and 0 after.

FR60
Level IV

Re: Moving average and EWMA

Let me do an example

 

Let's suppose to have the sequence 1 2 3 4 5 6 7 8 9

 

Starting from 5 I would like to do do the average of previous w rows. For w=3 

 

(2+3+4)/3

 

and not

(3+4+5)/3

 

Rgds  Felice

ih
Super User (Alumni) ih
Super User (Alumni)

Re: Moving average and EWMA

Ah, sorry I missed that detail.  You can add a Lag formula around the Col Moving Average to accomplish this:
 
ih_0-1620221585125.png

 

For your example:

New Table( "MA Example",
	Add Rows( 10 ),
	New Column( "Data",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] )
	),
	New Column( "MA",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( Lag( Col Moving Average( :Data, 1, 2, 0 ) ) )
	)
)

Gives the expected result:

ih_1-1620221625678.png

 

 

Recommended Articles