Dear All: what R function should be used for logit regression? glm()? And, more importantly, is there a function that would calculate the *probability of Y given X in the logit framework* (say for propensity score calculation)? Thanks! Stan --------------------------------- [[alternate HTML version deleted]]
On Sat, 15 Feb 2003 12:54:22 -0800 (PST) Stan Markus <stanislav_markus at yahoo.com> wrote:> > Dear All: > > what R function should be used for logit regression? glm()? And, more > > importantly, is there a function that would calculate the *probability of > > Y given X in the logit framework* (say for propensity score calculation)? > > > > Thanks! > > StanThe "An Introduction to R" manual that comes with the system covers the glm function. -- Frank E Harrell Jr Prof. of Biostatistics & Statistics Div. of Biostatistics & Epidem. Dept. of Health Evaluation Sciences U. Virginia School of Medicine http://hesweb1.med.virginia.edu/biostat
Since "!" is a logical operator in R, how does one use it in its arithmetic sense, say to calculate x!/y!(N-y)! ? Thanks! Stan --------------------------------- [[alternate HTML version deleted]]
Stan Markus wrote:> Since "!" is a logical operator in R, how does one use it in its arithmetic sense, say to calculate x!/y!(N-y)! ? > > Thanks! > > StanYou can use gamma(x + 1) for x! or you can use the factorial() function in the gregmisc package on CRAN. See ?gamma for the former option. HTH, Marc Schwartz