如何防止中点延长 [英] how to prevent midpoints from extending

查看:34
本文介绍了如何防止中点延长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下代码

proc univariate data=work.dataset noprint;
    histogram value / barwidth=.05 midpoints=(-2.45 to 2.45 by .05) outhist=data_bin nochart;

运行;我在日志中收到此警告消息警告:MIDPOINTS= 列表已扩展以容纳数据.

run; I get this warning message in the log WARNING: The MIDPOINTS= list was extended to accommodate the data.

我基本上想防止中点延伸我希望它们从 -2.5 开始到 2.5 结束.

I basically want to prevent the midpoints from extending I want them to start from -2.5 and end at 2.5.

已解决

只需要在 proc 步骤之前对数据进行 bin 处理

Just need to bin the data before the proc step

推荐答案

SOLVED

基本上在数据创建点,我将变量 value 的值限制在 -2.5 到 2.5 的范围内.

Basically at data creation point I cap the values of variable value in between the range of -2.5 and 2.5.

代码还是一样,只是在data里加了一个if语句来剔除-2.5到2.5的数据

The code still remains the same just added a if statement in data to cull the data from -2.5 to 2.5

这篇关于如何防止中点延长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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