Re: Validation of models for categorical data
From: LSheiner <lewis@c255.ucsf.edu>
Subject: Re: Validation of models for categorical data
Date: Mon, 08 May 2000 12:44:57 -0700
Inaki,
The logistic function is highly non-linear. What you are observing I think is that for random variable x, and arbtrary function f, where E(.) is the expectation operator, E(f(x)) != f(E(x)) When f is linear, then the above is an equality.
Here's an example:
p(y) = bernoulli(x)
logit(x) = theta + eta
theta = -3
omega = 3
p(E(x)) = .05
E(y) = .21
Lewis.
PS. Here's the S+ code I used to compute the above.
> exp(-3)/(1+exp(-3))
[1] 0.04742587
> nums _ rnorm(100,-3,3)
> mean(exp(nums)/(1+exp(nums)))
[1] 0.219993
--
_/ _/ _/_/ _/_/_/ _/_/_/ Lewis B Sheiner, MD (lewis@c255.ucsf.edu)
_/ _/ _/ _/_ _/_/ Professor: Lab. Med., Bioph. Sci., Med.
_/ _/ _/ _/ _/ Box 0626, UCSF, SF, CA, 94143-0626
_/_/ _/_/ _/_/_/ _/ 415-476-1965 (v), 415-476-2796 (fax)