Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- General Programming
- /
- how to delete row and column from the output

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-10-2013 09:31 PM

** **

**How do I delete the rows and column that are in yellow bolow. I want table 1 to look like table 2 below.**

** **

** **

**proc** **means** data=para noprint; class Variable; var estimate; output out=two mean(estimate)=col1

std(estimate)=col2 mean(StdErr)=col3;

**run**;

**Table 1**

Obs | Variable | _TYPE_ | _FREQ_ | col1 | col2 | col3 |

1 | 0 | 40 | 5.91033 | 3.42236 | 0.92869 | |

2 | Intercept | 1 | 20 | 2.61495 | 0.08503 | 0.13475 |

3 | TIMES | 1 | 20 | 9.20571 | 1.08266 | 1.72264 |

**Table 2**

** **

Obs | Variable | _ FREQ_ | col1 | col2 | col3 | |

2 | Intercept | 20 | 2.61495 | 0.08503 | 0.13475 | |

3 | TIMES | 20 | 9.20571 | 1.08266 | 1.72264 |

Accepted Solutions

Solution

02-10-2013
09:41 PM

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to desireatem

02-10-2013 09:41 PM

You can prevent PROC MEANS from generating the _TYPE_=0 row by adding the NWAY option.

You could drop the _TYPE_ column by using dsoption on output data set.

**proc** **means** nway data=para noprint;

class Variable;

var estimate;

output out=two (drop=_type_)

mean(estimate)=col1

std(estimate)=col2

mean(StdErr)=col3

;

run;

All Replies

Solution

02-10-2013
09:41 PM

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to desireatem

02-10-2013 09:41 PM

You can prevent PROC MEANS from generating the _TYPE_=0 row by adding the NWAY option.

You could drop the _TYPE_ column by using dsoption on output data set.

**proc** **means** nway data=para noprint;

class Variable;

var estimate;

output out=two (drop=_type_)

mean(estimate)=col1

std(estimate)=col2

mean(StdErr)=col3

;

run;

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to desireatem

02-10-2013 09:49 PM

Thanks a lot Tom