When the same code (with v = logrr^2 fake data) was applied to the main datasheet, the following error came up: "Error in if (delta < tol) break : missing value where TRUE/FALSE needed"
Do you have any suggestions for how we can fix this?
I am assuming v here is variance. How can we derive variance from standard error in the datasheet? We're not statisticians and thus unfamiliar with this process.
(In the rstudio help, we found that v is 'a vector to specify the variances of the reported outcome. Alternatively the user can provide the standard error in the se argument, or only for log relative risks, the confidence interval in the lb and ub arguments.'
--> I cannot understand why v is not delivered even though there is a se axis in the dataset. We tried v=se or v=se^2 but same errorcode came up... Error in diag(cx[v != 0] + cx[v == 0], nrow = sum(v != 0)) : 'x' must have positive length )
Why did you convert "event.n" data into integer form? Is it necessary for the process?
Question - 3 - No need to change event.n to integer but since cases requires a counting variable you might want to use total.n instead.
Question 1 - The error means there are empty or zero cells in the vector. In the little example the vector was complete so it gave no error. Please note that you have se = standard error column but don't have sd or variance column which is a bit suspicious because you cannot compute standard error without knowing s.d or variance.
se = standard error = sd = standard deviance - You should use se^2