sudaan - koulutus ktl/tto 2004. 2 research triangle institute

59
Sudaan - koulutus KTL/TTO 2004

Upload: mercedes-plunket

Post on 31-Mar-2015

219 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

Sudaan - koulutus

KTL/TTO 2004

Page 2: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

2

Research Triangle Institute

Page 3: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

3

SUDAAN

Page 4: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

4

Why ?

Page 5: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

5

PITFALLS OF USING STANDARD STATISTICAL SOFTWARE PACKAGES FOR SAMPLE SURVEY DATA

Donna J. Brogan, Ph.D.Rollins School of Public Health, Emory University, AtlantaApril 15, 1997

COPYRIGHT: This article is copyrighted and is not to be used without proper acknowledgment and citation. It will appear as a chapter in Encyclopedia of Biostatistics, edited by Peter Armitage and Theodore Colton (Editors-in-Chief), to be published by John Wiley in summer, 1998 as six volumes. The article will be in a section titled “Design of Experiments and Sample Surveys”, edited by Paul Levy.

AUTHOR CONTACT INFORMATION:Donna Jean Brogan, Ph.D.Professor of Biostatistics Rollins School of Public Health 1518 Clifton Road N.E.—Room 324Emory UniversityAtlanta, GA 30322

e-mail: [email protected]: 404-727-7701fax: 404-727-1370

CAUTIONS IN USING STANDARD STATISTICAL SOFTWARE PACKAGES

Standard statistical software packages generally do not take into account four common characteristics of sample survey data: (1) unequal probability selection of observations, (2) clustering of observations, (3) stratification and (4) nonresponse and other adjustments [2 ]. Point estimates of population parameters are impacted by the value of the analysis weight for each observation. These weights depend upon the selection probabilities and other survey design features such as stratification and clustering. Hence, standard packages will yield biased point estimates if the weights are ignored. Estimated variance formulas for point estimates based on sample survey data are impacted by clustering, stratification and the weights. By ignoring these aspects, standard packages generally underestimate the estimated variance of a point estimate, sometimes substantially so.

Most standard statistical packages can perform weighted analyses, usually via a WEIGHT statement added to the program code. Use of standard statistical packages with a weighting variable may yield the same point estimates for population parameters as sample survey software packages. However, the estimated variance often is not correct and can be substantially wrong, depending upon the particular program within the standard software package.

Pitfalls

Page 6: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

6

History

Page 7: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

7

Platforms

Page 8: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

8

Price

Page 9: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

9

SUDAAN Overview

SUDAAN is a single program consisting of a family of procedures used toanalyze data from complex surveys and other observational andexperimental studies involving cluster-correlated data. A complex samplemay be multistage, stratified, or clustered. Many samples also haveunequal probabilities of selection, or are drawn from finite populations.SUDAAN enables you to use survey data to obtain consistent estimates ofpopulation parameters and their standard errors in accordance with thesample design. SUDAAN also produces consistent estimates ofregression coefficients, descriptive statistics, and their associated standarderrors for cluster-correlated and repeated measures data applications inclinical, epidemiological, toxicological, and behavioral research.

SUDAAN SUPPORTDirect inquiries about SUDAAN to:SUDAAN Business CoordinatorTelephone: 919-541-6602Fax: 919-541-7431Email: [email protected] Triangle Institute, 3040 Cornwallis Road, Research Triangle Park, NC27709 USA

Page 10: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

10

SUDAAN ProceduresUtility Procedure

RECORDS Procedure

The RECORDS procedure is designed to print records from any ASCII, SAS, SASXPORT, SUDAAN, SUDXPORT or SPSS record file. This is particularly useful when you wish to verify that SUDAAN is reading your data properly.

You can also use this procedure to obtain a file contents summary or convert an input file of one type to another. For instance, you can convert an ASCII data set to a SUDAAN data set (and vice versa).

NOTE: For SAS-Callable SUDAAN only, you can convert among the following file types: SAS, SUDAAN and SUDXPORT.

The RECORDS procedure statements can be grouped into these categories:

O Procedure statement: PROC RECORDSO Computation statement: SUBPOPN

O Output statements: TITLE, FOOTNOTE, SETENV, PRINT, OUTPUT

Page 11: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

11

SUDAAN ProceduresUtility Procedure

RECORDS Quick Reference

PROC RECORDS DATA=filename [SUDDATA=filename] [FILETYPE=ASCII|SAS|SPSS|SUDAAN|SUDXPORT|SASXPORT] [COUNTREC] [CONTENTS] [HISTORY][NOPRINT] [MAXOBS=count] [NAMEFILE=filename] [LEVFILE=filename]; /* SUDDATA=filename must be used to specify a SUDAAN input file in SAS-Callable SUDAAN */

[SUBPOPN expression / [ NAME="label" ];]

< TITLE string(s) / [ APPEND|REPLACE ]; > /* for SAS-Callable SUDAAN use RTITLE */

< FOOTNOTE string(s); > /* for SAS-Callable SUDAAN use RFOOTNOTE */

< SETENV{PAGEBEG=integer TABBEG=integer LINESIZE=integer PAGESIZE=integer LINESPCE=integer ROWSPCE=integer COLSPCE=integer ROWWIDTH=integer COLWIDTH=integer DECWIDTH=integer INDROWD=integer INDROWS=integer MAXIND=integer TOPMGN=integer LEFTMGN=integer LABWIDTH=integer }; >

<PRINT <keyword[=label]>/<keywordFMT=format> <keywordUNT=unit> [FILENAME=filename] [REPLACE] [STARTREC=number] [MAXREC=number] [NOHEAD] [NODATE] [NOTIME];>

<OUTPUT <keyword[=label]> / FILENAME=filename [REPLACE] [NOCOMP|NOCOMPRESS] [FILETYPE=ASCII|SAS|SUDAAN|SUDXPORT|SPSS|SASXPORT] [NAMEFILE=filename] [LEVFILE=filename] <keywordFMT=format> [STDTYPE=number];>

RUN;

Page 12: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

12

SUDAAN ProceduresDescriptive ProceduresCROSSTAB Procedure

The CROSSTAB procedure produces weighted frequency and percentage distributions for one-way (univariate, single-variable) and multi-way (multivariate or multiple-variable) tabulations.

CROSSTAB also tests the hypothesis of no association between row and column variables in 2-way and multi-way tables, as well as odds ratios and relative risks in 2x2 tables.

CROSSTAB is primarily for descriptive analyses of categorical variables.

DESCRIPT and RATIO produce descriptive statistics for continuous variables. Although DESCRIPT allows you to request weighted frequency counts, CROSSTAB is computationally more efficient for this purpose.

The CROSSTAB statements can be grouped into these categories:

O Procedure statement: PROC CROSSTABO Sample design statements: WEIGHT, NEST, TOTCNT, SAMCNT, JOINTPROB, REPWGT, IDVAR, JACKWGTS, JACKMULT

O Computation statements: SUBGROUP, LEVELS, RECODE, SUBPOPN, TABLES, TEST

O Output statements: SETENV, PRINT, TITLE, FOOTNOTE, OUTPUT, FORMAT

Page 13: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

13

SUDAAN ProceduresDescriptive Procedures

CROSSTAB Quick Reference

PROC CROSSTAB DATA=filename [ SUDDATA=filename ] [ FILETYPE=ASCII|SAS|SPSS|SUDAAN|SUDXPORT|SASXPORT ] [ DESIGN=WR|WOR|UNEQWOR|STRWR|STRWOR|SRS|BRR|JACKKNIFE ] [ PSUDATA=filename ] [ PSU_REC=count ] [ CONF_LIM=percent ] [ SMALL_CELL=count ] [ ATLEVEL1=position ] [ ATLEVEL2=position ] [ DDF=number ] [ DEFT4|DEFT1|DEFT2|DEFT3|DEFT|DEFF ] [ DISPLAY ][ INCLUDE] [ MERGEHI ] [ NOMARG ] [ NOCOL] [ NOROW ] [ NOTOT ] [ NOPER] [ NOSE ] [ NOWGT ] [ NOPRINT] [ MAXOBS=count ] [ REPDATA=filename ] [ REP_REC=count ] [ EST_STR=count ] [ EST_PSU = count ] [ NAMEFILE=filename ] [ LEVFILE=filename ]; /* SUDDATA=filename must be used to specify a SUDAAN input file /* in SAS-Callable SUDAAN */

