When I add the following instruction : make.link(log) I have an error that I don''t understand. model<-glm(spa~an, family=gaussian, make.link(log)) error in as.vector(x, "double"): cannot coerce to vector) If someone can help, thanks Martial -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Thu, 21 Jun 2001, laurans at roazhon wrote:> When I add the following instruction : make.link(log) I have an error > that I don''t understand. > > model<-glm(spa~an, family=gaussian, make.link(log)) > error in as.vector(x, "double"): cannot coerce to vector) > > If someone can help, thanksSomething certainly could. It''s the help page which says Arguments: link: character or numeric; one of `"logit"'', `"probit"'', `"cloglog"'', `"identity"'', `"log"'', `"sqrt"'', `"1/mu^2"'', `"inverse"'', or number, say lambda resulting in power link mu ^ lambda. log is a function: I think you meant make.link("log"). However, that is not the only error: I believe you meant model <- glm(spa ~ an, family=gaussian("log")) The fourth argument of glm is `data''. (In this case you will get away with gaussian(log). -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Thu, 21 Jun 2001, laurans at roazhon wrote:> When I add the following instruction : make.link(log) I have an error > that I don''t understand. > > model<-glm(spa~an, family=gaussian, make.link(log)) > error in as.vector(x, "double"): cannot coerce to vector) >You are specifying the data= argument as make.link(log). Not surprisingly this makes R unhappy. I think you want model<-glm(spa~an, family=gaussian(log)) -thomas Thomas Lumley Asst. Professor, Biostatistics tlumley at u.washington.edu University of Washington, Seattle ^^^^^^^^^^^^^^^^^^^^^^^^ NOTE NEW EMAIL ADDRESS -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._