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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: anova.svyglm
> ### Title: Model comparison for glms.
> ### Aliases: anova.svyglm AIC.svyglm BIC.svyglm extractAIC.svyglm
> ###   extractAIC.svrepglm anova.svycoxph
> ### Keywords: survey regression
> 
> ### ** Examples
> 
> data(api)
> dclus2<-svydesign(id=~dnum+snum, weights=~pw, data=apiclus2)
> 
> model0<-svyglm(I(sch.wide=="Yes")~ell+meals+mobility, design=dclus2, family=quasibinomial())
> model1<-svyglm(I(sch.wide=="Yes")~ell+meals+mobility+as.numeric(stype), 
+      design=dclus2, family=quasibinomial())
> model2<-svyglm(I(sch.wide=="Yes")~ell+meals+mobility+stype, design=dclus2, family=quasibinomial())
> 
> anova(model2)	
Anova table:  (Rao-Scott LRT)
svyglm(formula = I(sch.wide == "Yes") ~ ell, design = dclus2, 
    family = quasibinomial())
           stats     DEff       df ddf        p   
ell       1.1259  0.76870  1.00000  38 0.236339   
meals     4.8189  1.24181  1.00000  37 0.058326 . 
mobility  0.3712  1.42335  1.00000  36 0.608418   
stype    52.4054  2.43494  2.00000  34 0.001341 **
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> anova(model0,model2)					     		    
Working (Rao-Scott+F) LRT for stype
 in svyglm(formula = I(sch.wide == "Yes") ~ ell + meals + mobility + 
    stype, design = dclus2, family = quasibinomial())
Working 2logLR =  21.52228 p= 0.0013407 
(scale factors:  1.7 0.3 );  denominator df= 34
> anova(model1, model2)
Working (Rao-Scott+F) LRT for stype - as.numeric(stype)
 in svyglm(formula = I(sch.wide == "Yes") ~ ell + meals + mobility + 
    stype, design = dclus2, family = quasibinomial())
Working 2logLR =  25.10744 p= 1.816e-05 
df=1;  denominator df= 34
> 
> anova(model1, model2, method="Wald")
Wald test for stype - as.numeric(stype)
 in svyglm(formula = I(sch.wide == "Yes") ~ ell + meals + mobility + 
    stype, design = dclus2, family = quasibinomial())
F =  17.73552  on  1  and  34  df: p= 0.00017598 
> 
> AIC(model0,model1, model2)
        eff.p       AIC deltabar
[1,] 3.538287 142.11041 1.179429
[2,] 6.248895 119.31208 1.562224
[3,] 7.202561  97.03351 1.440512
> BIC(model0, model2,maximal=model2)
     p      BIC     neff
[1,] 4 120.8183 72.43313
[2,] 6 111.6461      NaN
> 
> 
> ## from ?twophase
> data(nwtco)
> dcchs<-twophase(id=list(~seqno,~seqno), strata=list(NULL,~rel),
+         subset=~I(in.subcohort | rel), data=nwtco)
> a<-svycoxph(Surv(edrel,rel)~factor(stage)+factor(histol)+I(age/12), design=dcchs)
Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'x' in selecting a method for function 'as.matrix': 'crossprod' is not an exported object from 'namespace:Matrix'
Calls: svycoxph ... apply -> FUN -> as.matrix -> .handleSimpleError -> h
Execution halted