全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1641 2
2011-05-12
有一组数据,自变量是q,l,分别是朝向和楼层,分别只能取2个值,0,1。还有因变量p,是价钱,问Using a model without an interaction term:
(1) Is there reasonable basis to suspect that houses which border the river differ in predicted sales
price from houses which border the mountains? If so, what is your best estimate of the dollar value
of this difference?
(2) Is there reasonable basis to suspect that houses which have 1 level differ in predicted sales price
from houses which have 2 levels? If so, what is your best estimate of the dollar value of this
difference?
(3) What is the predicted difference in sales price between 1-level houses bordering the river and 2-
level houses bordering the mountains? (For this question, a minimal amount of hand computation
may be involved.)
Using a model with an interaction term:
(4) Is there reasonable basis to suspect that houses which border the river differ in predicted sales
price from houses which border the mountains? If so, what is your best estimate of the dollar value
of this difference?
(5) Is there reasonable basis to suspect that houses which have 1 level differ in predicted sales price
from houses which have 2 levels? If so, what is your best estimate of the dollar value of this
difference?
(6) Is there reasonable basis to suspect that the answer to Question (4) differs depending on number of
levels? If so, what is your best estimate of the difference in differences?
(7) Is there reasonable basis to suspect that the answer to Question (5) differs depending on quadrant?
If so, what is your best estimate of the difference in differences?
(8) What is the predicted difference in sales price between 1-level houses bordering the river and 2-
level houses bordering the mountains? Can we be reasonably confident that this difference is
anything other than zero in the population?


我写的程序是

data lab5_data_Housing;
infile "D:\Documents\Dropbox\Books\lab\lab5.txt";
input price 1-4 quadrant $ 6 levels 8;

run;

proc glm data = lab5_data_Housing;
classes quadrant levels;
model price= quadrant levels/solution;
means quadrant levels ;
estimate "N, 1" intercept 1 quadrant 1 0 levels 1 0;
estimate "N, 2" intercept 1 quadrant 1 0 levels 0 1;
estimate "S, 1" intercept 1 quadrant 0 1 levels 1 0;
estimate "S, 2" intercept 1 quadrant 0 1 levels 0 1;
run;

proc glm data = lab5_data_Housing;
classes quadrant levels;
model price= quadrant levels quadrant*levels/solution;
means quadrant levels quadrant*levels;
estimate "N, 1" intercept 1 quadrant 1 0 levels 1 0 quadrant*levels 1 0 0 0;
estimate "N, 2" intercept 1 quadrant 1 0 levels 0 1 quadrant*levels 0 1 0 0;
estimate "S, 1" intercept 1 quadrant 0 1 levels 1 0 quadrant*levels 0 0 1 0;
estimate "S, 2" intercept 1 quadrant 0 1 levels 0 1 quadrant*levels 0 0 0 1;
run;

quit;


怎么做这道题?
二维码

扫码加我 拉你入群

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

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

全部回复
2011-5-12 08:14:02
英文不好,翻译不懂!
二维码

扫码加我 拉你入群

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

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

2011-5-12 08:47:40
就是一组数值,有两个因素,问这两个因素对最终结果又没有影响,如果有影响多少,要用没有interaction term和有interaction term两种方法求。
二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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