楼主: casperyc
1955 1

[问答] 【求助】Binary response 的 GLM 问题 [推广有奖]

  • 0关注
  • 0粉丝

硕士生

61%

还不是VIP/贵宾

-

威望
0
论坛币
26 个
通用积分
0
学术水平
0 点
热心指数
1 点
信用等级
0 点
经验
1445 点
帖子
218
精华
0
在线时间
56 小时
注册时间
2009-7-29
最后登录
2019-6-9

楼主
casperyc 发表于 2011-6-4 06:45:20 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
The data here are concerned with whether people default on a loan taken from a particular bank and for identical interest rates and for a fixed period. The information on each individual is their sex (male of female); their income (in pounds), whether the person is a home owner or not, their age (in years), and the amount of the loan (in pounds).

The information recorded is whether the individal defaulted on the loan or not. Study the data and try and understand a relation between the persons characteristics and defaulting. Specifically, what is your estimated probability that a female aged 42, who is not a home owner, has an income of 23,500, and took a loan of 12,000, defaults on the loan?

The table holding the data have headings as follows:

m/f: male=1, female=0
age: age in years
home: home=1 is a home owner, home=0 is not a home owner
inc: income
loan: amount of loan
def: default=1, non-default=0.
  1. Q3=read.table("tabl3.txt")
  2. colnames(Q3)=c("Sex","Age","Home","Inc","Loan","Def")
  3. Q3$Sex=as.factor(Q3$Sex)
  4. Q3$Home=as.factor(Q3$Home)
  5. Q3$Def=as.factor(Q3$Def)
  6. summary(Q3)
复制代码
然后用glm分析response.
  1. Q3.mod=glm(Def~Sex+Age+Home+Inc+Loan,family=binomial)
复制代码
总感觉不对,好像不是这样的。response 好像不应该用Def。一下子卡在那里了。。

希望各位提供点意见。

谢谢!
二维码

扫码加我 拉你入群

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

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

关键词:response Binary resp bin esp Binary response GLM

沙发
DM小菜鸟 发表于 2014-12-16 14:50:35
亲,不是这个样子滴~

这个和研究的目的相关.

先要明确研究的目的,再寻找合适的方法用来建模。

而不是先想好用哪种方法来凑模型


您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-4 17:12