Running examples in 'DWreg-Ex.R' failed
The error most likely occurred in:

> ### Name: dw.reg
> ### Title: DW regression
> ### Aliases: dw.reg
> ### Keywords: dw.reg
> 
> ### ** Examples
> 
> #simulated example (para.q1=TRUE, beta constant)
> theta0 <- 2
> theta1 <- 0.5
> beta<-0.5
> n<-500
> x <- runif(n=n, min=0, max=1.5)
> logq<-theta0 + theta1 * x - log(1+exp(theta0  + theta1 * x))		
> y<-unlist(lapply(logq,function(x,beta) rdw(1,q=exp(x),beta),beta=beta)) 
> data.sim<-data.frame(x,y) #simulated data
> fit<-dw.reg(y~x,data=data.sim,para.q1=TRUE)
Warning in model.matrix.default(mt, mf, contrasts) :
  non-list contrasts argument ignored
> fit$tTable	
--------------------------------------------
Maximum Likelihood estimation
Newton-Raphson maximisation, 5 iterations
Return code 8: successive function values within relative tolerance limit (reltol)
Log-Likelihood: -3007.1 
3  free parameters
Estimates:
            Estimate Std. error t value  Pr(> t)    
(Intercept)  1.83167    0.12397  14.775  < 2e-16 ***
x            0.61538    0.10648   5.779 7.51e-09 ***
beta         0.48049    0.01719  27.956  < 2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
--------------------------------------------
> 
> #simulated example (para.q2=TRUE, beta constant)
> theta0 <- -2
> theta1 <- -0.5
> beta<-0.5
> n<-500
> x <- runif(n=n, min=0, max=1.5)
> logq<--exp(theta0  + theta1 * x)		
> y<-unlist(lapply(logq,function(x,beta) rdw(1,q=exp(x),beta),beta=beta)) 
> data.sim<-data.frame(x,y) #simulated data
> fit<-dw.reg(y~x,data=data.sim,para.q2=TRUE)
Warning in model.matrix.default(mt, mf, contrasts) :
  non-list contrasts argument ignored
> fit$tTable	
              Estimate   Std.Err.    t value        Pr(>t)
(Intercept) -1.9242746 0.11299094 -17.030345  1.442791e-51
x           -0.4270903 0.10007587  -4.267665  2.366130e-05
beta         0.4826649 0.01782532  27.077497 7.107782e-100
> fit$survreg
             Estimate   Std.Err.   t value       Pr(>t)
(Intercept) 3.9867711 0.18199889 21.905469 6.017118e-75
x           0.8848588 0.20474883  4.321679 1.871139e-05
Log(scale)  0.7284326 0.03693104 19.724131 2.154836e-64
> 
> #real example
> library(Ecdat)
Loading required package: Ecfun
Error: package or namespace load failed for 'Ecfun' in library.dynam(lib, package, package.lib):
 DLL 'rlang' not found: maybe not installed for this architecture?
Error: package 'Ecfun' could not be loaded
Execution halted