Greetings:

 

I'm running R2.6.2 on a WinXP DELL box with 2 gig RAM.

 

I have created a new glm link function to be used with family = binomial.
The function works (although any suggested improvements would be welcome),

 

logit.FC <- function(POD.floor = 0, POD.ceiling =1)

{   if (POD.floor < 0 | POD.floor > 1) stop ("POD.floor must be between zero
and one.")

    if (POD.ceiling < 0 | POD.ceiling > 1) stop ("POD.ceiling must be
between zero and one.")

    if (POD.ceiling - POD.floor < difference.criterion) stop
(paste("POD.ceiling-POD.floor difference must be greater than
",difference.criterion," to discourage answer-shopping.", sep=""))

    linkfun <- function(mu) {

    mu <- qlogis( (mu - POD.floor)/(POD.ceiling - POD.floor) )

    }

    linkinv <- function(eta) {

    eta <- POD.floor + (POD.ceiling - POD.floor)*plogis(eta)

    }

    mu.eta <- function(eta) {

    (POD.ceiling - POD.floor)*dlogis(eta)# derivitaive of mu with respect to
eta

    }

    valideta <- function(eta) TRUE

    link <- paste("logit.FC(", POD.floor, ",", POD.ceiling, ")", sep = "")

    structure(list(linkfun = linkfun, linkinv = linkinv, mu.eta = mu.eta, 

    valideta = valideta, name = link), class = "link-glm")

}

 

as is evidenced by the call, binomial(logit.FC(0,1))

 

My semantics problem is that I have the name "logit.FC(0,1)", constructed
elsewhere using paste(), and I need to remove the quotations in order to use
it, since binomial("logit.FC(0,1)") will fail.

 

I know I am missing something obvious and would appreciate any help.

 

Thanks.

 

Charles Annis, P.E.

 <mailto:[EMAIL PROTECTED]>
[EMAIL PROTECTED]
phone: 561-352-9699
eFax:  614-455-3265
 <http://www.StatisticalEngineering.com>
http://www.StatisticalEngineering.com

 

 


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to