s-news
[Top] [All Lists]

coefficients for GLM

To: s-news@wubios.wustl.edu
Subject: coefficients for GLM
From: Trevor Parker <trevor.parker@tfrc.csiro.au>
Date: Mon, 05 Feb 2001 09:30:43 +1000
Organization: CSIRO
Hello S-plus enthusiasts,
 
I have run a GLM using 2 degree poynomials as independents. The model looks like this:
forest.object <- glm(forest ~ poly(slope,2) + poly(aspectns,2), family=binomial(logit), data="">

When I use the coefficients from forest.object to predict forest I get erroneous results. i.e very small values
The predictive GLM form I am using is:
log(p/1-p) = intercept + coef1*slope + coef2*sqr(slope) + coef3*aspectns + coef4*sqr(aspectns)
where intercept and coef1 to 4 are from forest.object.
When I run the model:
forest.object <- glm(forest ~ slope + aspectns, family=binomial(logit), data="">

and use the coefficents to predict forest i.e log(p/1-p) = intercept + coef1*slope + coef2*aspectns
it works well.


I have tried using poly.transform but it appears to only work for models with one independent variable.
Am I using the polynomial form correctly. Your help would be appreciated.


Regards
 
Trevor Parker
GIS Technician / Spatial Analyst
CSIRO - Tropical Forest Research Centre
P.O Box 780
Atherton QLD
Australia 4883
Ph: ++ 61 (0) 7 4091 8800
Fax: ++ 61 (0) 7 4091 8888
 
<Prev in Thread] Current Thread [Next in Thread>