Jarrod Hadfield
2006-Nov-06 16:57 UTC
[R] numerical overflow/underflow in log-linear models
Hi, I've written some MCMC algorithms that repeatedly evaluate exp(Xb) where X is a design matrix and b a parameter vector. For certain combinations of X and b I get numerical overflow, and would like a way of rescaling the columns of X so that the range of exp(Xb) is maximised without overflowing. I can get approximate ranges for the parameter vector b using ML (X is fixed) and was wondering whether general solutions exist for this problem, and if they had been implemented in R. Cheers, Jarrod