Open Jackeyontheway opened 2 years ago
I am trying to run PredictorResponseUnivar fuction with a binomial outcome ,but it gave the following error:
" Error in apply(fit$h.hat[sel, ], 2, SummarySamps, q = q) : The value of dim(X) must be positive."
Then I run the code to check the dimension of X .The result is following:
PredictorResponseUnivar(fitpr, y = Y, Z =scale_expos, X =datp$age, which.z = 1:ncol(Z), method = "approx", ngrid = 50, q.fixed = 0.5, sel = NULL, min.plot.dist = Inf, center = TRUE, z.names = colnames(Z)) Error in apply(fit$h.hat[sel, ], 2, SummarySamps, q = q) : dim(X)的值必需是正数 dim(X) [1] 1000 1
PredictorResponseUnivar(fitpr, y = Y, Z =scale_expos, X =datp$age,
X was defined as a continuous variable representing age. Can you please let me know why am I getting this error and help me run the code?
Thanks !
I am trying to run PredictorResponseUnivar fuction with a binomial outcome ,but it gave the following error:
" Error in apply(fit$h.hat[sel, ], 2, SummarySamps, q = q) : The value of dim(X) must be positive."
Then I run the code to check the dimension of X .The result is following:
X was defined as a continuous variable representing age. Can you please let me know why am I getting this error and help me run the code?
Thanks !