Skip to main content
rawr's user avatar
rawr's user avatar
rawr's user avatar
rawr
  • Member for 9 years, 11 months
  • Last seen more than 1 year ago
comment
R - Creating a logistic regression for CQC data
probably shouldnt be using an lm for the outcome with 4 categories anyway. is pub_date a date? i would change that to something more interpretable like time since some start date. untested: loc_rating$loc_rating_ind <- as.integer(with(loc_rating, loc_rating == 'Good' | loc_rating == 'Outstanding')); glm(loc_rating_ind ~ pub_date, data = loc_rating, family = 'binomial')
comment
comment
How can I manually calculate the Bonferroni correction?
no you multiply by 15 not divide pmin(1, p * length(p)); p.adjust(p, method = 'bonferroni')
comment
How to handle with NA's when doing glm in R (and not removing entire rows)?
for the categorical case, you can add another (non NA) value for the missing cases, addNA does something similar
awarded
awarded
comment
Cohen's d and standard deviation from t-test in r
you already know the answer: "mean difference / standard deviation" d <- (mean(M$V1) - mean(M$V2)) / sd(c(M$V1, M$V2))
awarded
revised
Loading…
comment
Add categorical variable in crr of package cmprsk
@DanChaltiel hmm, good point. I'm not sure, but it seems to do with how finegray handles discrete time (or times with ties). For example, if you add a tiny amount of noise to the time variable, you get the same coefficients: run transplant$futime <- transplant$futime + runif(nrow(transplant), 0, 0.1) first then fit the models. There is a line in finegray which is newtime <- matrix(findInterval(Y[, 1:2], utime), ncol = 2) where utime are unique times, so that may be the culprit
awarded
awarded
revised
Loading…
awarded
comment
Multiple regression in R
race, ed, drace, and ded are categorical variables with more than two levels each, you can't just throw them into a model like that
awarded
Loading…
comment
Are median and confidence intervals appropriate?
see here for some suggestions. also look at some of the linked questions. what about a median with bootstrap CIs?