Subscribe Bookmark RSS Feed

Copy/Paste frame contents of Generalized Linear Model Regression in JSL?

pmroz

Super User

Joined:

Jun 23, 2011

Hi folks,

I'm doing a Fit Generalized Linear Model, and I want to show confidence curves on the regression graph.  I can right click on the profiler and select Edit > Copy frame contents.  Then I right click on the regression graph and select Edit > Paste frame contents.  This is my result:

11808_Combined.png

My question is: how do I do this in JSL?  This is my (feeble) attempt but it doesn't work:

fm = Fit Model(

     Y( :Name( "Sum(One Effect)" ), :Total ),

     Effects( :Period ),

     Personality( Generalized Linear Model ),

     GLM Distribution( Binomial ),

     Link Function( Logit ),

     Overdispersion Tests and Intervals( 0 ),

     Name( "Firth Bias-adjusted Estimates" )(0),

     Run( 1, Profiler( 1, Confidence Intervals( 1 ),

                Term Value( Period( 5.5, Lock( 0 ), Show( 1 ) ) )

           )

     )

);

// Run this to find relevant portions of the tree

//fm << show tree structure;

fmrep = fm << report;

fmrep[framebox(3)] << copy frame contents;

fmrep[framebox(1)] << paste frame contents;

2 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

You may be running into a situation where the frame boxes you are referencing are changing.  I suggest that you be more specific in your offset reference to the frame boxes of interest

fmrep["Prediction Profiler"][framebox(1)] << copy frame contents;

fmrep["Regression Plot"][framebox(1)] << paste frame contents;

Note the framebox value changes to framebox(1), since you are referencing from a location where the frame box you want is the first frame box after the Outline Box you started at.

I was successful using this technique to copy and paste the frame box settings, but I did not have good data to test out the copy/paste of the contents.

Jim
pmroz

Super User

Joined:

Jun 23, 2011

Got it to work.  I had to create a new window for the regression plot, which is Outline box (2):

fmrep[framebox(3)] << copy frame contents;

fmrep[framebox(1)] << paste frame contents;

new window("test", fmrep[outlinebox(2)]);