Solved
Contributor
Posts: 27

# output for overall claculation

**** DUPLICATE THE INCOMING DATASET FOR OVERALL COLUMN CALCULATIONS

**** SO NOW TRT HAS VALUES 0 = PLACEBO, 1 = ACTIVE, AND 2 = OVERALL.;

output;

trtpn = 2;

output;

run;

Can someone explain the trtpn=2; output ; for overall column calculation..I came across this in the Sas for pharama book.

Thanks.

Accepted Solutions
Solution
‎04-21-2015 03:28 PM
Super User
Posts: 23,754

## Re: output for overall claculation

Assuming that there is a variable trtpn in the data set this would create a new row for each observation with a different value of trtpn. A quick way of duplicating data or adding records when required. Note the number of records in each dataset.

Here's an example you can run:

data class;

set sashelp.class;

Class=1;

run;

data class_duplicates;

set class;

output;

Class=2;

output;

run;

proc freq data=class_duplicates;

table class;

run;

All Replies
Valued Guide
Posts: 864

## Re: output for overall claculation

this is creating a variable named trtpn with a value of 2.

Solution
‎04-21-2015 03:28 PM
Super User
Posts: 23,754

## Re: output for overall claculation

Assuming that there is a variable trtpn in the data set this would create a new row for each observation with a different value of trtpn. A quick way of duplicating data or adding records when required. Note the number of records in each dataset.

Here's an example you can run:

data class;

set sashelp.class;

Class=1;

run;

data class_duplicates;

set class;

output;

Class=2;

output;

run;

proc freq data=class_duplicates;

table class;

run;

🔒 This topic is solved and locked.