Closed yohei-h closed 1 year ago
It depends on where the weights are from. If they are from a survey, I would estimate the df according to the appropriate survey stats methodology. If you have a large n-size, you can always use the normal approximation.
Hi Paul, Thank you so much for your kind advice. If I use the normal approximation for the sample above, is the way below correct?
# p_value
s <- summary(two_level)
t_value <- s$coef[, 't value'][2]
p_value <- pnorm(abs(t_value), lower.tail = F)*2
# estimate, 95% CI
estimate <- (s$coef[, 'Estimate'][2]) %>% round(2)
lower_CI <- (s$coef[, 'Estimate'][2] - 1.96*s$coef[, 'Std. Error'][2]) %>% round(2)
upper_CI <- (s$coef[, 'Estimate'][2] + 1.96*s$coef[, 'Std. Error'][2]) %>% round(2)
paste0('P=', p_value)
paste0('Estimate (95%CI): ', estimate , '(', lower_CI, ' to ', upper_CI, ')')
Yes, that's consistent with using a normal approximation.
Thank you so much!
Hi Paul,
Thank you so much for kind reply. If you have some time, I would appreciate it if you could see the #11 issue. It seems to be already closed but I have written more comments.
Yohei Hashimoto, M.D., Ph.D. | Research Fellow - Save Sight Registries Save Sight Institute | The University of Sydney Level 1 | South Block | Sydney Hospital | 8 Macquarie St | Sydney NSW 2000 Email: @. | @.
On 1 Jun 2023, at 1:42 PM, Paul Bailey @.***> wrote:
Closed #10 https://github.com/American-Institutes-for-Research/WeMix/issues/10 as completed.
— Reply to this email directly, view it on GitHub https://github.com/American-Institutes-for-Research/WeMix/issues/10#event-9397729988, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK5BGPXPOYZSC7WH2M6ANFLXJAFSHANCNFSM6AAAAAAYTO3NTY. You are receiving this because you authored the thread.
Hi All,
I would like to estimate 95% confidence intervals and p-values with WeMix::mix(). Could anybody tell me how to do it? The below is a sample code.