Search

Ploticus >
Scripts >

**proc pvalue** computes and displays p values associated with a statistical t test (New in version 2.41).
A t test compares two groups of numeric scores; the associated p value is the probability
that there is no significant difference between group1 and group2.
A low p value (typically < 0.05 or < 0.01) indicates that there's a sufficiently significant
difference between group1 and group2. This is useful for example, in treatment vs. control studies
in being able to say that the treatment made a difference or not.
How your data must be organized:
Each data row must have fields for mean, SD, and N, for group1 and group2,
plus a X category identifier field (total of 7 fields required).
The mean, SD and N can be computed from raw data using proc processdata (action=summary),
and then joined (using proc processdata again, action=join) so that data for both groups are together on each row.
See the above example which uses this technique.

This proc will compute one p value per data row, and display it at the X category location matching
the group identifier field (so X scaletype must be categories). By default the p value will be displayed
using the format eg. "p=0.12", along the bottom of the plot area, and
statistically significant p values are highlighted in yellow.

### Attributes

xfield, statfields1, and statfields2 **must** be specified.

**xfield**
dfield

Data field containing an identifier for determining where in X the p value will be displayed.

**statfields1**
meanfield
SDfield
Nfield

Three data fields containing mean, SD, and N for group1.

**statfields2**
meanfield
SDfield
Ndfield

Three data fields containing mean, SD, and N for group2.

**textdetails**
textdetails

Size, color, etc. of the p value string.
This attribute can also be used to adjust the location of the displayed string.

Example: textdetails: size=7 adjust=0,-0.25

**printformat**
string

Controls formatting of the result string and the pvalue numeric. Default is p=%2.2f.

Example: printformat: p = %3.3f

**lowp**
h

Mathematically, p values can never reach absolute 0.
Convention holds that p values less than a certain threshold be displayed as eg. p < 0.01
This attribute controls that threshold. Default is 0.01

Example: lowp: 0.005

**signif**
h

Convention holds that p values less than a certain threshold indicate a
sufficiently significant difference between the two groups.
By default this proc highlights these in yellow.
Default is 0.05.

Example: signif: 0.01

**signifcolor**
color
| none

The color to use when highlighting "significant" p values. Default is yellow.
To turn off the highlighting feature specify none.

**select**
select expression

Allows data rows to be selected for inclusion using a selection expression.

Example: @@2 = B