[ WEIGHT variable; ][ REPWGT variables / [ ADJFAY=value ] ; ][ IDVAR variable(s) ; ][ NEST variable(s) / [ PSULEV=position|FRL=position] [ STRLEV=position ] [ MISSUNIT] [ NOSORTCK ] ; ][ TOTCNT variable(s); ][ SAMCNT variable(s); ][ JOINTPROB variable(s); ][ JACKWGTS varlist / ADJJACK=value ; ][ JACKMULT value(s) ; ][ RECODE variable=(code_list) < variable=(code_list) >; ][ SUBPOPN expression / [ NAME=”label” ]; ][ SUBGROUP variable(s); ][ LEVELS level(s); ][ TABLES table_request(s);][ TEST { CHISQ LLCHISQ CMH }; ]

continued

Page 14: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

14

SUDAAN ProceduresDescriptive Procedures

CROSSTAB Quick Reference (cont.)

< TITLE string(s) / [ APPEND|REPLACE ]; >/* for SAS-Callable SUDAAN use RTITLE */

< FOOTNOTE string(s); >/* for SAS-Callable SUDAAN use RFOOTNOTE */

< FORMAT variable(s) format_name.; >/* for SAS-Callable SUDAAN use RFORMAT */

<OUTPUT [ SMLCELL ] [ NSUM ] [ WSUM ] [ SEWGT ] [ DEFFWGT ] [ ROWPER ] [ COLPER] [ TOTPER ] [ SEROW ] [ SECOL ] [ SETOT ] [ DEFFROW ] [ DEFFCOL ] [ DEFFTOT ] [ ATLEV1][ ATLEV2 ] [ CHISQ ] [ CHISQP ] [ CHISQDF ] [ LLCHISQ ] [ LLCHISQP ] [ LLCHISQDF ] [ COR ] [ LOGCOR ] [ SELOGCOR ] [ UPCOR ] [ LOWCOR ] [ RR1 ] [ LOGRR1 ] [ SELOGRR1] [ LOWRR1 ] [ UPRR1 ] [ RR2 ] [ LOGRR2 ] [ SELOGRR2 ][ LOWRR2 ] [ UPRR2 ] [ CMH] [ CMHDF ] [ CMHPVAL ] [ DDF ] [ COVWGT ] [ SRSWGT ] [ COVROW ] [ SRSROW ] [ COVCOL ] [ SRSCOL ] [ COVTOT ] [ SRSTOT] / [TABLECELL=DEFAULT|ALL ][ RISK=DEFAULT|ALL ][ TESTS=DEFAULT|ALL ] [ CMHTEST=DEFAULT|ALL ] [ WGTCOV=DEFAULT|ALL ][ ROWCOV=DEFAULT|ALL ] [ COLCOV=DEFAULT|ALL ][TOTCOV=DEFAULT|ALL ] < keywordFMT=format > FILENAME=filename [ FILETYPE=ASCII|SAS|SUDAAN|SUDXPORT|SPSS|SASXPORT ] [ NAMEFILE=filename ] [ LEVFILE=filename ] [ REPLACE ] [ NOCOMP|NOCOMPRESS ] [ STDTYPE=number ] ;>...or... NSUM=label WSUM=label ... etc.

continued

Page 15: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

15

SUDAAN ProceduresDescriptive Procedures

CROSSTAB Quick Reference (cont.)

<SETENV { PAGEBEG=integer TABBEG=integer LINESIZE=integer PAGESIZE=integer LINESPCE=integer ROWSPCE=integer COLSPCE=integer ROWWIDTH=integer COLWIDTH=integer DECWIDTH=integer INDROWD=integer INDROWS=integer MAXIND=integer TOPMGN=integer LEFTMGN=integer LABWIDTH=integer }; >

<PRINT [ SMLCELL ] [ NSUM ] [ WSUM ] [ SEWGT ] [ DEFFWGT ] [ ROWPER ] [ COLPER ] [ TOTPER ] [ SEROW ] [ SECOL ] [ SETOT ] [ DEFFROW ] [ DEFFCOL ] [ DEFFTOT ] [ ATLEV1 ] [ ATLEV2 ] [ CHISQ ] [ CHISQP ] [ CHISQDF ] [ LLCHISQ ] [ LLCHISQP ] [ LLCHISQDF ] [ COR ] [ LOGCOR ] [ SELOGCOR ] [ UPCOR ] [ LOWCOR ] [ RR1 ] [ LOGRR1] [ SELOGRR1 ] [ LOWRR1 ] [ UPRR1 ] [ RR2 ] [ LOGRR2 ] [ SELOGRR2 ] [ LOWRR2 ] [ UPRR2 ] [CMH] [ CMHDF ] [ CMHPVAL ] [ DDF ] [ COVWGT ][ SRSWGT ][COVROW] [ SRSROW ] [ COVCOL ] [ SRSCOL] [ COVTOT ] [ SRSTOT ] / [ TABLECELL=DEFAULT|ALL ] [ TESTS=DEFAULT|ALL ] [ CMHTEST=DEFAULT|ALL] [ RISK=DEFAULT|ALL ] [WGTCOV=DEFAULT|ALL ] [ ROWCOV=DEFAULT|ALL ] [ COLCOV=DEFAULT|ALL ] [ TOTCOV=DEFAULT|ALL ] < keywordFMT=format > < keywordUNT=power > [STYLE=BOX|NCHS ] [ NDIMROW=integer ] [ NDIMCOL=integer ] [ FILENAME=filename ] [ REPLACE ] [ NOHEAD ] [ NODATE ] [ NOTIME ]; >...or... NSUM=label WSUM=label ... etc.

RUN;

Page 16: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

16

SUDAAN ProceduresDescriptive ProceduresDESCRIPT Procedure

The DESCRIPT procedure produces descriptive statistics for analysis variables, including means, totals, percentages, geometric means, medians and other quantiles, and their standard errors for sample surveys and other clustered data applications. The analysis variables can be continuous or categorical.DESCRIPT computes standardized means according to the method of direct standardization. The standardizing weights are assumed to be known.

Within one call to DESCRIPT, all analysis variables must be either continuous or categorical. The analysis of both continuous and categorical variables requires separate calls to the DESCRIPT procedure.For continuous analysis variables, you can request estimates of totals, means, proportions, geometric means, and quantiles.

For categorical variables, you can request estimates of totals, percentages, and their standard errors.You can request design effects for means, totals, and percentages. Design effects are not available for contrast statistics, standardized estimates, or post-stratified estimates.

DESCRIPT is primarily for the descriptive analysis of continuous (and sometimes discrete) variables, while CROSSTAB is primarily for descriptive analyses of categorical variables.

Page 17: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

17

SUDAAN ProceduresDescriptive Procedures

RATIO Procedure

The RATIO procedure produces ratio estimates and their standard errors for sample surveys and other clustered data applications. The numerator and denominator variables can be continuous or categorical.RATIO computes standardized means according to the method of direct standardization. The standardizing weights are assumed to be known.For continuous variables, RATIO computes a ratio of weighted sums. If VAR1 and VAR2 denote the numerator and denominator variables respectively, and the variable WT denotes the weight, then the ratio estimate is computed by summing over the analysis observations on the input data set. For categorical variables, RATIO computes a ratio of weighted counts of individuals falling into a specified response category, as follows:1) Any positive integer is a valid response category.2) The numerator is the weighted sum of individuals who gave the specified integer response to the numerator variable.3) The denominator is the weighted sum of individuals who gave the specified integer response to the denominator variable.

