Logistic regression is a method for fitting a regression curve. How to perform a Logistic Regression in R. Animation), programming (RStudio, Sweave. Henrique G MommI'd change the data structure to match what SAS was expecting, unless you're looking for an infection rate model, if so see here: Otherwise something like the following might work: data beetle_data; input dose total dead; y = dead/total; datalines; 1.6907 59 6 1.7242 60 13 1.7552 62 18 1. Tama granstar 15x14. 7842 56 28 1.8113 63 52 1.8369 59 53 1.8610 62 61 1.8839 60 60; data have; set beetle_data; do record=1 to total; if record. Reeza, thanks for your work. Much appreciated. Joel KuszmaulI am asking this because I am very new to SAS - is there no way to conduct the analysis in my way in SAS? Considering the fact that this could be done in R as shown below, I thought SAS too is able to do that. If it makes any sense in your context, you might also want to fit a natural mortality rate as part of your model. Proc Probit offers that feature: data beetle_data; input logDose total dead; dose = 10 ** logDose; label logDose='Log(dose)'; datalines; 1.6907 59 6 1.7242 60 13 1.7552 62 18 1.7842 56 28 1.8113 63 52 1.8369 59 53 1.8610 62 61 1.8839 60 60; ods graphics on; proc probit data=beetle_data log10 optc plots=predpplot; model dead/total = dose / dist=logistic lackfit; run; I find the fit slightly better this way.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |