Package check result: OK Changes to worse in reverse depends: Package: surveynnet Check: examples New result: ERROR Running examples in ‘surveynnet-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: surveynnet > ### Title: Neural Net for Complex Survey Data > ### Aliases: surveynnet > > ### ** Examples > > > # short example with body fat dataset > y <- body_fat$pct_body_fat > x <- body_fat[,c("Weight_kg", "Height_cm", "Age")] > weight <- body_fat$survey_wt > strat <- body_fat$stratum > clust <- body_fat$cluster > y[strat==1] <- y[strat==1] + 30*0.00015*rnorm(sum(strat==1)) > y[strat==2] <- y[strat==2] + 30*0.15*rnorm(sum(strat==2)) > > myout <- surveynnet(x,y,weight = weight, strat = strat, clust=clust) > myout $results stratum deff.h survey_wt deff_wt target fitted fitted_weighted 1 1 1.716487 2 1.165170 9.497181 24.626413 37.10718 2 1 1.716487 2 1.165170 10.000826 10.013208 37.10718 3 1 1.716487 2 1.165170 7.996240 8.013194 37.10718 4 1 1.716487 10 5.825852 37.107179 24.624325 37.10718 5 1 1.716487 10 5.825852 28.201483 24.626792 37.10718 6 1 1.716487 10 5.825852 32.396308 33.286988 37.10718 7 2 1.671095 2 1.196820 11.693431 11.697489 37.10718 8 2 1.671095 2 1.196820 13.322461 24.626695 37.10718 9 2 1.671095 2 1.196820 10.591016 10.593025 37.10718 10 2 1.671095 10 5.984099 35.725752 35.725631 37.10718 11 2 1.671095 10 5.984099 35.003015 24.623180 37.10718 12 2 1.671095 10 5.984099 34.154295 33.267977 37.10718 fitted_deff fitted_deff_resid 1 37.10713 -2.760994e+01 2 37.10713 -2.710630e+01 3 37.10713 -2.911089e+01 4 37.10712 5.941650e-05 5 37.10713 -8.905648e+00 6 37.10713 -4.710823e+00 7 37.10712 -2.541369e+01 8 37.10712 -2.378466e+01 9 37.10712 -2.651611e+01 10 37.10713 -1.381374e+00 11 37.10713 -2.104114e+00 12 37.10713 -2.952831e+00 $nnet.surv a 3-3-1 network with 16 weights options were - attr(,"class") [1] "surveynnet" "list" > > > # NHANES example > # Predicting Diastolic BP from BMI, Systolic BP and Height > # PLEASE NOTE: for this example, pass "nest=TRUE" into the > # "..." parameters of the main function `surveynnet` > > x <- nhanes.demo[,c("BMXBMI", "BPXSY1", "BMXHT")] > weight <- nhanes.demo$WTMEC2YR > strat <- nhanes.demo$SDMVSTRA > clust <- nhanes.demo$SDMVPSU > y <- nhanes.demo$BPXDI1 > myout <- surveynnet(x,y,weight = weight, strat = strat, clust=clust, nest=TRUE) Error in if (any(chk.w)) stop("Sum of stratum weights is less than or equal to sample size in at least one stratum. Rescale weights so that are scaled for estimating population totals.\n") : missing value where TRUE/FALSE needed Calls: surveynnet -> do.call -> Execution halted