RATIO estimates can consist of a continuous numerator variable and a categorical denominator variable or vice versa. However, within one call to RATIO, all numerator variables must be of the same type, and all denominator variables must be of the same type.

Page 18: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

18

SUDAAN ProceduresRegression ProceduresREGRESS Procedure

The REGRESS procedure fits linear models to sample survey data and other clustered data and repeated measures applications. Estimates of the model parameters and their standard errors are computed, along with tests of hypotheses.

REGRESS offers GEE model fitting techniques for efficient parameter estimation. For estimating variance of the parameter estimates, REGRESS implements two robust methods described in Binder (1983) and Zeger and Liang (1986), as well as a model-based (naive) variance estimation method. A choice of independent or exchangeable "working" correlations is also provided.

You can specify tests for linear combinations of the model parameters, and you can output the predicted values, residuals, parameter estimates, and their associated variance-covariance matrix for further hypothesis testing. Also, you can estimate and test linear combinations of the adjusted group means (also known as least squares means).

Page 19: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

19

SUDAAN ProceduresRegression Procedures

LOGISTIC (RLOGIST) Procedure

The LOGISTIC procedure fits logistic regression models to complex sample survey data and other clustered data applications. LOGISTIC produces estimates of the model parameters and their standard errors, and tests the null hypothesis that individual regression coefficients associated with each variable in the model are equal to zero.

LOGISTIC also provides tests for overall model significance, model minus intercept, as well as model main effects and interactions. In addition, you can test linear combinations of the model parameters or output the parameter estimates and variance-covariance matrix to a data set for further hypothesis testing. You can also estimate and test linear combinations of the conditional and predicted marginals (generalizations of adjusted group means to non-linear models.)

The LOGISTIC procedure estimates model parameters using generalized estimating equations (GEE). A choice of independent vs. exchangeable "working" correlations is also provided. For estimating variance of the parameter estimates, LOGISTIC implements two robust methods described in Binder (1983) and Zeger and Liang (1986), as well as a model-based (naive) variance estimation method.

NOTE: For SAS-Callable SUDAAN, the name LOGISTIC conflicts with a SAS procedure of the same name. Use RLOGIST to invoke the SUDAAN logistic regression procedure.

Page 20: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

20

SUDAAN ProceduresRegression Procedures

MULTILOG Procedure

The MULTILOG procedure extends the modeling capabilities of SUDAAN to include categorical outcomes with more than two categories which may or may not have a natural ordering. These models can be viewed as generalizations of logit models for binary outcomes already available in SUDAAN in the LOGISTIC procedure. MULTILOG analyzes data from sample surveys as well as from randomized experiments and other observational studies involving cluster-correlated or longitudinal responses.

Two models have been implemented in the MULTILOG procedure: the proportional odds model with cumulative logit link for ordinal responses and a generalized multinomial logit model for nominal outcomes. Both models handle continuous as well as discrete explanatory variables. The generalized Multinomial Logit Model produces separate parameter vectors for each of the generalized logit equations of interest; the Proportional Odds Model produces a common slope but separate intercepts for each of the cumulative logit equations of interest.

The MULTILOG procedure estimates model parameters using generalized estimating equations (GEE). For estimating variance of the parameter estimates, MULTILOG implements two robust methods described in Binder (1983) and Zeger and Liang (1986), as well as a model-based (naive) variance estimation method. All three variance estimation methods allow a choice of independent vs exchangeable working correlations for describing the dependence of responses within clusters. By default, the GEE iterative fitting procedure in the exchangeable case uses the one-step approach, although a multistep GEE procedure can also be obtained.

MULTILOG produces estimates of the model parameters and their standard errors, and tests the null hypothesis that individual regression coefficients associated with each variable in the model are equal to zero. MULTILOG also provides tests for overall model significance, model minus intercept, as well as model main effects and interactions. In addition, you can test linear combinations of the model parameters and output many statistics to an output data set. You can also estimate and test linear combinations of the conditional and predicted marginals (generalizations of adjusted group means to non-linear models).

Page 21: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

21

SUDAAN ProceduresRegression ProceduresLOGLINK Procedure

The LOGLINK procedure in SUDAAN fits log-linear regression models to cluster-correlated count data not in the form of proportions. The counts are typically counts of events in a Poisson-like process. The LOGLINK procedure estimates model parameters using generalized estimating equations (GEE).

LOGLINK implements two robust variance estimation methods described in Binder (1983) and Zeger and Liang (1986), as well as a model-based (naive) variance estimation method. A choice of independent vs. exchangeable "working" correlations is also provided. You can specify tests for linear combinations of the model parameters, and you can output many statistics for further hypothesis testing. Also, you can estimate and test linear combinations of the conditional and predicted marginals (generalizations of adjusted group means to non-linear models).

Like all of SUDAAN's procedures, LOGLINK is designed to analyze data from complex sample surveys (weighted, stratified, cluster-correlated data) as well as from randomized experiments and other observational studies involving cluster-correlated or longitudinal responses.

Page 22: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

22

SUDAAN ProceduresRegression ProceduresSURVIVAL Procedure

SURVIVAL provides proportional hazards modeling for failure time outcomes, which may contain left- and right- censored observations, time-dependent covariates, and multiple events per subject.

The SURVIVAL procedure fits the discrete or continuous (Cox) proportional hazards model to sample surveys and other clustered data applications. Estimates of the model parameters and their standard errors are computed, along with tests of hypotheses.

Enhancements in the current software release are as follows:

• Counting process style of input (Andersen and Gill, 1982) to permit left truncation, multiple events per subject, and time-dependent covariates. A time-dependent covariate is one whose value for any given individual can change over time during the course of a study.

• Computation of Schoenfeld residuals and Score residuals to allow users to evaluate “goodness of fit” and the validity of the proportional hazards assumption.

• Computation of Efron's likelihood approximation for ties in addition to the current default formula by Breslow.

• Option to allow stratified baseline hazard functions for different types of failures or different subgroups of the population.

Page 23: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

23

Tunnusluvuteri ohjelmistoilla

TITLE1 'TUNNUSLUVUT';

TITLE2 'SAS MEANS'; TITLE2 'SAS MEANS + WEIGHT';PROC MEANS DATA=WORK.T2K_DATA PROC MEANS DATA=WORK.T2K_DATA N NMISS MEAN STDERR MAXDEC=3; N NMISS SUMWGT MEAN STDERR MAXDEC=3; CLASS SP2 T2K; WEIGHT WAN_UNIONI; VAR SYSTBP2; CLASS SP2 T2K; TYPES () SP2 T2K SP2*T2K; VAR SYSTBP2;RUN; TYPES () SP2 T2K SP2*T2K; RUN;

options nolabel;TITLE2 'SAS SURVEYMEANS'; TITLE2 'SUDAAN DESCRIPT';PROC SURVEYMEANS DATA=WORK.T2K_DATA PROC DESCRIPT DATA=WORK.T2K_DATA DESIGN=WR; NOBS NMISS MEAN STDERR SUMWGT; SETENV COLWIDTH=12 DECWIDTH=3; STRATA OSITE; NEST OSITE RYVAS; CLUSTER RYVAS; WEIGHT WAN_UNIONI; WEIGHT WAN_UNIONI; SUBGROUP SP2 T2K; DOMAIN T2K SP2 T2K*SP2; LEVELS 2 2; VAR SYSTBP2; VAR SYSTBP2;RUN; TABLES SP2*T2K;options label; PRINT / STYLE=NCHS; * tai STYLE=BOX;

RUN;

Page 24: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

24

TunnusluvutSAS Means

Analysis Variable : systbp2 Systolinen verenpaine

