简体   繁体   English

是否有 SAS PROC 语句允许我使用指标变量来创建多元线性回归模型?

[英]Is there a SAS PROC statement that allows me to use indicator variables to create a multiple linear regression model?

I am trying to find a multiple linear regression model and use numerical data as an indicator variable to tread it as qualitative data.我试图找到一个多元线性回归模型,并使用数值数据作为指标变量将其作为定性数据。 For example, if one of the variables was "cars owned" and the responses were 1, 2, or 3, I would want to use an indicator variable.例如,如果变量之一是“拥有的汽车”并且响应是 1、2 或 3,我想使用指示变量。

You may want to have a look at the CLASS statement in PROC GLM .您可能想查看PROC GLM中的CLASS 语句 By placing a variable in CLASS, you instruct SAS to treat it as categorical and convert it into classification variables (that is what you call indicators).通过在 CLASS 中放置一个变量,您可以指示 SAS 将其视为分类变量并将其转换为分类变量(这就是您所说的指标)。 To control which level is used as a reference, use ORDER = option in PROC GLM statement ( details here ).要控制将哪个级别用作参考,请在 PROC GLM 语句中使用ORDER =选项( 详情请点击此处)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM