楼主: ReneeBK
1622 1

[问答] Functional relationship between explanatory variable and the log-odds [推广有奖]

  • 1关注
  • 62粉丝

VIP

已卖:4898份资源

学术权威

14%

还不是VIP/贵宾

-

TA的文库  其他...

R资源总汇

Panel Data Analysis

Experimental Design

威望
1
论坛币
49640 个
通用积分
55.8137
学术水平
370 点
热心指数
273 点
信用等级
335 点
经验
57805 点
帖子
4005
精华
21
在线时间
582 小时
注册时间
2005-5-8
最后登录
2023-11-26

楼主
ReneeBK 发表于 2014-4-17 00:18:47 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
Dear All,

I would be grateful to you if you could help me with the following. I am getting desperate as I have to present my data on Wednesday.

I checked the linear assumption for my only continuous variable and it is violated.I used the natural logarithm. How can I check that now whether or not it is linear? Thank you in advance,

二维码

扫码加我 拉你入群

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

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

关键词:relationship explanatory Functional relations function natural continuous following between checked

沙发
ReneeBK 发表于 2014-4-17 00:19:07
One straightforward way to get an idea about the functional relationship
between a continuous explanatory variable and the log-odds of an "event"
(with "event" being defined as Outcome variable = 1) is as follows:

1. For exploratory purposes only, recode the continuous variable into some
number of categories (e.g., quintiles).

2. Estimate a model with the categorical variable in place of the continuous
variable, and save the predicted probabilities.

3. Convert the predicted probabilities to predicted log-odds.

4. Make a scatterplot with X = the original continuous variable and Y =
predicted log-odds.

Here's an example from something I helped a colleague with a while ago.


* Model 1: Exploratory with categorical Age variable.

LOGISTIC REGRESSION VARIABLES Admission_status2
   /METHOD=ENTER AgeGroup Sex ED_only locum
   /CONTRAST (AgeGroup)=Indicator(1)
   /PRINT=CI(95)
   /SAVE pred(PP1)
   /CRITERIA=PIN(0.05) POUT(0.10) ITERATE(20) CUT(0.5).


COMPUTE LogOdds1 = ln(PP1 / (1 - PP1)).
VARIABLE LABELS LogOdds1 "Log-odds of outcome (Model 1)".
DESCRIPTIVES PP1 LogOdds1.

GRAPH /SCATTERPLOT(BIVAR)=AgeGroup WITH LogOdds1 .

* That scatter-plot shows a clear quadratic (U-shaped) relationship.
* Therefore, when we use Age as a continuous variable in Model 2,
* we'll want to include Age-squared as well.

* Model 2: Treat Age as a continuous variable,
* and include Age-squared.

COMPUTE AgeSq = Age**2.

LOGISTIC REGRESSION VARIABLES Admission_status2
   /METHOD=ENTER Age AgeSq Sex ED_only locum
   /PRINT=CI(95)
   /SAVE pred(PP2)
   /CRITERIA=PIN(.05) POUT(.10) ITERATE(20) CUT(.5).

COMPUTE LogOdds2 = ln(PP2 / (1 - PP2)).
VARIABLE LABELS LogOdds2 "Log-odds of outcome (Model 2)".

HTH.

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

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