NN Obs N Miss Mean Std Error-------------------------------------------------------14395 13612 783 140.412 0.202-------------------------------------------------------

Tutkimus N(1=T2K,2=MS) N Obs N Miss Mean Std Error----------------------------------------------------------------------- 1 7178 6401 777 133.675 0.266 2 7217 7211 6 146.393 0.282-----------------------------------------------------------------------

Sukupuoli N (1=M,2=N) N Obs N Miss Mean Std Error----------------------------------------------------------------------- 1 6525 6220 305 140.036 0.266 2 7870 7392 478 140.729 0.298-----------------------------------------------------------------------

Sukupuoli Tutkimus N (1=M,2=N) (1=T2K,2=MS) N Obs N Miss Mean Std Error--------------------------------------------------------------------------------------- 1 1 3203 2899 304 134.618 0.357 2 3322 3321 1 144.765 0.368 2 1 3975 3502 473 132.893 0.385 2 3895 3890 5 147.783 0.417---------------------------------------------------------------------------------------

Page 25: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

25

TunnusluvutSAS Means + Weight

Analysis Variable : systbp2 Systolinen verenpaine

NN Obs N Miss Sum Wgts Mean Std Error-----------------------------------------------------------------------14395 13612 783 13716.104 139.854 0.200-----------------------------------------------------------------------

Tutkimus N(1=T2K,2=MS) N Obs N Miss Sum Wgts Mean Std Error--------------------------------------------------------------------------------------- 1 7178 6401 777 6497.937 133.482 0.262 2 7217 7211 6 7218.167 145.591 0.280---------------------------------------------------------------------------------------

Sukupuoli N (1=M,2=N) N Obs N Miss Sum Wgts Mean Std Error--------------------------------------------------------------------------------------- 1 6525 6220 305 6473.673 139.395 0.262 2 7870 7392 478 7242.431 140.265 0.296---------------------------------------------------------------------------------------

Sukupuoli Tutkimus N (1=M,2=N) (1=T2K,2=MS) N Obs N Miss Sum Wgts Mean Std Error----------------------------------------------------------------------------------------------------- 1 1 3203 2899 304 3102.263 134.416 0.355 2 3322 3321 1 3371.411 143.976 0.363 2 1 3975 3502 473 3395.674 132.628 0.379 2 3895 3890 5 3846.757 147.007 0.417-----------------------------------------------------------------------------------------------------

Page 26: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

26

TunnusluvutSAS Surveymeans

Data SummaryNumber of Strata 44Number of Clusters 5155Number of Observations 14395Sum of Weights 14404.1532 Statistics Sum of Std ErrorVariable N N Miss Weights Mean of Mean----------------------------------------------------------------------------------------systbp2 13612 783 13716 139.854495 0.329956----------------------------------------------------------------------------------------

Sum of Std Error t2k Variable N N Miss Weights Mean of Mean------------------------------------------------------------------------------------------------ 1 systbp2 6401 777 6497.936845 133.481608 0.428515 2 systbp2 7211 6 7218.167255 145.591493 0.488738------------------------------------------------------------------------------------------------

Sum of Std Error sp2 Variable N N Miss Weights Mean of Mean------------------------------------------------------------------------------------------------ 1 systbp2 6220 305 6473.673134 139.394726 0.335483 2 systbp2 7392 478 7242.430966 140.265460 0.422606------------------------------------------------------------------------------------------------

Sum of Std Error sp2 t2k Variable N N Miss Weights Mean of Mean---------------------------------------------------------------------------------------------------- 1 1 systbp2 2899 304 3102.262548 134.415902 0.485048 2 systbp2 3321 1 3371.410585 143.976079 0.467768 2 1 systbp2 3502 473 3395.674296 132.628044 0.515660 2 systbp2 3890 5 3846.756670 147.007290 0.616352----------------------------------------------------------------------------------------------------

Page 27: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

27

TunnusluvutSUDAAN Descript

Number of observations read : 14395 Weighted count : 14404Denominator degrees of freedom : 5111

Variance Estimation Method: Taylor Series (WR)by: Variable, Sukupuoli (1=M,2=N), Tutkimus (1=T2K,2=MS).

for: Variable = Systolinen verenpaine.

-----------------------------------------------------------------------------------------------Sukupuoli (1=M,2=N) Tutkimus Weighted (1=T2K,2=MS) Sample Size Size Total Mean SE Mean-----------------------------------------------------------------------------------------------Total Total 13612.000 13716.104 1918258.807 139.854 0.330 Missing 0.000 0.000 0.000 . . 1 6401.000 6497.937 867355.059 133.482 0.429 2 7211.000 7218.167 1050903.748 145.591 0.489Missing Total 0.000 0.000 0.000 . . Missing 0.000 0.000 0.000 . . 1 0.000 0.000 0.000 . . 2 0.000 0.000 0.000 . .1 Total 6220.000 6473.673 902395.895 139.395 0.336 Missing 0.000 0.000 0.000 . . 1 2899.000 3102.263 416993.419 134.416 0.485 2 3321.000 3371.411 485402.476 143.976 0.4682 Total 7392.000 7242.431 1015862.912 140.265 0.423 Missing 0.000 0.000 0.000 . . 1 3502.000 3395.674 450361.640 132.628 0.516 2 3890.000 3846.757 565501.272 147.007 0.616-----------------------------------------------------------------------------------------------

Page 28: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

28

Frekvenssiteri ohjelmistoilla

TITLE1 'FREKVENSSIT';

TITLE2 'SAS FREQ'; TITLE2 'SAS FREQ + WEIGHT'; PROC FREQ DATA=WORK.T2K_DATA; PROC FREQ DATA=WORK.T2K_DATA; TABLE SYSTBP2_123; WEIGHT WAN_UNIONI; RUN; TABLE SYSTBP2_123; PROC FREQ DATA=WORK.T2K_DATA; RUN; TABLE SYSTBP2_123; PROC FREQ DATA=WORK.T2K_DATA; BY T2K; WEIGHT WAN_UNIONI; RUN; TABLE SYSTBP2_123; BY T2K; RUN;

TITLE2 'SAS SURVEYMEANS'; TITLE2 'SUDAAN CROSSTAB'; PROC SURVEYMEANS DATA=WORK.T2K_DATA PROC CROSSTAB DATA=WORK.T2K_DATA DESIGN=WR; NOBS MEAN STDERR SUMWGT; SETENV COLWIDTH=12 DECWIDTH=3; STRATA OSITE; NEST OSITE RYVAS; CLUSTER RYVAS; WEIGHT WAN_UNIONI; WEIGHT WAN_UNIONI; SUBGROUP T2K SYSTBP2_123; DOMAIN T2K; LEVELS 2 3; VAR SYSTBP2_123; TABLES T2K*SYSTBP2_123; CLASS SYSTBP2_123; PRINT NSUM WSUM ROWPER SEROW / STYLE=NCHS;RUN; RUN;

Page 29: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

29

Frekvenssit SAS Freq

Syst.vp 3-luok.

Cumulative CumulativeSystBP2_123 Frequency Percent Frequency Percent---------------------------------------------------------------- 1 3663 25.45 3663 25.45 2 8217 57.08 11880 82.53 3 2515 17.47 14395 100.00

Tutkimus (1=T2K,2=MS)=1Syst.vp 3-luok.

Cumulative CumulativeSystBP2_123 Frequency Percent Frequency Percent---------------------------------------------------------------- 1 2741 38.19 2741 38.19 2 3735 52.03 6476 90.22 3 702 9.78 7178 100.00

Tutkimus (1=T2K,2=MS)=2 Syst.vp 3-luok.

Cumulative CumulativeSystBP2_123 Frequency Percent Frequency Percent---------------------------------------------------------------- 1 922 12.78 922 12.78 2 4482 62.10 5404 74.88 3 1813 25.12 7217 100.00

