cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
gutloja
Level III

Help with Kernel Smoother output

[Kernel smoother - output in column]

Hello All,

I am running a kernel smoother but I would like to have the output of each smoother in a column, using the name of the variable. I still would like to see the Fit Group graph, for visual inspection, but I can't find a way to have JMP write the predicted values to a different column automatically [I usually save predicteds, coefficients, etc. manually].

Is there a way to do this?. This is the script I am using:

KernelSmootherGroup# = Expr(

Fit Group(

    Bivariate( Y( :Name( "Var1" ) ), X( :RowNO ),

        Kernel Smoother( 1, 1, 0.0985804416403786, 0 )

    ),

    Bivariate( Y( :Name( "Var2" ) ), X( :RowNO ),

        Kernel Smoother( 1, 1, 0.0985804416403786, 0 )

    ),

    Bivariate( Y( :Name( "Var3" ) ), X( :RowNO ),

        Kernel Smoother( 1, 1, 0.0985804416403786, 0 )

    ),

    <<{Arrange in Rows( 1 )},

    SendToReport(

        Dispatch(

            {"Bivariate Fit of Var1 By RowNO"},

            "2",

            ScaleBox,

            {Min( 0.1 ), Max( 1 ), Inc( 0.02 ), Minor Ticks( 1 )}

        ),

        Dispatch(

            {"Bivariate Fit of Var1 By RowNO"},

            "Bivar Plot",

            FrameBox,

            {Frame Size( 1085, 240 )}

        ),

        Dispatch(

            {"Bivariate Fit of Var2 By RowNO"},

            "2",

            ScaleBox,

            {Min( 0.1 ), Max( 1 ), Inc( 0.02 ), Minor Ticks( 1 )}

        ),

        Dispatch(

            {"Bivariate Fit of Var2 By RowNO"},

            "Bivar Plot",

            FrameBox,

            {Frame Size( 1092, 240 )}

        ),

        Dispatch(

            {"Bivariate Fit of Var3 By RowNO"},

            "2",

            ScaleBox,

            {Min( 0.1 ), Max( 1 ), Inc( 0.02 ), Minor Ticks( 1 )}

        ),

        Dispatch(

            {"Bivariate Fit of Var3 By RowNO"},

            "Bivar Plot",

            FrameBox,

            {Frame Size( 1096, 240 )}

        ),

    )

);   

   

);

KernelSmootherGroup#;

Any help will be appreciated,

JoseGL

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Help with Kernel Smoother output

Here is your script, modified with the code added that will output the Predicted values:

Names default to here(1);

dt=current data table();

KernelSmootherGroup# = Expr( 

       Fit Group(

              biv1=Bivariate( Y(:Name( "Var1" ) ), X( :RowNO ), Kernel Smoother(1, 1, 0.0985804416403786, 0 ) ),

              biv2=Bivariate( Y(:Name( "Var2" ) ), X( :RowNO ), Kernel Smoother(1, 1, 0.0985804416403786, 0 ) ),

              biv3=Bivariate( Y(:Name( "Var3" ) ), X( :RowNO ), Kernel Smoother(1, 1, 0.0985804416403786, 0 ) ),

              <<{Arrange in Rows( 1 )},

              SendToReport(

                     Dispatch(

                          {"Bivariate Fit of Var1 By RowNO"},

                           "2",

                           ScaleBox,

                           {Min( 0.1 ), Max( 1 ), Inc( 0.02 ), Minor Ticks( 1 )}

                     ),

                     Dispatch(
{
"Bivariate Fit of Var1 By RowNO"}, "Bivar Plot", FrameBox, {Frame Size( 1085, 240 )} ),

                     Dispatch(

                           {"Bivariate Fit of Var2 By RowNO"},

                           "2",

                          ScaleBox,

                           {Min( 0.1 ), Max( 1 ), Inc( 0.02 ), Minor Ticks( 1 )}

                     ),

                     Dispatch(
{
"Bivariate Fit of Var2 By RowNO"}, "Bivar Plot", FrameBox, {Frame Size( 1092, 240 )} ),

                     Dispatch(

                           {"Bivariate Fit of Var3 By RowNO"},

                           "2",

                           ScaleBox,

                           {Min( 0.1 ), Max( 1 ), Inc( 0.02 ), Minor Ticks( 1 )}

                     ),

                     Dispatch(
{
"Bivariate Fit of Var3 By RowNO"}, "Bivar Plot", FrameBox, {Frame Size( 1096, 240 )} ),

              )

       );     


biv1
<< (curve[1] << save predicteds);
biv2
<< (curve[1] << save predicteds);
biv3
<< (curve[1] << save predicteds);  

); 

KernelSmootherGroup#;

Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Help with Kernel Smoother output

Here is your script, modified with the code added that will output the Predicted values:

Names default to here(1);

dt=current data table();

KernelSmootherGroup# = Expr( 

       Fit Group(

              biv1=Bivariate( Y(:Name( "Var1" ) ), X( :RowNO ), Kernel Smoother(1, 1, 0.0985804416403786, 0 ) ),

              biv2=Bivariate( Y(:Name( "Var2" ) ), X( :RowNO ), Kernel Smoother(1, 1, 0.0985804416403786, 0 ) ),

              biv3=Bivariate( Y(:Name( "Var3" ) ), X( :RowNO ), Kernel Smoother(1, 1, 0.0985804416403786, 0 ) ),

              <<{Arrange in Rows( 1 )},

              SendToReport(

                     Dispatch(

                          {"Bivariate Fit of Var1 By RowNO"},

                           "2",

                           ScaleBox,

                           {Min( 0.1 ), Max( 1 ), Inc( 0.02 ), Minor Ticks( 1 )}

                     ),

                     Dispatch(
{
"Bivariate Fit of Var1 By RowNO"}, "Bivar Plot", FrameBox, {Frame Size( 1085, 240 )} ),

                     Dispatch(

                           {"Bivariate Fit of Var2 By RowNO"},

                           "2",

                          ScaleBox,

                           {Min( 0.1 ), Max( 1 ), Inc( 0.02 ), Minor Ticks( 1 )}

                     ),

                     Dispatch(
{
"Bivariate Fit of Var2 By RowNO"}, "Bivar Plot", FrameBox, {Frame Size( 1092, 240 )} ),

                     Dispatch(

                           {"Bivariate Fit of Var3 By RowNO"},

                           "2",

                           ScaleBox,

                           {Min( 0.1 ), Max( 1 ), Inc( 0.02 ), Minor Ticks( 1 )}

                     ),

                     Dispatch(
{
"Bivariate Fit of Var3 By RowNO"}, "Bivar Plot", FrameBox, {Frame Size( 1096, 240 )} ),

              )

       );     


biv1
<< (curve[1] << save predicteds);
biv2
<< (curve[1] << save predicteds);
biv3
<< (curve[1] << save predicteds);  

); 

KernelSmootherGroup#;

Jim
gutloja
Level III

Re: Help with Kernel Smoother output

Thanks a lot, Jim.
This is what I was looking for.