Description Usage Details Value Author(s) Examples
The function implements the proposed methodology in Nevo and Gorfine (2021+, Biostatistics)
1 2 3 4 5 6 7 8 9 | EMcausalSC(
data,
Xnames,
Lname = NULL,
max.iter = 10000,
w = NULL,
eps.conv = 1e-04,
init.thetas = c(1, 1)
)
|
bla bla bla
S_2|A=a(t), for a=0,1 (names: S2A0 and S2A1)
Daniel Nevo
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ## Not run:
set.seed(314)
times <- seq(1, 15, 1)
alpha.nt <- LongitSemiComp:::logit(dchisq(times,3, ncp =5)/2 + 0.025)
alpha.t <- LongitSemiComp:::logit(times*(0.075/10) - 0.0005*(times/20)^2 + 0.05)
alpha.or <- 0.15 - times/10 + 0.75*(times/10)^2 + 0.3*(times/20)^3
plot(x = times, y= exp(alpha.or))
plot(x = times, y= LongitSemiComp:::expit(alpha.nt))
plot(x = times, y= LongitSemiComp:::expit(alpha.t))
beta.nt <- log(c(0.7, 3))
beta.t <- log(c(0.5, 1))
beta.or <- log(c(1.4, 1))
beta.y <- log(1.4)
my.data <- SimLongitData(n.sample = 2000, times = times, beta.y,
alpha.nt, alpha.t, alpha.or,
beta.nt, beta.t, beta.or)
longit.data <- my.data[-1]
X <- as.data.frame(my.data[1])
LongitSC(longit.data = longit.data, times = times, formula.NT = ~ X.1 + X.2,
formula.T = ~ X.1 + X.2,
formula.OR = ~ X.1 + X.2,
data = X, epsOR = 10^(-10),
knots = 5, lambda = 1)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.