SAS proc 格式语句 [英] SAS proc format statement

查看:45
本文介绍了SAS proc 格式语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在数字变量(例如年龄)上创建格式以将结果视为> 10".我试过:

I want to create a format on a numeric variable (say, age) to see the result as ">10". I tried as:

PROC FORMAT;
  VALUE agefmt 
    >10 - high  = '> 10'     /*10 to be excluded.*/
    other      = '<= 10'
    ;
RUN;

但它不起作用.请帮忙.

But it does not work. Please help.

推荐答案

你犯了一个小错误,> 必须是 <和值之间:

You made just a small mistake, the > must be < and between the values:

 PROC FORMAT;
   VALUE agefmt 
     10 <- high  = '> 10'     /*10 to be excluded.*/
     other      = '<= 10'
   ;
RUN;

这篇关于SAS proc 格式语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