全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
4825 9
2010-02-27
这个问题比较愚蠢。但是我实在搜不到答案,就只有发帖了

默认的是h0=0, 但是有没有可能改成h0<0呢?  我写过  h0<0    或 h0 le 0 , 都不能执行。难道sas 的ttest不能做单侧检验啊?


要是我想看看均值是不是显著大于5,怎么办呢?

是不是有什么其他方法啊?

谢谢各位牛牛!!!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2010-2-27 13:46:02
要包含等号
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2010-2-27 14:03:39
51   proc ttest data=c h0<=0; var avgret sprtrn;run;
                         --
                         73
                         200

ERROR 73-322: Expecting an =.

ERROR 200-322: The symbol is not recognized and will be ignored.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2010-2-27 14:38:40
印象中 SAS做t检验都是two-sided,要做one-sided简单的就用ttest的output手动算P-value。如果统计功底过关,这应该没有什么问题!!!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2010-2-27 14:42:43
here,刚从SAS的网页上找到的,希望有用。按照你的意思,应该就是 Ho=5 sides=U
http://support.sas.com/documenta ... tug.ttest.tteproch0

Table 92.2 PROC TTEST Statement Options Option
Description

Basic Options

DATA=
specifies input data set

ORDER=
determines sort order of CLASS variable or CROSSOVER treatment variables

Analysis Options

ALPHA=
specifies  confidence level

DIST=
specifies distributional assumption (normal or lognormal)

H0=
specifies null value

SIDES=
specifies number of sides and direction

TEST=
specifies test criterion (difference or ratio)

TOST
requests equivalence test and specifies bounds

Displayed Output

CI=
requests confidence interval for standard deviation or CV

COCHRAN
requests Cochran  test

PLOTS
produces ODS statistical graphics

Output Ordering

BYVAR
groups results by PAIRED or VAR variables

NOBYVAR
groups results by tables

H0=m
requests tests against a null value of , unless the TOST option is used, in which case  is merely used to derive the lower and upper equivalence bounds. For the crossover design, the value  applies for both treatment and period tests. By default, PROC TTEST uses H0=0 when TEST=DIFF (or DIST=NORMAL for a one-sample design) and H0=1 when TEST=RATIO (or DIST=LOGNORMAL for a one-sample design).

SIDES=2 | L | U
SIDED=2 | L | U
SIDE=2 | L | U
specifies the number of sides (or tails) and direction of the statistical tests and test-based confidence intervals. The values are interpreted as follows:

SIDES=2
(the default) specifies two-sided tests and confidence intervals for means.

SIDES=L
specifies lower one-sided tests, in which the alternative hypothesis indicates a mean less than the null value, and lower one-sided confidence intervals between minus infinity and the upper confidence limit.

SIDES=U
specifies upper one-sided tests, in which the alternative hypothesis indicates a mean greater than the null value, and upper one-sided confidence intervals between the lower confidence limit and infinity.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2010-2-27 17:46:53
SAS默认是检验two-side, 你需要修改语句就可以做单边检验
但是单边检验SAS9.1.3没有,不过其计算的p-value乘2就是单边的了
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群