Page 30: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

30

Frekvenssit SAS Freq + Weight

Syst.vp 3-luok.

Cumulative CumulativeSystBP2_123 Frequency Percent Frequency Percent---------------------------------------------------------------- 1 3637.334 25.25 3637.334 25.25 2 8354.206 58.00 11991.54 83.25 3 2412.614 16.75 14404.15 100.00

Tutkimus (1=T2K,2=MS)=1Syst.vp 3-luok.

Cumulative CumulativeSystBP2_123 Frequency Percent Frequency Percent---------------------------------------------------------------- 1 2667.273 37.15 2667.273 37.15 2 3828.789 53.32 6496.062 90.47 3 684.0961 9.53 7180.158 100.00

Tutkimus (1=T2K,2=MS)=2Syst.vp 3-luok.

Cumulative CumulativeSystBP2_123 Frequency Percent Frequency Percent---------------------------------------------------------------- 1 970.0609 13.43 970.0609 13.43 2 4525.417 62.64 5495.478 76.07 3 1728.518 23.93 7223.995 100.00

Page 31: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

31

Frekvenssit SAS Surveymeans

Data SummaryNumber of Strata 44Number of Clusters 5155Number of Observations 14395Sum of Weights 14404.1532

Statistics

Sum of Std ErrorVariable N Weights Mean of Mean----------------------------------------------------------------------------SystBP2_123=1 3663 14404 0.252520 0.005200SystBP2_123=2 8217 14404 0.579986 0.005244SystBP2_123=3 2515 14404 0.167494 0.004260----------------------------------------------------------------------------

Tutkimus (1=T2K,2=MS) Sum of Std Error Variable N Weights Mean of Mean---------------------------------------------------------------------------------------- 1 SystBP2_123=1 2741 7180.157895 0.371478 0.008186 SystBP2_123=2 3735 7180.157895 0.533246 0.007138 SystBP2_123=3 702 7180.157895 0.095276 0.004580

2 SystBP2_123=1 922 7223.995328 0.134283 0.005741 SystBP2_123=2 4482 7223.995328 0.626442 0.007495 SystBP2_123=3 1813 7223.995328 0.239274 0.007120----------------------------------------------------------------------------------------

Page 32: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

32

Frekvenssit SUDAAN Crosstab

Number of observations read : 14395 Weighted count : 14404Denominator degrees of freedom : 5111

Variance Estimation Method: Taylor Series (WR)by: Tutkimus (1=T2K,2=MS), Syst.vp 3-luok..

--------------------------------------------------------------------------------Tutkimus (1=T2K,2=MS) Weighted SE Row Syst.vp 3-luok. Sample Size Size Row Percent Percent--------------------------------------------------------------------------------Total Total 14395.000 14404.153 100.000 0.000 1 3663.000 3637.334 25.252 0.520 2 8217.000 8354.206 57.999 0.524 3 2515.000 2412.614 16.749 0.4261 Total 7178.000 7180.158 100.000 0.000 1 2741.000 2667.273 37.148 0.819 2 3735.000 3828.789 53.325 0.714 3 702.000 684.096 9.528 0.4582 Total 7217.000 7223.995 100.000 0.000 1 922.000 970.061 13.428 0.574 2 4482.000 4525.417 62.644 0.750 3 1813.000 1728.518 23.927 0.712--------------------------------------------------------------------------------

Page 33: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

33

Lineaarinen mallieri ohjelmistoilla

TITLE1 'LINEAARINEN MALLI';

TITLE2 'SAS GLM + WEIGHT'; TITLE2 'SAS SURVEYREG';PROC GLM DATA=WORK.T2K_DATA; PROC SURVEYREG DATA=WORK.T2K_DATA; WEIGHT WAN_UNIONI; STRATA OSITE; CLASS SP2 IKA6 T2K; CLUSTER RYVAS; MODEL SYSTBP2 = SP2 IKA6 T2K BMI / SOLUTION; WEIGHT WAN_UNIONI;RUN; CLASS SP2 IKA6 T2K; MODEL SYSTBP2 = SP2 IKA6 T2K BMI /

SOLUTION; RUN;

TITLE2 'SUDAAN REGRESS';PROC REGRESS DATA=WORK.T2K_DATA DESIGN=WR; SETENV COLWIDTH=12 DECWIDTH=3; NEST OSITE RYVAS; WEIGHT WAN_UNIONI; SUBGROUP SP2 IKA6 T2K; LEVELS 2 6 2; MODEL SYSTBP2 = SP2 IKA6 T2K BMI; PREDMARG SP2 IKA6 T2K;RUN;

Page 34: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

34

Lineaarinen malliTestit

SAS GLM + WEIGHT: Source DF Type III SS Mean Square F Value Pr > F

sp2 1 4598.814 4598.814 12.85 0.0003 ika6 5 1505233.917 301046.783 841.38 <.0001 t2k 1 670714.692 670714.692 1874.54 <.0001 bmi 1 197789.472 197789.472 552.79 <.0001

SAS SURVEYREG: Effect Num DF F Value Pr > F

Model 8 526.87 <.0001 Intercept 1 13313.7 <.0001 sp2 1 13.07 0.0003 ika6 5 708.03 <.0001 t2k 1 610.56 <.0001 bmi 1 495.48 <.0001

SUDAAN REGRESS:-----------------------------------------------------------------Contrast Degrees of P-value Wald Freedom Wald F F-----------------------------------------------------------------OVERALL MODEL 9.000 34092.890 0.000MODEL MINUS INTERCEPT 8.000 525.793 0.000INTERCEPT . . .SP2 1.000 13.075 0.000IKA6 5.000 704.653 0.000T2K 1.000 610.521 0.000BMI 1.000 495.911 0.000-----------------------------------------------------------------

Page 35: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

35

Lineaarinen malliParametriestimaatit

SAS GLM + WEIGHT: Standard Parameter Estimate Error t Value Pr > |t|

Intercept 141.0322272 B 1.43648255 98.18 <.0001 sp2 1 1.1842537 B 0.33032660 3.59 0.0003 sp2 2 0.0000000 B . . . ika6 1 -32.3430867 B 1.04374694 -30.99 <.0001 ika6 2 -25.5086806 B 1.04840361 -24.33 <.0001 ika6 3 -17.1008806 B 1.05129964 -16.27 <.0001 ika6 4 -7.3126631 B 1.07586068 -6.80 <.0001 ika6 5 -1.6082852 B 1.11667995 -1.44 0.1498 ika6 6 0.0000000 B . . . t2k 1 -14.3704931 B 0.33191316 -43.30 <.0001 t2k 2 0.0000000 B . . . bmi 0.9326216 0.03966666 23.51 <.0001

SAS SURVEYREG: Standard Parameter Estimate Error t Value Pr > |t|

Intercept 141.032227 1.53280246 92.01 <.0001 sp2 1 1.184254 0.32756747 3.62 0.0003 sp2 2 0.000000 0.00000000 . . ika6 1 -32.343087 1.11845398 -28.92 <.0001 ika6 2 -25.508681 1.17469039 -21.72 <.0001 ika6 3 -17.100881 1.10502478 -15.48 <.0001 ika6 4 -7.312663 1.26905700 -5.76 <.0001 ika6 5 -1.608285 1.19456103 -1.35 0.1783 ika6 6 0.000000 0.00000000 . . t2k 1 -14.370493 0.58157558 -24.71 <.0001 t2k 2 0.000000 0.00000000 . . bmi 0.932622 0.04189813 22.26 <.0001

Page 36: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

36

Lineaarinen malliParametriestimaatit

SUDAAN REGRESS:

