cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Mariana_Aguilar
Level III

Extracting mean and shape functions in FPCA to data table

Hi everyone,
I'm working in JMP 18 Pro – Student Version and I have run an FPCA model. I need to export the shape functions (eigenfunctions φ(t)) and mean function as numeric columns in a data table so I can use them outside JMP.

I can see the FPCA plots for:

  • Mean Function

  • Shape Function 1

  • Shape Function 2

But I cannot find a reliable way to extract these curves into a data table.

What I have already tried:

  • Right-clicking the FPCA curve → Copy, Copy Frame Contents, Edit, Journal, etc.

  • "Make Data Table" options — not available in my menus

  • Graph Builder → save script → to data table (only gives shape scores, not the curve)

  • Copying curve graphics into a journal and trying “Copy Table” (no result)

  • Extracted “Shape Function” columns from the FPCA output, but those are scores per sample, not the φ(t) curve values

  • Checked preferences, right-click axes, and data filter options

So far, everything either gives images or PCA scores — not the full shape function vector sampled over wavenumbers.

I suspect I am just missing the correct extraction method or the student license may not expose it the same way.

 

If anyone knows the proper procedure or if there is a script to dump FPCA component functions into a table, I would really appreciate guidance. This seems simple so I may be missing a menu path in JMP 18 Pro Student Edition.

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Extracting mean and shape functions in FPCA to data table

Thanks for tagging me, @jthi! If I'm understanding correctly, Save Summaries is what you're looking for, but JMP hides the columns with the actual formulas in them by default. Here's a quick example of how to extract and use these formulas, using the attached data table.

  1. Run the FDE script in the attached data table (just some simple curves).
    1. Jed_Campbell_4-1761921479713.png

       

  2. Red Triangle by Function Summaries > Save Summaries
    1. The Shape functions are in the columns list on the left, but are hidden, so they don't show up in the data table. 
      1. Jed_Campbell_0-1761921036125.png

         

    2. One way to use them is with the custom profiler. Graph > Custom Profiler > Choose one or more of the shape functions.
      1. Jed_Campbell_1-1761921169876.png

         

    3. You can then add a profiler (Red Triangle > Prediction Profiler) then set up the simulator (Prediction Profiler Red Triangle > Simulator) to make a table with output from the formula.
      1. Jed_Campbell_2-1761921312401.png
    4. The resulting table has values from the formula which can be used in the Graph Builder, etc.
      1. Jed_Campbell_3-1761921402931.png
    5. You can also use things like the Formula Depot and Copy/Paste to move the formula itself to different tables.
      1. Jed_Campbell_5-1761921835840.png

         

 

View solution in original post

7 REPLIES 7
jthi
Super User

Re: Extracting mean and shape functions in FPCA to data table

Are you possibly looking for Save Summaries?

jthi_0-1761850433411.png

Predictive and Specialized Modeling > Functional Data Explorer > Functional Data Explorer Platform ... 

Save Summaries

Saves the summary statistics specified in each Function Summaries report to a new data table. The name of the new data table describes the model fit. This data table contains formula columns for the eigenfunctions, mean function, prediction function, and conditional prediction function for each of the Y variables. In the data table, there is a profiler script for each Y variable that launches the prediction profilers for the prediction and conditional prediction formulas. These formulas are functions of the input variable, the ID variable, and the eigenfunctions.

-Jarmo
Mariana_Aguilar
Level III

Re: Extracting mean and shape functions in FPCA to data table

Thank you for your kind reply... i've actually clicked on that button several times but when i do, I get a table like this... I was expecting a column that would be my wavenumbers (im working with spectral data) vs absorbance for each point (around 1762 rows) so that i could graph back the mean and shape functions.  Does this have anything to do with me analyzing the data in wide format? (wavenumbers are columns and rows are individual samples) for analysis I've selected the row as functions...

Thank you :)

 

 

jthi
Super User

Re: Extracting mean and shape functions in FPCA to data table

I think that could be the reason (I'm not that familiar with FDE platform) though I couldn't replicate that with some example data I found from JMP (I'm using JMP Pro 18.2.0). Could you possibly stack your data and use that? I tried using Save Data from FDE with wide data and it did give me stacked data so I would guess JMP is using stacked data with FDE (at least on some parts).

I'll tag @Jed_Campbell from JMP as I do remember him answering some FDE questions

-Jarmo
Mariana_Aguilar
Level III

Re: Extracting mean and shape functions in FPCA to data table

Thank you ... Unfortunately, I've tried all three options in the Functional Data Explorer (stacked, rows as functions, and columns as functions ) and none of them worked. When I click save summaries, it shows a table where each row is the sample ID rather than the wavenumbers used to construct my mean and shape functions... It's strange that you couldn't replicate my findings using JMP 18.2... may be there's a workaround that I should do for JMP's student version? Or perhaps I'm missing something?

jthi
Super User

Re: Extracting mean and shape functions in FPCA to data table

To my knowledge JMP Student is same version of JMP as JMP Pro. How did you fill in the platform launcher?

This is JMP's example table "Functional Data/NMR DoE.jmp" and I removed "FDE X" column properties.

jthi_0-1761892479401.png

Then if I just pick some model 

jthi_1-1761892528658.png

And then Save Summaries

jthi_2-1761892599115.png

I will end up with

jthi_3-1761892612329.png

(for this example I did use JMP Pro 18.2.1)

If you repeat this example, will you end up with similar results as I did? 

-Jarmo

Re: Extracting mean and shape functions in FPCA to data table

Thanks for tagging me, @jthi! If I'm understanding correctly, Save Summaries is what you're looking for, but JMP hides the columns with the actual formulas in them by default. Here's a quick example of how to extract and use these formulas, using the attached data table.

  1. Run the FDE script in the attached data table (just some simple curves).
    1. Jed_Campbell_4-1761921479713.png

       

  2. Red Triangle by Function Summaries > Save Summaries
    1. The Shape functions are in the columns list on the left, but are hidden, so they don't show up in the data table. 
      1. Jed_Campbell_0-1761921036125.png

         

    2. One way to use them is with the custom profiler. Graph > Custom Profiler > Choose one or more of the shape functions.
      1. Jed_Campbell_1-1761921169876.png

         

    3. You can then add a profiler (Red Triangle > Prediction Profiler) then set up the simulator (Prediction Profiler Red Triangle > Simulator) to make a table with output from the formula.
      1. Jed_Campbell_2-1761921312401.png
    4. The resulting table has values from the formula which can be used in the Graph Builder, etc.
      1. Jed_Campbell_3-1761921402931.png
    5. You can also use things like the Formula Depot and Copy/Paste to move the formula itself to different tables.
      1. Jed_Campbell_5-1761921835840.png

         

 

Mariana_Aguilar
Level III

Re: Extracting mean and shape functions in FPCA to data table

Thank you!!!! this approach worked! I'm so happy! I've been struggling with this for quite some time! As a suggestion, it would be nice if the extended table could also be generated from the FDE platform. Other than that, I've found the platform extremely useful to work with spectral data :). @jthi, thank you also for your help. Have a nice Friday!

 

Recommended Articles