12-05-2013 01:49 AM
12-05-2013 10:03 AM
It would be helpful if you describe your data. What is your response variable? Do you want to explain the variation in the response variable by the fact that the data come from two different groups? The equation for logistic regression is logit(Y)=βX, where Y is the response (independent) variable and X is the vector of the explanatory variables. The exp(β) produces the odds ratio (OR). By looking at OR you will be able to conclude what group is more (or less) likely to explain the variation in the response variable. I am not sure if this is your goal.
12-05-2013 11:36 PM
Maybe I need to verify the title.
For my data. the independent variable is X, and dependent variable is Y. From literature, the fitting equation for my data is Y=1/[1+A*exp(B*X)], I just want to compare the difference of two group, in my data, that's group 1 and 2. Actually, I am not sure whether my data is logistics regression, but, from the fitting equation, I thought it was. thank you very much.
12-06-2013 08:39 AM
It appears that your dependent variable is continuous, not binary as would be expected for logistic regression using PROC LOGISTIC. I believe you may want to fit a logistic curve to your results, or at least some other S shaped curve. You have repeated measures on subjects over time, and two groups. I believe your best option would be something like PROC NLIN or PROC NLMIXED.
In particular you may wish to closely pattern your analysis after Example 63.5 Comparing Nonlinear Trends among Groups, in the NLIN Procedure documentation. It fits a more complex model, but the techniques for group comparison are directly applicable to your data. However, you do have the complicating factor of subject, providing an additional source of variability. You may be able to adapt Example 64.5 Failure Time and Frailty Model in the NLMIXED documentation. This example has groups and individuals, and it will be mostly a matter of converting the programming to the model you wish to fit.
Best of luck.
12-09-2013 01:42 AM
Thanks a lot, SteveDenham.
after I read the example you suggest, I am bewildered by the procedure metioned in 63.5, because I am only a beginner of SAS. I wonder if you can help write a procedure for my data, i know it need a lot of time to do it. But, i really need your help, I have been confused by these data for a couple of months, thanks so much.
12-09-2013 10:50 AM
All right. But this may seem daunting for a beginner. First of all, the equation form needs to be rewritten. Currently, it forces the response variable to be less than or equal to 1. Since there is adequate information that the response variable can be greater than 1, a new asymptotic value needs to be introduced, so that the equational form is Y=C/[1+A*exp(B*X)]. This fits for 14 subjects (seven in each group). My preliminary analysis shows no differences due to group.
proc sort data=yourdata1;
by subjid ;
proc nlmixed data=yourdata1 tech=trureg absfconv=1e-6 maxfunc=1000 maxiter=200;
*parms a_1=0.2 b_1=0 c_1=1 a_2=0.2 b_2=0 c_2=1 s2a=0.1 cab=0 s2b=0.1 cac=0 cbc=0 s2c=0.1 s2=0.5; /*Commented out, as the default values seem to work better than my quick inspection values*/
if (group=1) then do;
a = a_1;
b = b_1;
c = c_1;
end; else do;
a = a_2;
b = b_2;
c = c_2;
aa=a + arand;
bb=b + brand;
cc=c + crand;
pred=cc/(1 + aa * exp (bb * x));
model y ~ normal(pred,s2);
random arand brand crand~ normal([0,0,0],[s2a,cab,s2b,cac,cbc,s2c]) subject=subjid;