Stata Technical Bulletin
19
. mcompr2 schpl, default(rl) cutoff(0.8) effects
Group |
Vs. |
Diff. |
P-value |
— r5 |
r3 |
2711.313 |
0.0927 |
r5 |
r2 |
2909.323 |
0.1977 |
r5 |
rl |
3816.672 |
0.3466 |
r5 |
r4 |
1669.015 |
0.5257 |
r4 |
r3 |
1042.298 |
0.7040 |
label |
var r2 |
"Fair" | |
label |
var r3 |
"Average" | |
label |
var r4 |
"Good" | |
label |
var r5 |
"Excellent" |
. mcompr2 schpl, default(Poor) cutoff(0.5) effects label
Group Vs. Diff. P-value
Excellent Average 2711.313 0.0927
Excellent Fair 2909.323 0.1977
Excellent Poor 3816.672 0.3466
An additional program for displaying pairwise differences is included on the distribution diskette. This program, mcompr3,
was developed for the special application of a client, but it may be of interest to other Stata users as well. The syntax of mcompr3
is
mcompr3 varname , greater (macro list) less (macro list) [ cutoff (#) def ault (name) label ]
There must be as many macro names in each list as there are categories that are compared with mcompp. These macros receive
the names or descriptions of the variables that this category is definitely greater than or less than. All other options work the
same as in mcompr2.
mcompr3 can be a little tricky, but the following example should give you the general idea of its operation and of its
flexibility.
. mcompr3 schplt label great(Gl G2 G3 G4 G5) less(Ll L2 L3 L4 L5) cutoff(.3) default(Poor)
. capture program drop doit
. program define doit
1. di "Category Clearly Greater Than Clearly Less Than"
2. di "Poor" .col(26) "$G1" .col(54) "$L1"
3. di "Fair" .col(26) "$G2" .col(54) "$L2"
4. di "Average" .col(26) "$G3" .col(54) "$L3"
5. di "Good" .col(26) "$G4" .col(54) "$L4"
6. di "Excellent" .col(26) "$G5" .col(54) "$L5"
7. end
. doit
Category Clearly Greater Than Clearly Less Than
Poor
Fair Excellent
Average Excellent
Good
Excellent FairjAverage
There is yet another program, ehcvsrc, on the distribution diskette. The adventurous reader can examine ehcvsrc for a
further elaboration of the use of mcompr3.
Formulas
The formulas are virtually identical to those described in [5s] oneway and, hence, are not repeated here.
snp7 Natural cubic splines
Peter Sasieni, Imperial Cancer Research Fund, London, FAX (011)-44-171-269-3429
This entry consists of three related programs for smoothing by regression onto the truncated power base for a natural cubic
spline: spline, sp_adj and spbase.
spline may be regarded as an alternative to ksm. It smooths a ^-variable against an ж-variable and displays a graph of
the original data with the smooth superimposed. The smooth is calculated by regression onto a cubic spline basis. The user may
specify the type of regression used to fit the smooth, e.g., logistic, poisson,.... By default the program uses regress (least
squares).