Running examples in ‘CanonicalFamilyExtra-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: binomial_extra
> ### Title: Family object for fitting binomial (e.g., logistic, probit)
> ###   regression model with potentially unbounded continuous outcome
> ### Aliases: binomial_extra
> 
> ### ** Examples
> 
> set.seed(123)
> expit <- binomial()$linkinv
> 
> # glm
> x <- rnorm(100)
> y <- expit(1 + x) + rnorm(100)
> glm(y~x, family = binomial_extra()) # or family=binomial_extra, or family="binomial_extra"

Call:  glm(formula = y ~ x, family = binomial_extra())

Coefficients:
(Intercept)            x  
     0.4229       0.5392  

Degrees of Freedom: 99 Total (i.e. Null);  98 Residual
Null Deviance:	    133.8 
Residual Deviance: 128.5 	AIC: NA
> 
> # Counterexamples: These naive approaches yield errors or are not reliable
> try(glm(y~x, family = binomial()))
Error in eval(family$initialize) : y values must be 0 <= y <= 1
> try(glm(y~x, family = quasibinomial()))
Error in eval(family$initialize) : y values must be 0 <= y <= 1
> try(glm(y~x, family = gaussian(link = "logit")))
Error in family$linkfun(mustart) : Value -0.102261 out of range (0, 1)
> # setting starting value might fix this approach,
> # but the problem is non-convex and requires valid starting value
> try(glm(y~x, family = gaussian(link = "logit"), start = c(-1,0)))

Call:  glm(formula = y ~ x, family = gaussian(link = "logit"), start = c(-1, 
    0))

Coefficients:
(Intercept)            x  
     0.4923       0.6640  

Degrees of Freedom: 99 Total (i.e. Null);  98 Residual
Null Deviance:	    94.43 
Residual Deviance: 92.99 	AIC: 282.5
> try(glm(y~x, family = quasi(link = "logit", variance = "constant")))
Error in family$linkfun(mustart) : Value -0.102261 out of range (0, 1)
> 
> #glmnet
> X <- matrix(rnorm(100 * 5), nrow = 100)
> y <- expit(1 + X[,1]) + rnorm(100)
> require(glmnet)
Loading required package: glmnet
Loading required package: Matrix
Loaded glmnet 5.0
> glmnet(X, y, family = binomial_extra())

Call:  glmnet(x = X, y = y, family = binomial_extra()) 

   Df   %Dev   Lambda
1   0   0.00 0.161300
2   1   3.29 0.147000
3   2   7.11 0.133900
4   2  11.71 0.122000
5   2  15.72 0.111200
6   3  21.23 0.101300
7   3  26.79 0.092300
8   3  31.78 0.084100
9   3  36.29 0.076630
10  3  40.41 0.069830
11  3  44.20 0.063620
12  3  47.71 0.057970
13  3  50.98 0.052820
14  3  54.05 0.048130
15  3  56.93 0.043850
16  3  59.66 0.039960
17  4  62.36 0.036410
18  4  65.01 0.033170
19  4  67.52 0.030230
20  4  69.91 0.027540
21  4  72.19 0.025090
22  5  74.38 0.022860
23  5  76.60 0.020830
24  5  78.74 0.018980
25  5  80.79 0.017300
26  5  82.80 0.015760
27  5  84.76 0.014360
28  5  86.69 0.013080
29  5  88.62 0.011920
30  5  90.56 0.010860
31  5  92.54 0.009898
32  5  94.58 0.009018
33  5  96.73 0.008217
34  5  99.04 0.007487
35  5 101.59 0.006822
> # or family=binomial_extra; cannot use family="binomial_extra"
> 
> # Counterexamples: These naive approaches yield errors
> try(glmnet(X, y, family = binomial()))
Error in eval(family$initialize) : y values must be 0 <= y <= 1
> try(glmnet(X, y, family = gaussian(link = "logit")))
Error in family$linkfun(mustart) : Value -0.630543 out of range (0, 1)
> try(glmnet(X, y, family = quasi(link = "logit", variance = "constant")))
Error in family$linkfun(mustart) : Value -0.630543 out of range (0, 1)
> 
> # other links/variance for glm
> x <- rnorm(100)
> y <- expit(1 + x) + rnorm(100)
> glm(y~x, family = binomial_extra("probit")) # probit regression

Call:  glm(formula = y ~ x, family = binomial_extra("probit"))

Coefficients:
(Intercept)            x  
     0.5139       0.4524  

Degrees of Freedom: 99 Total (i.e. Null);  98 Residual
Null Deviance:	    123.8 
Residual Deviance: 112.2 	AIC: NA
> glm(y~x, family = binomial_extra(variance = "constant")) # least squares

Call:  glm(formula = y ~ x, family = binomial_extra(variance = "constant"))

Coefficients:
(Intercept)            x  
     0.8151       0.9500  

Degrees of Freedom: 99 Total (i.e. Null);  98 Residual
Null Deviance:	    105.6 
Residual Deviance: 103 	AIC: NA
> 
> # within SuperLearner
> X <- matrix(rnorm(100 * 3), nrow = 100)
> y <- expit(1 + X[,1]) + rnorm(10)
> require(SuperLearner)
Loading required package: SuperLearner
Loading required package: nnls
Loading required package: gam
Loading required package: splines
Loading required package: foreach
Loaded gam 1.22-7

Super Learner
Version: 2.0-40
Package created on 2025-12-14

> SuperLearner(y, data.frame(X), family=binomial_extra(),
+              SL.library = c("SL.glm", "SL.ipredbagg"), cvControl = list(V = 2))
Loading required namespace: ipred

Call:  
SuperLearner(Y = y, X = data.frame(X), family = binomial_extra(), SL.library = c("SL.glm",  
    "SL.ipredbagg"), cvControl = list(V = 2)) 


                      Risk Coef
SL.glm_All       0.5326417    0
SL.ipredbagg_All 0.4793687    1
> 
> #GEE
> x <- rnorm(100)
> y <- expit(1 + x) + rnorm(100)
> id <- rep(1:20, each=5)
> geepack::geeglm(y ~ x, family = binomial_extra(family = "binomial"), id = id)
Error in loadNamespace(x) : there is no package called ‘geepack’
Calls: loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted