Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Estimate extraction from Bivariate Line fit issue

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Mar 10, 2012 12:43 AM
(6164 views)

I am measuring voltage and current and trying to use a JMP script to automate resistance calculation (slope of voltage vs current curve). What I have is text files with two columns, I open them in JMP, then concatenate all with a source table column. My script opens a bivariate line fit by source table and then tries to get the estimates from the report. It was working fine with my data until it started giving me this error "index in access or evaluation of 'Get' " when it reached a certain source table. So I tracked it down (I had more than 100 source tables) and found out that the data in that particular table was pretty noisy (due to a bad connection the current measured too low) and the fit was not very meaningful, but still the table of estimates had some values in the bivariate report. However when I try to extract the estimates for that particular table (the matrix is supposed to have two values, one for the intercept and the other for the slope) the matrix has only one value, and it is neither of the estimates, I figured that it is the Max Rsq value from the "Lack of fit" table.

I have attached the .jmp table that has some noisy and some good data, the table has a script illustrating the problem (the matrix est3 has only one value, all the others have two and they are the same as the estimates in the report)

Is that an expected behavior? It took me hours to figure out what happened to a script that was working fine with 60 tables and not with 100 :-(

Thanks!

Ani

p.s. I am using JMP 9.0.3 on Windows XP

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Your case3 data has points with duplicate x values which triggers the Lack of Fit analysis in Bivariate. This causes the "absolute" coordinates of the estimates to shift in the report from their location in the other 3 cases. Here are 2 approaches. One uses "relative" coordinates in the spirit of your code example which are insensitive to the existence of Lack of Fit stuff. The other also uses relative coordinates but with a method that creates a data table containing the info you are looking for.

First:

dt=data table("EstimateExtractionIssue");

current data table (dt);

biv=dt<<Bivariate(

Y( :Voltage ),

X( :Current ),

Fit Line( ),

By( :Source Table )

);

rep=biv<<report;

est1=rep[1]["Parameter Estimates"][NumberColBox(1)]<<getasmatrix;

est2=rep[2]["Parameter Estimates"][NumberColBox(1)]<<getasmatrix;

est3=rep[3]["Parameter Estimates"][NumberColBox(1)]<<getasmatrix;

est4=rep[4]["Parameter Estimates"][NumberColBox(1)]<<getasmatrix;

show(est1);

show(est2);

show(est3);

show(est4);

Second:

dt=data table("EstimateExtractionIssue");

current data table (dt);

biv=dt<<Bivariate(

Y( :Voltage ),

X( :Current ),

Fit Line( ),

By( :Source Table )

);

rep=biv<<report;

dtest = rep[1]["Parameter Estimates"][NumberColBox(1)]<<make combined data table;

2 REPLIES 2

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Your case3 data has points with duplicate x values which triggers the Lack of Fit analysis in Bivariate. This causes the "absolute" coordinates of the estimates to shift in the report from their location in the other 3 cases. Here are 2 approaches. One uses "relative" coordinates in the spirit of your code example which are insensitive to the existence of Lack of Fit stuff. The other also uses relative coordinates but with a method that creates a data table containing the info you are looking for.

First:

dt=data table("EstimateExtractionIssue");

current data table (dt);

biv=dt<<Bivariate(

Y( :Voltage ),

X( :Current ),

Fit Line( ),

By( :Source Table )

);

rep=biv<<report;

est1=rep[1]["Parameter Estimates"][NumberColBox(1)]<<getasmatrix;

est2=rep[2]["Parameter Estimates"][NumberColBox(1)]<<getasmatrix;

est3=rep[3]["Parameter Estimates"][NumberColBox(1)]<<getasmatrix;

est4=rep[4]["Parameter Estimates"][NumberColBox(1)]<<getasmatrix;

show(est1);

show(est2);

show(est3);

show(est4);

Second:

dt=data table("EstimateExtractionIssue");

current data table (dt);

biv=dt<<Bivariate(

Y( :Voltage ),

X( :Current ),

Fit Line( ),

By( :Source Table )

);

rep=biv<<report;

dtest = rep[1]["Parameter Estimates"][NumberColBox(1)]<<make combined data table;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Estimate extraction from Bivariate Line fit issue

Thank you very much, mpb! The first approach is exactly what I was looking for, very helpful! I didn't know what triggered the creation of a Lack of Fit table in some cases and not in others, and now I know why that happens.

Thanks again!

Ani