Last updated on 2020-02-19 10:48:49 CET.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 1.0 | 7.33 | 61.36 | 68.69 | ERROR | |
r-devel-linux-x86_64-debian-gcc | 1.0 | 6.52 | 48.05 | 54.57 | ERROR | |
r-devel-linux-x86_64-fedora-clang | 1.0 | 81.35 | ERROR | |||
r-devel-linux-x86_64-fedora-gcc | 1.0 | 82.74 | ERROR | |||
r-devel-windows-ix86+x86_64 | 1.0 | 12.00 | 68.00 | 80.00 | OK | |
r-devel-windows-ix86+x86_64-gcc8 | 1.0 | 21.00 | 91.00 | 112.00 | OK | |
r-patched-linux-x86_64 | 1.0 | 7.68 | 55.14 | 62.82 | OK | |
r-patched-solaris-x86 | 1.0 | 117.70 | OK | |||
r-release-linux-x86_64 | 1.0 | 6.84 | 54.49 | 61.33 | OK | |
r-release-windows-ix86+x86_64 | 1.0 | 11.00 | 64.00 | 75.00 | OK | |
r-release-osx-x86_64 | 1.0 | OK | ||||
r-oldrel-windows-ix86+x86_64 | 1.0 | 7.00 | 65.00 | 72.00 | OK | |
r-oldrel-osx-x86_64 | 1.0 | OK |
Version: 1.0
Check: examples
Result: ERROR
Running examples in 'ctqr-Ex.R' failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: ctqr
> ### Title: Censored and Truncated Quantile Regression
> ### Aliases: ctqr
> ### Keywords: survival models regression
>
> ### ** Examples
>
> # Using simulated data
>
> n <- 1000
> x1 <- runif(n)
> x2 <- runif(n)
>
> # Example 1 - censored data ######################################
>
> t <- runif(n, 0, 1 + x1 + x2) # time variable (e.g., time to death)
> c <- runif(n,0,5) # censoring variable (e.g., end of follow-up)
> y <- pmin(t,c) # observed variable = min(t,c)
> d <- (t <= c) # 1 = event (e.g., death), 0 = censored
>
> CDF1 <- pchreg(Surv(y,d) ~ x1 + x2, splinex = splinex())
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
> model1 <- ctqr(Surv(y,d) ~ x1 + x2, p = 0.5, CDF = CDF1)
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
ctqr
--- call from context ---
asy(z, y, d, xfullrank, weights, p, CDF, fit, fit.ok = which(fit.ok))
--- call from argument ---
if (class(try.V2) != "try-error") {
V2[[j]] <- try.V2
V2.ok <- TRUE
} else {
a <- a + 0.01
}
--- R stacktrace ---
where 1: asy(z, y, d, xfullrank, weights, p, CDF, fit, fit.ok = which(fit.ok))
where 2: ctqr(Surv(y, d) ~ x1 + x2, p = 0.5, CDF = CDF1)
--- value of length: 2 type: logical ---
[1] TRUE TRUE
--- function from context ---
function (z, y, d, x, weights, p, CDF, fit, fit.ok)
{
est.H2 <- function(fitted, y, d, x, weights, a) {
eps <- 1e-07
ok <- FALSE
while (!ok) {
eps <- eps * 2
fitted.l <- fitted - eps
fitted.r <- fitted + eps
oy.l <- (y <= fitted.l)
oy.r <- (y <= fitted.r)
check <- mean(oy.l != oy.r)
ok <- (check > a)
}
u.l <- d * (1 - pnorm(y - fitted.l, 0, eps))
u.r <- d * (1 - pnorm(y - fitted.r, 0, eps))
u <- (u.r - u.l)/(2 * eps)
-t(x) %*% (x * c(weights * u))
}
n <- length(y)
eta <- fit$fitted
oy <- fit$omega.y
oz <- fit$omega.z
Sy <- pmax(fit$CDF$Sy, 1e-10)
Sz <- pmax(fit$CDF$Sz, 1e-10)
if (is.null(w1 <- model.weights(CDF$mf))) {
w1 <- 1
}
w2 <- (if (!is.null(weights))
weights
else 1)
si <- fit$si
si[is.na(si)] <- 0
A <- firstep(CDF, z, y, d, w1)
V1 <- A$V
S1 <- A$Si
S2 <- V2 <- H12 <- list()
for (j in fit.ok) {
tau <- p[j]
S2[[j]] <- x * si[, j]
H12[[j]] <- t(x * w2) %*% ((1 - d) * oy[, j] * (1 - tau) *
A$dHy/Sy - oz[, j] * (1 - tau) * A$dHz/Sz)
V2.ok <- FALSE
a <- 0.05
while (!V2.ok) {
H2 <- est.H2(eta[, j], y, d, x, w2, a = a)
try.V2 <- try(chol2inv(chol(-H2)), silent = TRUE)
if (class(try.V2) != "try-error") {
V2[[j]] <- try.V2
V2.ok <- TRUE
}
else {
a <- a + 0.01
}
}
}
COV <- list()
for (j in fit.ok) {
S <- cbind(S2[[j]], S1)
Sw <- cbind(S2[[j]] * w2, S1 * w1)
Omega <- rbind(cbind(V2[[j]], V2[[j]] %*% H12[[j]] %*%
V1), cbind(t(H12[[j]]) * 0, V1))
Omega <- Omega %*% (t(S) %*% Sw) %*% t(Omega)
COV[[length(COV) + 1]] <- Omega[1:ncol(x), 1:ncol(x),
drop = FALSE]
}
names(COV) <- p[fit.ok]
COV
}
<bytecode: 0x333a948>
<environment: namespace:ctqr>
--- function search by body ---
Function asy.qr in namespace ctqr has this body.
----------- END OF FAILURE REPORT --------------
Error in if (class(try.V2) != "try-error") { :
the condition has length > 1
Calls: ctqr -> asy
Execution halted
Flavor: r-devel-linux-x86_64-debian-clang
Version: 1.0
Check: examples
Result: ERROR
Running examples in ‘ctqr-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: ctqr
> ### Title: Censored and Truncated Quantile Regression
> ### Aliases: ctqr
> ### Keywords: survival models regression
>
> ### ** Examples
>
> # Using simulated data
>
> n <- 1000
> x1 <- runif(n)
> x2 <- runif(n)
>
> # Example 1 - censored data ######################################
>
> t <- runif(n, 0, 1 + x1 + x2) # time variable (e.g., time to death)
> c <- runif(n,0,5) # censoring variable (e.g., end of follow-up)
> y <- pmin(t,c) # observed variable = min(t,c)
> d <- (t <= c) # 1 = event (e.g., death), 0 = censored
>
> CDF1 <- pchreg(Surv(y,d) ~ x1 + x2, splinex = splinex())
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
> model1 <- ctqr(Surv(y,d) ~ x1 + x2, p = 0.5, CDF = CDF1)
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
ctqr
--- call from context ---
asy(z, y, d, xfullrank, weights, p, CDF, fit, fit.ok = which(fit.ok))
--- call from argument ---
if (class(try.V2) != "try-error") {
V2[[j]] <- try.V2
V2.ok <- TRUE
} else {
a <- a + 0.01
}
--- R stacktrace ---
where 1: asy(z, y, d, xfullrank, weights, p, CDF, fit, fit.ok = which(fit.ok))
where 2: ctqr(Surv(y, d) ~ x1 + x2, p = 0.5, CDF = CDF1)
--- value of length: 2 type: logical ---
[1] TRUE TRUE
--- function from context ---
function (z, y, d, x, weights, p, CDF, fit, fit.ok)
{
est.H2 <- function(fitted, y, d, x, weights, a) {
eps <- 1e-07
ok <- FALSE
while (!ok) {
eps <- eps * 2
fitted.l <- fitted - eps
fitted.r <- fitted + eps
oy.l <- (y <= fitted.l)
oy.r <- (y <= fitted.r)
check <- mean(oy.l != oy.r)
ok <- (check > a)
}
u.l <- d * (1 - pnorm(y - fitted.l, 0, eps))
u.r <- d * (1 - pnorm(y - fitted.r, 0, eps))
u <- (u.r - u.l)/(2 * eps)
-t(x) %*% (x * c(weights * u))
}
n <- length(y)
eta <- fit$fitted
oy <- fit$omega.y
oz <- fit$omega.z
Sy <- pmax(fit$CDF$Sy, 1e-10)
Sz <- pmax(fit$CDF$Sz, 1e-10)
if (is.null(w1 <- model.weights(CDF$mf))) {
w1 <- 1
}
w2 <- (if (!is.null(weights))
weights
else 1)
si <- fit$si
si[is.na(si)] <- 0
A <- firstep(CDF, z, y, d, w1)
V1 <- A$V
S1 <- A$Si
S2 <- V2 <- H12 <- list()
for (j in fit.ok) {
tau <- p[j]
S2[[j]] <- x * si[, j]
H12[[j]] <- t(x * w2) %*% ((1 - d) * oy[, j] * (1 - tau) *
A$dHy/Sy - oz[, j] * (1 - tau) * A$dHz/Sz)
V2.ok <- FALSE
a <- 0.05
while (!V2.ok) {
H2 <- est.H2(eta[, j], y, d, x, w2, a = a)
try.V2 <- try(chol2inv(chol(-H2)), silent = TRUE)
if (class(try.V2) != "try-error") {
V2[[j]] <- try.V2
V2.ok <- TRUE
}
else {
a <- a + 0.01
}
}
}
COV <- list()
for (j in fit.ok) {
S <- cbind(S2[[j]], S1)
Sw <- cbind(S2[[j]] * w2, S1 * w1)
Omega <- rbind(cbind(V2[[j]], V2[[j]] %*% H12[[j]] %*%
V1), cbind(t(H12[[j]]) * 0, V1))
Omega <- Omega %*% (t(S) %*% Sw) %*% t(Omega)
COV[[length(COV) + 1]] <- Omega[1:ncol(x), 1:ncol(x),
drop = FALSE]
}
names(COV) <- p[fit.ok]
COV
}
<bytecode: 0x55e0fb404258>
<environment: namespace:ctqr>
--- function search by body ---
Function asy.qr in namespace ctqr has this body.
----------- END OF FAILURE REPORT --------------
Error in if (class(try.V2) != "try-error") { :
the condition has length > 1
Calls: ctqr -> asy
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 1.0
Check: examples
Result: ERROR
Running examples in ‘ctqr-Ex.R’ failed
The error most likely occurred in:
> ### Name: ctqr
> ### Title: Censored and Truncated Quantile Regression
> ### Aliases: ctqr
> ### Keywords: survival models regression
>
> ### ** Examples
>
> # Using simulated data
>
> n <- 1000
> x1 <- runif(n)
> x2 <- runif(n)
>
> # Example 1 - censored data ######################################
>
> t <- runif(n, 0, 1 + x1 + x2) # time variable (e.g., time to death)
> c <- runif(n,0,5) # censoring variable (e.g., end of follow-up)
> y <- pmin(t,c) # observed variable = min(t,c)
> d <- (t <= c) # 1 = event (e.g., death), 0 = censored
>
> CDF1 <- pchreg(Surv(y,d) ~ x1 + x2, splinex = splinex())
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
> model1 <- ctqr(Surv(y,d) ~ x1 + x2, p = 0.5, CDF = CDF1)
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
ctqr
--- call from context ---
asy(z, y, d, xfullrank, weights, p, CDF, fit, fit.ok = which(fit.ok))
--- call from argument ---
if (class(try.V2) != "try-error") {
V2[[j]] <- try.V2
V2.ok <- TRUE
} else {
a <- a + 0.01
}
--- R stacktrace ---
where 1: asy(z, y, d, xfullrank, weights, p, CDF, fit, fit.ok = which(fit.ok))
where 2: ctqr(Surv(y, d) ~ x1 + x2, p = 0.5, CDF = CDF1)
--- value of length: 2 type: logical ---
[1] TRUE TRUE
--- function from context ---
function (z, y, d, x, weights, p, CDF, fit, fit.ok)
{
est.H2 <- function(fitted, y, d, x, weights, a) {
eps <- 1e-07
ok <- FALSE
while (!ok) {
eps <- eps * 2
fitted.l <- fitted - eps
fitted.r <- fitted + eps
oy.l <- (y <= fitted.l)
oy.r <- (y <= fitted.r)
check <- mean(oy.l != oy.r)
ok <- (check > a)
}
u.l <- d * (1 - pnorm(y - fitted.l, 0, eps))
u.r <- d * (1 - pnorm(y - fitted.r, 0, eps))
u <- (u.r - u.l)/(2 * eps)
-t(x) %*% (x * c(weights * u))
}
n <- length(y)
eta <- fit$fitted
oy <- fit$omega.y
oz <- fit$omega.z
Sy <- pmax(fit$CDF$Sy, 1e-10)
Sz <- pmax(fit$CDF$Sz, 1e-10)
if (is.null(w1 <- model.weights(CDF$mf))) {
w1 <- 1
}
w2 <- (if (!is.null(weights))
weights
else 1)
si <- fit$si
si[is.na(si)] <- 0
A <- firstep(CDF, z, y, d, w1)
V1 <- A$V
S1 <- A$Si
S2 <- V2 <- H12 <- list()
for (j in fit.ok) {
tau <- p[j]
S2[[j]] <- x * si[, j]
H12[[j]] <- t(x * w2) %*% ((1 - d) * oy[, j] * (1 - tau) *
A$dHy/Sy - oz[, j] * (1 - tau) * A$dHz/Sz)
V2.ok <- FALSE
a <- 0.05
while (!V2.ok) {
H2 <- est.H2(eta[, j], y, d, x, w2, a = a)
try.V2 <- try(chol2inv(chol(-H2)), silent = TRUE)
if (class(try.V2) != "try-error") {
V2[[j]] <- try.V2
V2.ok <- TRUE
}
else {
a <- a + 0.01
}
}
}
COV <- list()
for (j in fit.ok) {
S <- cbind(S2[[j]], S1)
Sw <- cbind(S2[[j]] * w2, S1 * w1)
Omega <- rbind(cbind(V2[[j]], V2[[j]] %*% H12[[j]] %*%
V1), cbind(t(H12[[j]]) * 0, V1))
Omega <- Omega %*% (t(S) %*% Sw) %*% t(Omega)
COV[[length(COV) + 1]] <- Omega[1:ncol(x), 1:ncol(x),
drop = FALSE]
}
names(COV) <- p[fit.ok]
COV
}
<bytecode: 0x2acf788>
<environment: namespace:ctqr>
--- function search by body ---
Function asy.qr in namespace ctqr has this body.
----------- END OF FAILURE REPORT --------------
Error in if (class(try.V2) != "try-error") { :
the condition has length > 1
Calls: ctqr -> asy
Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang
Version: 1.0
Check: examples
Result: ERROR
Running examples in ‘ctqr-Ex.R’ failed
The error most likely occurred in:
> ### Name: ctqr
> ### Title: Censored and Truncated Quantile Regression
> ### Aliases: ctqr
> ### Keywords: survival models regression
>
> ### ** Examples
>
> # Using simulated data
>
> n <- 1000
> x1 <- runif(n)
> x2 <- runif(n)
>
> # Example 1 - censored data ######################################
>
> t <- runif(n, 0, 1 + x1 + x2) # time variable (e.g., time to death)
> c <- runif(n,0,5) # censoring variable (e.g., end of follow-up)
> y <- pmin(t,c) # observed variable = min(t,c)
> d <- (t <= c) # 1 = event (e.g., death), 0 = censored
>
> CDF1 <- pchreg(Surv(y,d) ~ x1 + x2, splinex = splinex())
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in if (class(H1) != "try-error") { :
the condition has length > 1 and only the first element will be used
Warning in while (class(v) == "try-error") { :
the condition has length > 1 and only the first element will be used
> model1 <- ctqr(Surv(y,d) ~ x1 + x2, p = 0.5, CDF = CDF1)
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
ctqr
--- call from context ---
asy(z, y, d, xfullrank, weights, p, CDF, fit, fit.ok = which(fit.ok))
--- call from argument ---
if (class(try.V2) != "try-error") {
V2[[j]] <- try.V2
V2.ok <- TRUE
} else {
a <- a + 0.01
}
--- R stacktrace ---
where 1: asy(z, y, d, xfullrank, weights, p, CDF, fit, fit.ok = which(fit.ok))
where 2: ctqr(Surv(y, d) ~ x1 + x2, p = 0.5, CDF = CDF1)
--- value of length: 2 type: logical ---
[1] TRUE TRUE
--- function from context ---
function (z, y, d, x, weights, p, CDF, fit, fit.ok)
{
est.H2 <- function(fitted, y, d, x, weights, a) {
eps <- 1e-07
ok <- FALSE
while (!ok) {
eps <- eps * 2
fitted.l <- fitted - eps
fitted.r <- fitted + eps
oy.l <- (y <= fitted.l)
oy.r <- (y <= fitted.r)
check <- mean(oy.l != oy.r)
ok <- (check > a)
}
u.l <- d * (1 - pnorm(y - fitted.l, 0, eps))
u.r <- d * (1 - pnorm(y - fitted.r, 0, eps))
u <- (u.r - u.l)/(2 * eps)
-t(x) %*% (x * c(weights * u))
}
n <- length(y)
eta <- fit$fitted
oy <- fit$omega.y
oz <- fit$omega.z
Sy <- pmax(fit$CDF$Sy, 1e-10)
Sz <- pmax(fit$CDF$Sz, 1e-10)
if (is.null(w1 <- model.weights(CDF$mf))) {
w1 <- 1
}
w2 <- (if (!is.null(weights))
weights
else 1)
si <- fit$si
si[is.na(si)] <- 0
A <- firstep(CDF, z, y, d, w1)
V1 <- A$V
S1 <- A$Si
S2 <- V2 <- H12 <- list()
for (j in fit.ok) {
tau <- p[j]
S2[[j]] <- x * si[, j]
H12[[j]] <- t(x * w2) %*% ((1 - d) * oy[, j] * (1 - tau) *
A$dHy/Sy - oz[, j] * (1 - tau) * A$dHz/Sz)
V2.ok <- FALSE
a <- 0.05
while (!V2.ok) {
H2 <- est.H2(eta[, j], y, d, x, w2, a = a)
try.V2 <- try(chol2inv(chol(-H2)), silent = TRUE)
if (class(try.V2) != "try-error") {
V2[[j]] <- try.V2
V2.ok <- TRUE
}
else {
a <- a + 0.01
}
}
}
COV <- list()
for (j in fit.ok) {
S <- cbind(S2[[j]], S1)
Sw <- cbind(S2[[j]] * w2, S1 * w1)
Omega <- rbind(cbind(V2[[j]], V2[[j]] %*% H12[[j]] %*%
V1), cbind(t(H12[[j]]) * 0, V1))
Omega <- Omega %*% (t(S) %*% Sw) %*% t(Omega)
COV[[length(COV) + 1]] <- Omega[1:ncol(x), 1:ncol(x),
drop = FALSE]
}
names(COV) <- p[fit.ok]
COV
}
<bytecode: 0x46372c8>
<environment: namespace:ctqr>
--- function search by body ---
Function asy.qr in namespace ctqr has this body.
----------- END OF FAILURE REPORT --------------
Error in if (class(try.V2) != "try-error") { :
the condition has length > 1
Calls: ctqr -> asy
Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc