I kept getting a problem for the following code; "weights=weight" was shown as an unused argument. How should I solve the problem?
x_0 <- rbinom(1,100, 0.01)
x_1 <- rbinom(1,100, 0.1)
x <- c(0,0,1,1)
y <- c(0,1,0,1)
weight <- c(100-x_0, x_0, 100-x_1, x_1)
result <- logistf(y ~ x, weights=weight)$coef[2]
Also, is there a way to perform the whole process shown above 30, 60, or 100 times and generate time (or count), x_0, x_1, and result for each time? Any suggestion would be great. Thanks.