--------------------------------------------------------------------------------Independent Variables and P-value T- Effects Beta Coeff. SE Beta T-Test B=0 Test B=0--------------------------------------------------------------------------------Intercept 141.032 1.532 92.040 0.000Sukupuoli (1=M,2=N) 1 1.184 0.328 3.616 0.000 2 0.000 0.000 . .Ikäryhmä 1 -32.343 1.118 -28.920 0.000 2 -25.509 1.174 -21.721 0.000 3 -17.101 1.105 -15.481 0.000 4 -7.313 1.269 -5.764 0.000 5 -1.608 1.194 -1.347 0.178 6 0.000 0.000 . .Tutkimus (1=T2K,2=MS) 1 -14.370 0.582 -24.709 0.000 2 0.000 0.000 . .BodyMass-index 0.933 0.042 22.269 0.000--------------------------------------------------------------------------------

Page 37: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

37

Lineaarinen malliMallivakiointi

SUDAAN REGRESS:

--------------------------------------------------------------------------------Marginal Predicted Marginal SE T:Marg=0 P-value--------------------------------------------------------------------------------Sukupuoli (1=M,2=N) 1 140.496 0.346 406.176 0.000 2 139.312 0.394 353.964 0.000Ikäryhmä 1 127.070 0.332 383.051 0.000 2 133.904 0.439 305.297 0.000 3 142.312 0.393 362.442 0.000 4 152.100 0.642 236.785 0.000 5 157.804 0.755 208.987 0.000 6 159.413 1.090 146.270 0.000Tutkimus (1=T2K,2=MS) 1 132.072 0.382 345.813 0.000 2 146.443 0.475 308.568 0.000--------------------------------------------------------------------------------

Page 38: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

38

Poikkileikkaustutkimus / jatkuva vasteRegress

TITLE1 'POIKKILEIKKAUSTUTKIMUS / JATKUVA VASTE';

TITLE2 'SUDAAN REGRESS';PROC REGRESS DATA=WORK.T2K_DATA DESIGN=WR; SETENV COLWIDTH=12 DECWIDTH=3; NEST OSITE RYVAS; WEIGHT WAN_UNIONI; SUBPOPN T2K=1 / NAME="TERVEYS 2000"; SUBGROUP SP2 AA01 PORTAANNOUSU; LEVELS 2 4 2; MODEL SYSTBP2 = BMI SP2 SP2*T114 IKA2 AA01 PORTAANNOUSU; TEST WALDF SATADJF; REFLEVEL SP2=1; PREDMARG SP2; PRINT / TESTS=DEFAULT BETAS=ALL PRED_MRG=ALL;RUN;

Page 39: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

39

Poikkileikkaustutkimus / jatkuva vasteSUBPOPN

SUBPOPN EXAMPLE:By including the following statements in your SUDAAN program, you can limit the

analysis to records for which the value of the RACE variable is 2 (African-Americans in this case) and the value of the SEX variable is 2 (Females in this

case), and the value of the AGE variable is either less than 18 or over 65.

SUBGROUP RACE SEX;LEVELS 2 2;SUBPOPN RACE=2 & SEX=2 & (AGE<18 | AGE >65) / NAME='African-American Females not

in Labor Force';

WARNING:Expressions such as 18 <= AGE <= 65 are NOT appropriate on the SUBPOPN statement

and may lead to unexpected results.To indicate all values of AGE between 18 and 65, use the expression:(18 <= AGE) & (AGE <= 65).

Page 40: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

40

Poikkileikkaustutkimus / jatkuva vasteParametrit

Variance Estimation Method: Taylor Series (WR)SE Method: Robust (Binder, 1983)Working Correlations: IndependentLink Function: IdentityResponse variable SYSTBP2: Systolinen verenpaineFor Subpopulation: TERVEYS 2000

-----------------------------------------------------------------------------------------------Independent Variables and P-value T- Effects Beta Coeff. DEFF Beta #4 SE Beta T-Test B=0 Test B=0-----------------------------------------------------------------------------------------------Intercept 63.115 1.525 3.879 16.270 0.000Sukupuoli (1=M,2=N) 1 0.000 . 0.000 . . 2 -4.500 1.304 3.075 -1.463 0.143Siviilisääty 1 0.105 1.319 1.121 0.094 0.925 2 0.735 1.168 1.321 0.557 0.578 3 0.075 1.488 1.418 0.053 0.958 4 0.000 . 0.000 . .Kahden portaan nousu 1 2.980 1.475 1.304 2.285 0.022 2 0.000 . 0.000 . .BodyMass-index 0.874 1.178 0.061 14.341 0.000Ikä 0.696 1.010 0.022 31.338 0.000Sukupuoli (1=M,2=N), fS-Kol mmol/l 1, 1 1.471 1.025 0.328 4.482 0.000 2, 1 1.825 1.413 0.366 4.981 0.000-----------------------------------------------------------------------------------------------

Page 41: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

41

Poikkileikkaustutkimus / jatkuva vasteTestit

------------------------------------------------------------------------------------------------------------Contrast P-value Degrees of S_waite Adj S_waite Adj S_waite Adj P-value Wald Freedom DF F F Wald F F------------------------------------------------------------------------------------------------------------OVERALL MODEL 10.000 8.038 23195.089 0.000 17787.847 0.000MODEL MINUS INTERCEPT 9.000 7.899 198.420 0.000 220.470 0.000INTERCEPT . . . . . .SP2 1.000 1.000 2.142 0.143 2.142 0.143AA01 3.000 2.835 0.204 0.884 0.288 0.834PORTAANNOUSU 1.000 1.000 5.220 0.022 5.220 0.022BMI 1.000 1.000 205.668 0.000 205.668 0.000IKA2 1.000 1.000 982.072 0.000 982.072 0.000T114 * SP2 2.000 1.912 22.602 0.000 25.972 0.000------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------Marginal Predicted Marginal SE T:Marg=0 P-value--------------------------------------------------------------------------------Sukupuoli (1=M,2=N) 1 134.691 0.481 280.090 0.000 2 132.297 0.504 262.703 0.000--------------------------------------------------------------------------------

Page 42: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

42

Poikkileikkaustutkimus / binäärinen vasteRlogist (Logistic)

TITLE 'POIKKILEIKKAUSTUTKIMUS / BINÄÄRINEN (0/1) VASTE';

TITLE2 'SUDAAN RLOGIST (LOGISTIC)';PROC RLOGIST DATA=WORK.T2K_DATA DESIGN=WR; SETENV COLWIDTH=12 DECWIDTH=3; NEST OSITE RYVAS; WEIGHT WAN_UNIONI; SUBPOPN T2K=1 / NAME="TERVEYS 2000"; SUBGROUP SP2 AA01 PORTAANNOUSU; LEVELS 2 4 2; MODEL SYSTBP2_01 = BMI SP2 SP2*T114 IKA2 AA01 PORTAANNOUSU; TEST WALDF SATADJF; REFLEVEL SP2=1; PREDMARG SP2; PRINT / TESTS=DEFAULT BETAS=ALL PRED_MRG=ALL RISK=ALL;RUN;

Page 43: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

43

Poikkileikkaustutkimus / binäärinen vasteParametrit

Variance Estimation Method: Taylor Series (WR)SE Method: Robust (Binder, 1983)Working Correlations: IndependentLink Function: LogitResponse variable SYSTBP2_01: Syst.vp (0/1)For Subpopulation: TERVEYS 2000

-----------------------------------------------------------------------------------------------Independent Variables and P-value T- Effects Beta Coeff. DEFF Beta #4 SE Beta T-Test B=0 Test B=0-----------------------------------------------------------------------------------------------Intercept -9.214 1.436 0.561 -16.411 0.000Sukupuoli (1=M,2=N) 1 0.000 . 0.000 . . 2 -0.040 1.070 0.397 -0.102 0.919Siviilisääty 1 0.175 0.945 0.118 1.484 0.138 2 0.207 1.097 0.173 1.196 0.232 3 0.215 1.308 0.171 1.263 0.207 4 0.000 . 0.000 . .Kahden portaan nousu 1 0.442 1.286 0.149 2.964 0.003 2 0.000 . 0.000 . .BodyMass-index 0.086 1.061 0.008 11.012 0.000Ikä 0.078 1.126 0.003 22.312 0.000Sukupuoli (1=M,2=N), fS-Kol mmol/l 1, 1 0.216 1.166 0.047 4.583 0.000 2, 1 0.199 1.206 0.047 4.193 0.000-----------------------------------------------------------------------------------------------

