由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - 【包子】弱问个dummy variable问题
相关主题
[急求助] survival analysis (SAS)再请教一个PROC SQL JOIN的问题。。。。
关于stepwise programming一个SAS问题(transpose?)
请问sas中一个变量的内容被两个左斜杠(/)分成了三部分A SAS question
怎样用R定位变量的位置怎样储存我想要的proc means 的结果?
怎样用R除掉DUPLICATED RECORDHow to change sas dataset column order
[合集] └ Re: 关于stepwise programmingmixed models
Ask 2 simple SAS questions,thanksSAS question
请问SAS中如何通过组内一个变量的值控制整组变量新手请教大家一个sas 问题,多谢指教
相关话题的讨论汇总
话题: var1话题: model话题: var3话题: var2话题: dummy
进入Statistics版参与讨论
1 (共1页)
S********a
发帖数: 359
1
如果有个变量 var1, 有四个值(categorical variable)分别是a,b,c,d,然后我run一个GLM model 1 如下,var2 和 var3也是categorical variables:
model y=var1 var2 var3;
我再把var1细分成4个dummy variables, 如果var1=a则 var1a=1, 否则var1a=0. var1b, var1c, var1d 同理,再run GLM model 2 如下:
model y=var1b var1c var1d var2 var3;
俩个model我都是用var1=a做reference group, 我可以说俩个model是等价的吗?如果可以,为什么STD ERROR,P-VALUE,还有代入同样变量值组合得到的Y不相等呢,虽然差的不太多。
l*********s
发帖数: 5409
2
How did you get the first model to work in SAS? Amazing.
s*r
发帖数: 2757
3
3 dummies
S********a
发帖数: 359
4
model y=var1 var2 var3 /solution;
sorry for misleading you.

【在 l*********s 的大作中提到】
: How did you get the first model to work in SAS? Amazing.
S********a
发帖数: 359
5
第二个模型里没有包括第一个dummy (var1a)

【在 s*r 的大作中提到】
: 3 dummies
e****t
发帖数: 766
6
do you have missing when recoding ?
A*******s
发帖数: 3942
7
no class statement?

【在 S********a 的大作中提到】
: model y=var1 var2 var3 /solution;
: sorry for misleading you.

l*********s
发帖数: 5409
8
how are you certain SAS is using the first level of var1 as reference? By default the opposite is the case.
The coding schemes are all equivalent w.r.t linear transformation. As such,
the statistical characteristics won't change at all. But, the invariance
property is about the full model, not about individual parameters.You are
barking up the wrong tree here.
However, if your predictive estimates are different,even by a slight margin, you have very serious troubles, indicating your coding is wrong.


【在 S********a 的大作中提到】
: 第二个模型里没有包括第一个dummy (var1a)
S********a
发帖数: 359
9
确实是一个missing捣的乱,太感谢了,现在两个模型的estimate一样了,接包子

【在 e****t 的大作中提到】
: do you have missing when recoding ?
S********a
发帖数: 359
10
有,原贴没写

【在 A*******s 的大作中提到】
: no class statement?
S********a
发帖数: 359
11
reference group可以任意指定,不一定非用sas default的那个,我的错误是在建
dummy variable的时候忽略了一个missing,造成slightly difference on estimate,
after correcting it, they are all the same. Thank you for your time. 包子奉
上。

default the opposite is the case.
,
margin, you have very serious troubles, indicating your coding is wrong.

【在 l*********s 的大作中提到】
: how are you certain SAS is using the first level of var1 as reference? By default the opposite is the case.
: The coding schemes are all equivalent w.r.t linear transformation. As such,
: the statistical characteristics won't change at all. But, the invariance
: property is about the full model, not about individual parameters.You are
: barking up the wrong tree here.
: However, if your predictive estimates are different,even by a slight margin, you have very serious troubles, indicating your coding is wrong.
:

1 (共1页)
进入Statistics版参与讨论
相关主题
新手请教大家一个sas 问题,多谢指教怎样用R除掉DUPLICATED RECORD
请问如果用SAS 解决这个问题[合集] └ Re: 关于stepwise programming
help! 读CSV文件读得要崩溃了Ask 2 simple SAS questions,thanks
请教关于SAS表格输出的问题请问SAS中如何通过组内一个变量的值控制整组变量
[急求助] survival analysis (SAS)再请教一个PROC SQL JOIN的问题。。。。
关于stepwise programming一个SAS问题(transpose?)
请问sas中一个变量的内容被两个左斜杠(/)分成了三部分A SAS question
怎样用R定位变量的位置怎样储存我想要的proc means 的结果?
相关话题的讨论汇总
话题: var1话题: model话题: var3话题: var2话题: dummy