CRAN Package Check Results for Package ipw

Last updated on 2025-12-06 00:48:46 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.2.1.1 9.80 83.71 93.51 OK
r-devel-linux-x86_64-debian-gcc 1.2.1.1 6.68 47.31 53.99 ERROR
r-devel-linux-x86_64-fedora-clang 1.2.1.1 21.00 118.54 139.54 OK
r-devel-linux-x86_64-fedora-gcc 1.2.1.1 22.00 111.77 133.77 OK
r-devel-windows-x86_64 1.2.1.1 10.00 92.00 102.00 OK
r-patched-linux-x86_64 1.2.1.1 10.15 77.36 87.51 OK
r-release-linux-x86_64 1.2.1.1 9.12 78.95 88.07 OK
r-release-macos-arm64 1.2.1.1 OK
r-release-macos-x86_64 1.2.1.1 9.00 73.00 82.00 OK
r-release-windows-x86_64 1.2.1.1 10.00 97.00 107.00 OK
r-oldrel-macos-arm64 1.2.1.1 OK
r-oldrel-macos-x86_64 1.2.1.1 8.00 76.00 84.00 OK
r-oldrel-windows-x86_64 1.2.1.1 14.00 112.00 126.00 OK

Check Details

Version: 1.2.1.1
Check: examples
Result: ERROR Running examples in ‘ipw-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: ipwpoint > ### Title: Estimate Inverse Probability Weights (Point Treatment) > ### Aliases: ipwpoint > ### Keywords: htest models > > ### ** Examples > > #Simulate data with continuous confounder and outcome, binomial exposure. > #Marginal causal effect of exposure on outcome: 10. > n <- 1000 > simdat <- data.frame(l = rnorm(n, 10, 5)) > a.lin <- simdat$l - 10 > pa <- exp(a.lin)/(1 + exp(a.lin)) > simdat$a <- rbinom(n, 1, prob = pa) > simdat$y <- 10*simdat$a + 0.5*simdat$l + rnorm(n, -10, 5) > simdat[1:5,] l a y 1 6.867731 0 -2.315917 2 10.918217 0 -9.167457 3 5.821857 0 -2.621165 4 17.976404 1 4.283153 5 11.647539 1 8.518530 > > #Estimate ipw weights. > temp <- ipwpoint( + exposure = a, + family = "binomial", + link = "logit", + numerator = ~ 1, + denominator = ~ l, + data = simdat) > summary(temp$ipw.weights) Min. 1st Qu. Median Mean 3rd Qu. Max. 0.4950 0.5050 0.5163 0.8905 0.6100 89.0982 > > #Plot inverse probability weights > graphics.off() > ipwplot(weights = temp$ipw.weights, logscale = FALSE, + main = "Stabilized weights", xlim = c(0, 8)) > > #Examine numerator and denominator models. > summary(temp$num.mod) Call: glm(formula = a ~ 1, family = "logit", data = simdat, na.action = na.fail) Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 0.02000 0.06325 0.316 0.752 (Dispersion parameter for binomial family taken to be 1) Null deviance: 1386.2 on 999 degrees of freedom Residual deviance: 1386.2 on 999 degrees of freedom AIC: 1388.2 Number of Fisher Scoring iterations: 3 > summary(temp$den.mod) Call: glm(formula = a ~ l, family = "logit", data = simdat, na.action = na.fail) Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -10.08091 0.71644 -14.07 <2e-16 *** l 1.02239 0.07202 14.20 <2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 1386.19 on 999 degrees of freedom Residual deviance: 464.46 on 998 degrees of freedom AIC: 468.46 Number of Fisher Scoring iterations: 7 > > #Paste inverse probability weights > simdat$sw <- temp$ipw.weights > > #Marginal structural model for the causal effect of a on y > #corrected for confounding by l using inverse probability weighting > #with robust standard error from the survey package. > require("survey") Loading required package: survey Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called ‘survey’ > msm <- (svyglm(y ~ a, design = svydesign(~ 1, weights = ~ sw, + data = simdat))) Error in svyglm(y ~ a, design = svydesign(~1, weights = ~sw, data = simdat)) : could not find function "svyglm" Execution halted Flavor: r-devel-linux-x86_64-debian-gcc