Page 44: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

44

Poikkileikkaustutkimus / binäärinen vasteTestit

------------------------------------------------------------------------------------------------------------Contrast P-value Degrees of S_waite Adj S_waite Adj S_waite Adj P-value Wald Freedom DF F F Wald F F------------------------------------------------------------------------------------------------------------OVERALL MODEL 10.000 8.603 106.794 0.000 142.211 0.000MODEL MINUS INTERCEPT 9.000 8.123 89.622 0.000 111.093 0.000INTERCEPT . . . . . .SP2 1.000 1.000 0.010 0.919 0.010 0.919AA01 3.000 2.877 0.786 0.497 0.763 0.515PORTAANNOUSU 1.000 1.000 8.784 0.003 8.784 0.003BMI 1.000 1.000 121.267 0.000 121.267 0.000IKA2 1.000 1.000 497.811 0.000 497.811 0.000T114 * SP2 2.000 1.987 19.472 0.000 18.094 0.000------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------Marginal Predicted Marginal SE T:Marg=0 P-value--------------------------------------------------------------------------------Sukupuoli (1=M,2=N) 1 0.323 0.010 31.989 0.000 2 0.299 0.010 30.350 0.000--------------------------------------------------------------------------------

Page 45: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

45

Poikkileikkaustutkimus / binäärinen vasteOR

-----------------------------------------------------------------Independent Variables and Lower 95% Upper 95% Effects Odds Ratio Limit OR Limit OR-----------------------------------------------------------------Intercept 0.000 0.000 0.000Sukupuoli (1=M,2=N) 1 1.000 1.000 1.000 2 0.961 0.441 2.090Siviilisääty 1 1.191 0.945 1.500 2 1.230 0.876 1.726 3 1.240 0.888 1.733 4 1.000 1.000 1.000Kahden portaan nousu 1 1.555 1.161 2.083 2 1.000 1.000 1.000BodyMass-index 1.090 1.074 1.107Ikä 1.081 1.073 1.088Sukupuoli (1=M,2=N), fS-Kol mmol/l 1, 1 1.241 1.131 1.360 2, 1 1.220 1.112 1.339-----------------------------------------------------------------

Page 46: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

46

Poikkileikkaustutkimus / moniluokkainen vasteMultilog

TITLE 'POIKKILEIKKAUSTUTKIMUS / MONILUOKKAINEN VASTE';

TITLE2 'SUDAAN MULTILOG';PROC MULTILOG DATA=WORK.T2K_DATA DESIGN=WR; SETENV COLWIDTH=12 DECWIDTH=3; NEST OSITE RYVAS; WEIGHT WAN_UNIONI; SUBPOPN T2K=1 / NAME="TERVEYS 2000"; SUBGROUP SYSTBP2_123 SP2 AA01 PORTAANNOUSU; LEVELS 3 2 4 2; MODEL SYSTBP2_123 = BMI SP2 T114 IKA2 AA01 PORTAANNOUSU / CUMLOGIT; TEST WALDF SATADJF; REFLEVEL SP2=1; PREDMARG SP2; PRINT / TESTS=DEFAULT BETAS=ALL PRED_MRG=ALL STYLE=NCHS;RUN;

Page 47: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

47

Poikkileikkaustutkimus / moniluokkainen vasteParametrit

-----------------------------------------------------------------------------------------------SYSTBP2_123 (log-odds) Independent Variables and P-value T- Effects Beta Coeff. DEFF Beta #4 SE Beta T-Test B=0 Test B=0-----------------------------------------------------------------------------------------------1 vs 3 Intercept 14.365 0.996 0.694 20.689 0.000 Sukupuoli (1=M,2=N) 1 0.000 . 0.000 . . 2 0.305 1.073 0.120 2.542 0.011 Siviilisääty 1 -0.221 0.953 0.204 -1.084 0.278 2 -0.381 0.987 0.282 -1.350 0.177 3 -0.208 1.102 0.267 -0.780 0.435 4 0.000 . 0.000 . . Kahden portaan nousu 1 -0.782 1.006 0.227 -3.447 0.001 2 0.000 . 0.000 . . Ikä -0.126 0.959 0.005 -23.191 0.000 BodyMass-index -0.148 1.049 0.013 -11.145 0.000 fS-Kol mmol/l -0.281 1.090 0.052 -5.356 0.0002 vs 3 Intercept 7.811 0.832 0.542 14.412 0.000 Sukupuoli (1=M,2=N) 1 0.000 . 0.000 . . 2 -0.185 0.845 0.094 -1.975 0.048 Siviilisääty 1 -0.265 0.924 0.141 -1.882 0.060 2 -0.449 0.992 0.233 -1.930 0.054 3 -0.266 0.998 0.197 -1.352 0.177 4 0.000 . 0.000 . . Kahden portaan nousu 1 -0.231 1.014 0.154 -1.499 0.134 2 0.000 . 0.000 . . Ikä -0.066 0.883 0.004 -14.975 0.000 BodyMass-index -0.032 1.086 0.011 -2.902 0.004 fS-Kol mmol/l -0.112 1.041 0.043 -2.592 0.010-----------------------------------------------------------------------------------------------

Page 48: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

48

Poikkileikkaustutkimus / moniluokkainen vasteTestit

------------------------------------------------------------------------------------------------------------Contrast P-value Degrees of S_waite Adj S_waite Adj S_waite Adj P-value Wald Freedom DF F F Wald F F------------------------------------------------------------------------------------------------------------OVERALL MODEL 18.000 14.913 103.271 0.000 107.345 0.000MODEL MINUS INTERCEPT 16.000 14.485 65.961 0.000 58.829 0.000INTERCEPT . . . . . .SP2 2.000 1.925 25.720 0.000 25.057 0.000AA01 6.000 5.811 0.718 0.630 0.859 0.524PORTAANNOUSU 2.000 1.935 6.590 0.002 6.442 0.002IKA2 2.000 1.984 285.183 0.000 277.345 0.000BMI 2.000 1.993 94.348 0.000 99.011 0.000T114 2.000 1.995 17.109 0.000 16.575 0.000--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Syst.vp 3-luok. Predicted Marginal Marginal SE T:Marg=0 P-value--------------------------------------------------------------------------------1 Sukupuoli (1=M,2=N) 1 0.266 0.011 24.838 0.000 2 0.347 0.009 38.501 0.0002 Sukupuoli (1=M,2=N) 1 0.633 0.011 58.495 0.000 2 0.545 0.009 62.273 0.0003 Sukupuoli (1=M,2=N) 1 0.101 0.006 15.619 0.000 2 0.109 0.007 16.498 0.000--------------------------------------------------------------------------------

Page 49: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

49

Kahden otoksen vertailu / jatkuva vasteRegress

TITLE1 'KAHDEN OTOKSEN VERTAILU / JATKUVA VASTE';

TITLE2 'SUDAAN REGRESS';PROC REGRESS DATA=WORK.T2K_DATA DESIGN=WR; SETENV COLWIDTH=12 DECWIDTH=3; NEST OSITE RYVAS; WEIGHT WAN_UNIONI; SUBGROUP T2K SP2 AA01 PORTAANNOUSU; LEVELS 2 2 4 2; MODEL SYSTBP2 = T2K BMI SP2 IKA2 AA01 PORTAANNOUSU; TEST SATADJF; REFLEVEL T2K=1; PREDMARG T2K;RUN;

