estadistica
急需要适合categorical DATA logistic regression model的数据
随便什么主题都好
只要response variable 是binary的
另外其中一个variable 是categorial,就可以了
急需,是为了毕业准备的,
网上找了半天也没找到
谢谢同志们!!
friend
不知道现编可以不?
estadistica
可以的
多谢了 friend ^-^
netcow
it is a joke!
estadistica
why is it a joke? I prefer think that people here are really friendly to help each other.
yihui
编数据:
response variable
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1
categorical variable
1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3
行不?……有点joke味道,呵呵,不过friend乐于助人的精神值得学习:)
neige
you can do a simple simulation
TITLE1; %LET SEED= 4873 ; %LET TOTREP= 500 ; %LET N= 100;
%LET MEANAGE = 40 ; %LET STDAGE = 10 ; %LET P = .5 ;
%LET BETA0 = 75 ; %LET BETA1 = 10; %LET BETA2 = 5;
DATA TEST ;
DO REP = 1 TO &TOTREP ;
DO I = 1 to &N ;
CALL STREAMINIT(&SEED(;
Z1 = RAND("NORMAL") ;
AGE = &MEANAGE + &STDAGE * Z1 ;
GENGER = RAND("BERNOULLI". &P);
LOGIT = &BETA0 + &BETA1 * AGE + &BETA2 * GENDER;
PROB = EXP(LOGIT)/(1+EXP(LOGIT));
Y = RAND("BERNOULLI". PROB);
OUTPUT ;
END ;
END ;
N is number of observations in your sample, totrep is the number of samples you want to generate, you can set it to one
Gender is your categorical, age is your quantitative var, and Y is your response.
Do a proc logistic or genmod on data test, when sample is large, you should get your betas back
neige
oh by the way, I did not run it, myabe some spelling or silly mistakes, you can fix it
estadistica
thanks to all of you
speciallyneige but i need a
real DATASET with its background and reference, sample size around n=200,
about any theme, per example: obesity, cancer, economics...etc
sorry for my bad explanation
neige
oh, just do a search online, you find infinite of them
estadistica
could you please help me to find it? 帮人帮到低,送佛送到西啦。。多谢
which key words should I introduce?
neige
netcow
虽然这里这里提倡互助精神,但是现在我们对你用数据作为毕业之用的动机有些许怀疑,因为这个动机在论坛里是不提倡的。
neige
数据作为毕业之用? 解释一下。。。啥意思啊
yihui
毕业论文吧。暂时不知道这样的论文有何创新之处……logistic regression的理论和应用基本都已经是做烂了的……
estadistica
是这样的,大家不要想的太复杂了
是一门科目Data analysis的作业
因为是我最后的几门,所以我说是为了毕业用了
^_^ anyways, thanks for your help, the link you passed to me which dataset is so simple, i need almost 4 explanatory variable, and its explanation, what they are...for which study..
I need to take out conclusions throught it, and show the professsor that i have understood .
Thanks
yihui
哦,明白:)
oliyiyi
zsu的吧!
robustreg
哈哈,这个帖子,,,,,
hexm26
In this data set, from Cox and Snell (1989), ingots are prepared with different heating and soaking times and tested for their readiness to be rolled. The response variable Y has value 1 for ingots that are not ready and value 0 otherwise. The explanatory variables are Heat and Soak.
data ingots;
input Heat Soak nready ntotal @@;
Count=nready;
Y=1;
output;
Count=ntotal-nready;
Y=0;
output;
drop nready ntotal;
datalines;
7 1.0 0 10 14 1.0 0 31 27 1.0 1 56 51 1.0 3 13
7 1.7 0 17 14 1.7 0 43 27 1.7 4 44 51 1.7 0 1
7 2.2 0 7 14 2.2 2 33 27 2.2 0 21 51 2.2 0 1
7 2.8 0 12 14 2.8 0 31 27 2.8 1 22 51 4.0 0 1
7 4.0 0 9 14 4.0 0 19 27 4.0 1 16
;
Logistic regression analysis is often used to investigate the relationship between discrete response variables and continuous explanatory variables. For logistic regression, the continuous design-effects are declared in a DIRECT statement. The following statements produce Output 22.3.1 through Output 22.3.8.
title 'Maximum Likelihood Logistic Regression';
proc catmod data=ingots;
weight Count;
direct Heat Soak;
model Y=Heat Soak / freq covb corrb itprint design;
quit;