Subscribe Bookmark RSS Feed

how to get "pdiff" equivalent output in JMP

odoyle81

Community Trekker

Joined:

Oct 26, 2011

Hi,

I'm fitting a model to my data, and I want to see the p values for LSMEANS.  I can't figure out how to do this.  In SAS, the code would be "LSMEANS /pdiff"

Here is the code from SAS:

proc GLM;

class marker1 marker2 marker3;

model trait = marker1 marker2 marker3 marker1*marker2;

LSMEANS marker1*marker2 / stderr pdiff;

Thanks for any help!

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

I do not think that you can directly get the column of p-values in that table. However if you position the mouse pointer in that table and right click you can choose the upper and lower confidence limit items which are 95% limits by default. If you want a different confidence level, rerun the fit model and in the dialog click the red triangle next to Model Specification and choose Set Alpha Level as appropriate.

6 REPLIES
mpb

Super User

Joined:

Jun 23, 2011

See if this script sample gives you what you want. It can also be generated interactively through the Fit Model dialog followed by clicking on items under various red triangle pull down menus.

dt = Open( "$SAMPLE_DATA/Analgesics.jmp" );

fm = dt << Fit Model(

    Y( :pain ),

    Effects( :gender, :drug, :gender * :drug ),

    Personality( Standard Least Squares ),

    Emphasis( Effect Leverage ),

    Run(

        :pain << {Lack of Fit( 0 ), Plot Actual by Predicted( 1 ), Plot Regression( 0 ),

        Plot Residual by Predicted( 1 ), Plot Effect Leverage( 1 ), {:gender <<

        {LSMeans Student's t( 0.05, Ordered Differences Report( 1 ) )}, :drug <<

        {LSMeans Student's t( 0.05, Ordered Differences Report( 1 ) )}, :gender * :drug <<

        {LSMeans Student's t( 0.05, Ordered Differences Report( 1 ) )}}}

    ),

    SendToReport(

        Dispatch(

            {"Response pain", "Whole Model", "Parameter Estimates"},

            "Lower 95%",

            NumberColBox,

            {Hide( 0 )}

        ),

        Dispatch(

            {"Response pain", "Whole Model", "Parameter Estimates"},

            "Upper 95%",

            NumberColBox,

            {Hide( 0 )}

        ),

        Dispatch(

            {"Response pain", "gender", "Least Squares Means Table"},

            "Lower 95%",

            NumberColBox,

            {Hide( 0 )}

        ),

        Dispatch(

            {"Response pain", "gender", "Least Squares Means Table"},

            "Upper 95%",

            NumberColBox,

            {Hide( 0 )}

        ),

        Dispatch(

            {"Response pain", "drug", "Least Squares Means Table"},

            "Lower 95%",

            NumberColBox,

            {Hide( 0 )}

        ),

        Dispatch(

            {"Response pain", "drug", "Least Squares Means Table"},

            "Upper 95%",

            NumberColBox,

            {Hide( 0 )}

        ),

        Dispatch(

            {"Response pain", "gender*drug", "Least Squares Means Table"},

            "Lower 95%",

            NumberColBox,

            {Hide( 0 )}

        ),

        Dispatch(

            {"Response pain", "gender*drug", "Least Squares Means Table"},

            "Upper 95%",

            NumberColBox,

            {Hide( 0 )}

        )

    )

);

odoyle81

Community Trekker

Joined:

Oct 26, 2011

Thanks - actually what I was looking for was the equivalent options under the red triangles - can you tell me what I need to click on to get similar output to SAS?

Thanks!

mpb

Super User

Joined:

Jun 23, 2011

For example,

1. Under the red triangle for gender*drug click LSMeans Student's t

2. Under the red triangle for LSMeans Differences Student's t click Ordered Differences Report

odoyle81

Community Trekker

Joined:

Oct 26, 2011

ok, this is really close!  What I want is the Least Squares Means Table (which I can get in JMP), but with a column for the p values?  Is this possible?

I know the p values are in the ordered list, but it is hard to find the right comparisons and SAS outputs the table nicely, like this:

                                          The GLM Procedure

                                         LeastSquares Means

                                      maysin        Standard                  LSMEAN

                p1    umc105          LSMEAN           Error    Pr > |t|      Number

                A     A           0.40225326      0.03832313      <.0001           1

                A     B           0.94394072      0.03824324      <.0001           2

                A     H           0.48262441      0.02545524      <.0001           3

                B     A          -0.05712529      0.05182397      0.2714           4

                B     B           0.09619548      0.04285878      0.0257           5

                B     H           0.03895248      0.02771541      0.1611          6

                H     A           0.16287842      0.02784603      <.0001           7

                H     B           0.48242779      0.03588362      <.0001           8

                H     H           0.25725291      0.02200943      <.0001          9

JMP can give almost the same table, but it doesn't have the p values:

LevelLeast Sq MeanStd Error
A,A0.402253260.03832313
A,B0.943940720.03824324
A,H0.482624410.02545524
B,A-0.057125290.05182397
B,B0.096195480.04285878
B,H0.038952480.02771541
H,A0.162878420.02784603
H,B0.482427790.03588362
H,H0.257252910.02200943
Solution

I do not think that you can directly get the column of p-values in that table. However if you position the mouse pointer in that table and right click you can choose the upper and lower confidence limit items which are 95% limits by default. If you want a different confidence level, rerun the fit model and in the dialog click the red triangle next to Model Specification and choose Set Alpha Level as appropriate.

odoyle81

Community Trekker

Joined:

Oct 26, 2011

Cool, thanks.  Actually confidence intervals make more sense in this situation than p values anyways, so this works great!  I had no idea you could add columns by right clicking... I wonder what other tables have hidden columns!