~ubuntu-branches/ubuntu/trusty/r-cran-vgam/trusty

« back to all changes in this revision

Viewing changes to R/vgam.fit.q

  • Committer: Package Import Robot
  • Author(s): Chris Lawrence
  • Date: 2011-11-04 13:13:06 UTC
  • mfrom: (1.2.9)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: package-import@ubuntu.com-20111104131306-w9fd83i51rw60gxf
Tags: upstream-0.8-4
ImportĀ upstreamĀ versionĀ 0.8-4

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
                eval(family@middle)
41
41
 
42
42
            eta <- fv + offset
43
 
            mu <- family@inverse(eta, extra)
 
43
            mu <- family@linkinv(eta, extra)
44
44
 
45
45
            if (length(family@middle2))
46
46
                eval(family@middle2)
108
108
    if (length(etastart)) {
109
109
        eta <- etastart
110
110
        mu <- if (length(mustart)) mustart else
111
 
              if (length(body(slot(family, "inverse"))))
112
 
                slot(family, "inverse")(eta, extra) else
 
111
              if (length(body(slot(family, "linkinv"))))
 
112
                slot(family, "linkinv")(eta, extra) else
113
113
                warning("argument 'etastart' assigned a value ",
114
 
                        "but there is no 'inverse' slot to use it")
 
114
                        "but there is no 'linkinv' slot to use it")
115
115
    }
116
116
 
117
117
    if (length(mustart)) {
118
118
        mu <- mustart
119
 
        if (length(body(slot(family, "link")))) {
120
 
          eta <- slot(family, "link")(mu, extra)
 
119
        if (length(body(slot(family, "linkfun")))) {
 
120
          eta <- slot(family, "linkfun")(mu, extra)
121
121
        } else {
122
122
          warning("argument 'mustart' assigned a value ",
123
123
                  "but there is no 'link' slot to use it")
175
175
        eta <- if (ncol(X_vlm_save) > 1) X_vlm_save %*% coefstart +
176
176
                   offset else X_vlm_save * coefstart + offset
177
177
        eta <- if (M > 1) matrix(eta, ncol=M, byrow = TRUE) else c(eta)
178
 
        mu <- family@inverse(eta, extra)
 
178
        mu <- family@linkinv(eta, extra)
179
179
    }
180
180
 
181
181