Re: [S] New family for GLM - Summary.

Vadim A Kutsyy (kutsyy@umich.edu)
Thu, 03 Dec 1998 08:01:31 -0500


I was asked to post summary, here it goes.
To add a link to a family you need to edit particular family. I.E. for
binomial family edit
binomial
function(link = "logit")
{
# This is a generator function for a family object
# To see a brief summary of the resulting family,
# evaluate the function, e.g. binomial(), and let
# it print itself. To see individual components, either
# type binomial()$link etc., or else assign it and look at
# the components.
link <- as.character(substitute(link))
misnames <- c("logit", "probit", "cloglog", "Logit", "Probit",
"clog-log", "Cloglog", "Clog-log")
corresp <- c(1, 2, 3, 1, 2, 3, 3, 3)
lmatch <- pmatch(link, misnames, F)
if(!lmatch)
stop("Binomial links are \"logit\", \"probit\", or
\"cloglog\"; use \"quasi\" family for other links"
)
link <- misnames[corresp[lmatch]]
make.family("Binomial", glm.links[, link], glm.variances[,
"mu(1-mu"])
}

If link is one of the links defined in gml.links, than just edit
misnames, corresp, ...
Otherwise you need to define new link, and make another make.family to
be executed in that case.

If you need to add new family, than just create similar function, and
the is an examples, if you search S-news archives.
-
Vadim Kutsyy
kutsyy@umich.edu
http://www.umich.edu/~kutsyy
-----------------------------------------------------------------------
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