Page 50: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

50

Kahden otoksen vertailu / binäärinen vasteRlogist (Logistic)

TITLE 'KAHDEN OTOKSEN VERTAILU / BINÄÄRINEN VASTE';

TITLE2 'SUDAAN RLOGIST (LOGISTIC)';PROC RLOGIST DATA=WORK.T2K_DATA DESIGN=WR; SETENV COLWIDTH=12 DECWIDTH=3; NEST OSITE RYVAS; WEIGHT WAN_UNIONI; SUBGROUP T2K SP2 AA01 PORTAANNOUSU; LEVELS 2 2 4 2; MODEL SYSTBP2_01 = T2K BMI SP2 IKA2 AA01 PORTAANNOUSU; TEST SATADJF; REFLEVEL T2K=1; PREDMARG T2K;RUN;

Page 51: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

51

Kahden otoksen vertailu / moniluokkainen vasteMultilog

TITLE 'KAHDEN OTOKSEN VERTAILU / MONILUOKKAINEN VASTE';

TITLE2 'SUDAAN MULTILOG';PROC MULTILOG DATA=WORK.T2K_DATA DESIGN=WR; SETENV COLWIDTH=12 DECWIDTH=3; NEST OSITE RYVAS; WEIGHT WAN_UNIONI; SUBGROUP SYSTBP2_123 T2K SP2 AA01 PORTAANNOUSU; LEVELS 3 2 2 4 2; MODEL SYSTBP2_123 = T2K BMI SP2 IKA2 AA01 PORTAANNOUSU / CUMLOGIT; TEST SATADJF; REFLEVEL T2K=1; PREDMARG T2K; PRINT / STYLE=NCHS;RUN;

Page 52: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

52

Ajonaikainen uudelleen luokitteluRecode

TITLE1 'AJONAIKAINEN UUDELLEEN LUOKITTELU';

TITLE2 'RECODE';PROC CROSSTAB DATA=WORK.T2K_DATA DESIGN=WR; SETENV COLWIDTH=12 DECWIDTH=3; NEST OSITE RYVAS; WEIGHT WAN_UNIONI; RECODE SYSTBP2_01=(0 1); SUBGROUP T2K SYSTBP2_01; LEVELS 2 2; TABLES T2K*SYSTBP2_01; PRINT NSUM ROWPER / STYLE=NCHS;RUN;

RECODE EXAMPLES:

RECODE X = 1.5;will recode the continuous or categorical variable X to a 0-1 variable whose

value is 0 if the input value is less than 1.5 and 1 if the input value is greater than or equal to 1.5.

RECODE ZERONE = (0 1);recodes the 0-1 variable ZERONE to be a 1-2 variable suitable for use on the

SUBGROUP statement. Level 0 goes to 1; level 1 goes to 2.

Page 53: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

53

Ajonaikainen uudelleen luokitteluEnnen - jälkeen

-------------------------------------------------- --------------------------------------------------Tutkimus Tutkimus (1=T2K,2=MS) (1=T2K,2=MS) Syst.vp (0/1) Sample Size Row Percent Syst.vp (0/1) Sample Size Row Percent-------------------------------------------------- --------------------------------------------------Total Total Total 5885.000 100.000 Total 14395.000 100.000 1 5885.000 100.000 1 8510.000 59.909 2 0.000 0.000 2 5885.000 40.0911 1 Total 2022.000 100.000 Total 7178.000 100.000 1 2022.000 100.000 1 5156.000 71.840 2 0.000 0.000 2 2022.000 28.1602 2 Total 3863.000 100.000 Total 7217.000 100.000 1 3863.000 100.000 1 3354.000 48.050 2 0.000 0.000 2 3863.000 51.950-------------------------------------------------- --------------------------------------------------

Page 54: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

54

Suora vakiointiDescript + Stdvar & Stdwgt

TITLE1 'SUORA VAKIOINTI';

TITLE2 'SUDAAN DESCRIPT + STDVAR & STDWGT';PROC DESCRIPT DATA=WORK.T2K_DATA DESIGN=WR; NEST OSITE RYVAS; WEIGHT WAN_UNIONI; SUBGROUP IKA6 T2K; LEVELS 6 2; STDVAR IKA6; STDWGT .1 .1 .2 .3 .2 .1; * summa=1; * STDWGT 10 10 20 30 20 10; * summa=100; * STDWGT 20000 20000 40000 60000 40000 20000; * ohjelma skaalaa itse; VAR SYSTBP2; TABLES T2K; PRINT / STYLE=NCHS;RUN;

Page 55: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

55

Suora vakiointiEnnen - jälkeen

-------------------------------------------------------------------------------------Variable Tutkimus Sample Weighted (1=T2K,2=MS) Size Size Total Mean SE Mean-------------------------------------------------------------------------------------Systolinen verenpaine Total 13612 13716.10 1918258.81 139.85 0.33 1 6401 6497.94 867355.06 133.48 0.43 2 7211 7218.17 1050903.75 145.59 0.49-------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------Variable Tutkimus Sample Weighted (1=T2K,2=MS) Size Size Total Mean SE Mean-------------------------------------------------------------------------------------Systolinen verenpaine Total 13612 13716.10 1918258.81 147.73 0.37 1 6401 6497.94 867355.06 140.09 0.47 2 7211 7218.17 1050903.75 155.13 0.60-------------------------------------------------------------------------------------

Page 56: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

56

Mallivakioidut keskiarvot tiedostoonRegress + Output

TITLE1 'MALLIVAKIOIDUT KESKIARVOT TIEDOSTOON';

TITLE2 'SUDAAN REGRESS + OUTPUT';PROC REGRESS DATA=WORK.T2K_DATA DESIGN=WR; NEST OSITE RYVAS; WEIGHT WAN_UNIONI; SUBGROUP SP2 IKA6 T2K; LEVELS 2 6 2; MODEL SYSTBP2 = SP2 IKA6 T2K BMI; PREDMARG SP2 IKA6 T2K; OUTPUT / FILENAME=MARGIN FILETYPE=SAS REPLACE PRED_MRG=ALL;RUN;

PROC PRINT DATA=MARGIN LABEL;RUN;

Page 57: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

57

Mallivakioidut keskiarvot tiedostoonSUDAAN - tulostus

--------------------------------------------------------------------------------Marginal Predicted Marginal SE T:Marg=0 P-value--------------------------------------------------------------------------------Sukupuoli (1=M,2=N) 1 140.496 0.346 406.176 0.000 2 139.312 0.394 353.964 0.000Ikäryhmä 1 127.070 0.332 383.051 0.000 2 133.904 0.439 305.297 0.000 3 142.312 0.393 362.442 0.000 4 152.100 0.642 236.785 0.000 5 157.804 0.755 208.987 0.000 6 159.413 1.090 146.270 0.000Tutkimus (1=T2K,2=MS) 1 132.072 0.382 345.813 0.000 2 146.443 0.475 308.568 0.000--------------------------------------------------------------------------------

Page 58: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

58

Mallivakioidut keskiarvot tiedostoonSAS - tulostus

Procedure Table PredictedObs Number Number Marginal Marginal SE T:Marg=0 P-value

1 4 1 1 140.496 0.346 406.176 0.000 2 4 1 2 139.312 0.394 353.964 0.000 3 4 1 3 127.070 0.332 383.051 0.000 4 4 1 4 133.904 0.439 305.297 0.000 5 4 1 5 142.312 0.393 362.442 0.000 6 4 1 6 152.100 0.642 236.785 0.000 7 4 1 7 157.804 0.755 208.987 0.000 8 4 1 8 159.413 1.090 146.270 0.000 9 4 1 9 132.072 0.382 345.813 0.000 10 4 1 10 146.443 0.475 308.568 0.000

Page 59: Sudaan - koulutus KTL/TTO 2004. 2 Research Triangle Institute

59

Kiitos!