[18609] in s-news-athena
[S] Offset in GLM
daemon@ATHENA.MIT.EDU (=?iso-8859-1?Q?"G=E9rald_Jean"?=)
Mon Jul 12 12:46:43 1999
From: =?iso-8859-1?Q?"G=E9rald_Jean"?= <Gerald.Jean@spgdag.ca>
To: s-news@wubios.wustl.edu
Message-Id: <852567AC.005A2805.00@mail.spgdag.com>
Date: Mon, 12 Jul 1999 12:42:00 -0400
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
Hello S-users,
I'am trying to fit a GLM while holding some of the coefficients fixed. I
thought that the offset function was doing just that?
For example Chambers and Hastie in their "Statistical Models in S" have an
example:
y ~ dose + age + offset(prior.fit)
where I assumed that prior.fit was an earlier fit with different variables.
But if I do the following:
> ttt.glm1_glm(formula= cost ~ age + type, family = Gamma,
+ data = claims, weights = number, na.action = na.omit)
> ttt.glm2_glm(formula = cost ~ car.age + offset(ttt.glm1), family = Gamma,
+ data = claims, weights = number, na.action = na.omit)
Error: Length of variable 3 is 21 != length of row names (128)
Dumped
Obviously I am not using the proper syntax, can someone help?
Thank you very much,
Gérald Jean
Analyste-conseil (statistiques), Actuariat
télephone : (418) 835-8839
télecopieur : (418) 835-5865
courrier électronique: gerald.jean@spgdag.ca
"In God we trust all others must bring data"
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news