[R] monotonic factors

2011-10-12 Thread Jeffrey Pollock
Hello all, I have an ordered factor that I would like to include in the linear predictor of a binomial glm, where the estimated coefficients are constrained to be monotonic. Does anyone know how to do this? I've tried using an ordered factor but this does not have the desired effect, an (artifi

Re: [R] GLM output for deviance and loglikelihood

2011-04-21 Thread Jeffrey Pollock
algorithm until the coefficients where either 'Inf' or '-Inf'. Please let me know your thoughts on this. Thanks again, Jeff -Original Message- From: peter dalgaard [mailto:pda...@gmail.com] Sent: 21 April 2011 09:32 To: Juliet Hannah Cc: Jeffrey Pollock; r-help@r-p

[R] GLM output for deviance and loglikelihood

2011-04-15 Thread Jeffrey Pollock
It has always been my understanding that deviance for GLMs is defined by; D = -2(loglikelihood(model) - loglikelihood(saturated model)) and this can be calculated by (or at least usually is); D = -2(loglikelihood(model)) As is done so in the code for 'polr' by Brian Ripley (in the