The name is absent



24


Stata Technical Bulletin


STB-33


snp12 Stratified test for trend across ordered groups

Peter Sasieni, Imperial Cancer Research Fund, London, FAX (011)-44-171-269-3429, [email protected]

The command uptrend was introduced to Stata following the STB article by Stepniewska and Altman (1992). The command
was revised by Sasieni, Stepniewska, and Altman (1996) and an immediate version, nptri, was provided for use with ordered
categorical tables. This revision permits calculation of the stratified version of the test.

In many situations, one may wish to stratify the sample on the basis of the values of one or more nuisance variables (such
as age and sex in epidemiology). The test is then performed assuming homogeneity of association between the outcome variable
and the ordered groups within strata. The new version of
nptrend called npt_s, has the ability to perform stratified tests.

The stratified test statistic is calculated by summing the observed value, the expected value, and the variance of the weighted
sum of ranks from each strata. npt_s uses the same score for a given value of the grouping (by) variable in all strata.

The output of nptrend has been modified so that even when the strata option is not used, the observed and expected
value of the weighted sum of ranks together with the its variance is displayed. Use of nodetail will suppress all but the value
of the test statistic and its p-value.

The syntax of npt_s is

npt_s varname [if exp [in range], by(groupvar) [ nodetail strat a Vvarlist) ]

Examples

These data come from a study of the effects of reduction in smoking on cervical lesions (Szarewski et al. 1996).

. use stb2

(Smoking and cervical lesions)
. describe

Contains data from stb2.dta

Smoking and cervical lesions

0bs:

82 (max=

2021)

Vars:

4 (max=

999)

27 Aug 1996 14:42

Width:

4 (max=

2000)

1. quit

byte

Ж Og

quit2

Smoking change

2. sc3

byte

%9.0g

sc3

Social Class

3. init-sm

byte

%9.0g

init2

Initial No./day

4. r_area

byte

%9.0g

r_area

Area: rel. to initial

Sorted by: r_area

The main interest is in the association between the extent to which women gave up smoking and the change in the area of
their lesions over the same 6 month period.

. tab quit r_area, row

Smoking I
change

Area: rel.

<.25

to initial

.25-.5

.5-.8

.8-1.2

>1.2 I

Total

————————————F-
unconf I

I

0
0.00

2

28.57

1

14.29

4

57.14

0 I

0.00 I

7

100.00

>75 I

I

0
0.00

0
0.00

1

5.26

12

63.16

6 I

31.58 I

19

100.00

(.5,75] I
I

0
0.00

1

7.69

2

15.38

7

53.85

3 I

23.08 I

13

100.00

(.25,.5] I

I

3

20.00

0
0.00

6

40.00

5

33.33

1 I

6.67 I

15

100.00

(0,.25] I

I

1

9.09

3

27.27

6

54.55

1

9.09

0 I

0.00 I

11

100.00

-----------+.

quit I
I

7

41.18

3

17.65

3

17.65

4

23.53

0 I
0.00 I

17

100.00

-----------+.

Total I
I

11

13.41

9

10.98

19

23.17

33

40.24

io I

12.20 I

82

100.00



More intriguing information

1. Testing for One-Factor Models versus Stochastic Volatility Models
2. Are combination forecasts of S&P 500 volatility statistically superior?
3. The name is absent
4. Self-Help Groups and Income Generation in the Informal Settlements of Nairobi
5. Estimating the Economic Value of Specific Characteristics Associated with Angus Bulls Sold at Auction
6. The Role of area-yield crop insurance program face to the Mid-term Review of Common Agricultural Policy
7. FDI Implications of Recent European Court of Justice Decision on Corporation Tax Matters
8. Fiscal Policy Rules in Practice
9. Fighting windmills? EU industrial interests and global climate negotiations
10. The name is absent
11. The name is absent
12. Making International Human Rights Protection More Effective: A Rational-Choice Approach to the Effectiveness of Ius Standi Provisions
13. The name is absent
14. Synthesis and biological activity of α-galactosyl ceramide KRN7000 and galactosyl (α1→2) galactosyl ceramide
15. Explaining Growth in Dutch Agriculture: Prices, Public R&D, and Technological Change
16. Industrial Cores and Peripheries in Brazil
17. Are Japanese bureaucrats politically stronger than farmers?: The political economy of Japan's rice set-aside program
18. The name is absent
19. Synchronisation and Differentiation: Two Stages of Coordinative Structure
20. The name is absent