Changing p-value when using elrm in r -
i new user r , perform exact logistic regression. have chosen method because dependent variable binary (i.e. 0 failure , 1 success), , have continuous independent variables. have small sample size of n=10. following sample of code have written.
library(elrm) baselinesteps = c(4202, 7244, 4374.6, 2965.6, 4263.5, 1814.1, 3243.1, 3102.9, 4652.5, 6324.9) stepsclass = c(1, 0, 1, 1, 1, 1, 1, 1, 1, 1) const = rep(1,length(stepsclass)) dat = data.frame(pred = baselinesteps, trials = const, success = stepsclass) m.stepsfromsteps = elrm(formula = success/trials ~ pred, interest = ~pred, iter = 22000, dataset = dat, burnin = 2000)
i trying use baseline average steps/day taken subject determine class of recovery pattern fall (0 or 1). however, when run last line elrm implemented (changing nothing), obtain drastically different p-values every time run it. see following:
> m.stepsfromsteps = elrm(formula = success/trials ~pred, interest = ~pred, iter=30000, dataset = dat, burnin=5000) > m.stepsfromsteps$p.values pred 0.16176 > m.stepsfromsteps = elrm(formula = success/trials ~pred, interest = ~pred, iter=30000, dataset = dat, burnin=5000) > m.stepsfromsteps$p.values pred 0.613 > m.stepsfromsteps = elrm(formula = success/trials ~pred, interest = ~pred, iter=30000, dataset = dat, burnin=5000) > m.stepsfromsteps$p.values pred 1 > m.stepsfromsteps = elrm(formula = success/trials ~pred, interest = ~pred, iter=30000, dataset = dat, burnin=5000) > m.stepsfromsteps$p.values pred 0.83056
i have tried dramatically increasing iterations (iter = 50000) burnin, no avail. p-values still drastically change each time run this. have performed 50 exact logistic regressions in same format using different predictors and/or classes, , of them have same issue of producing different p-values each time.
any appreciated.
Comments
Post a Comment