Re: [R] Sequential date by group

2019-09-03 Thread Miluji Sb
Thanks, Jeff. I am trying your solutions - appreciate your help! Best, Milu On Tue, Sep 3, 2019 at 12:51 AM Jeff Newmiller wrote: > Your sample data has startdate and enddate columns as though these values > might vary throughout the data set, but your description suggests that > those values

Re: [R] Large mixed & crossed-effect model looking at educational spending on crime rates with error messages

2019-09-03 Thread Patrick (Malone Quantitative)
(And post in plain text) On Tue, Sep 3, 2019 at 10:34 AM Bert Gunter wrote: > > You should post this on the R-sig-mixed-models list, not here. When you do > so, use ?dput to include data, not cut and paste. > > Cheers, > Bert > > > On Tue, Sep 3, 2019 at 6:10 AM Ades, James wrote: > > > > > I po

Re: [R] Large mixed & crossed-effect model looking at educational spending on crime rates with error messages

2019-09-03 Thread Bert Gunter
You should post this on the R-sig-mixed-models list, not here. When you do so, use ?dput to include data, not cut and paste. Cheers, Bert On Tue, Sep 3, 2019 at 6:10 AM Ades, James wrote: > > I posted my question at Stack Overflow, where it didn’t get much of a > response, and I was pointed in

[R] Large mixed & crossed-effect model looking at educational spending on crime rates with error messages

2019-09-03 Thread Ades, James
I posted my question at Stack Overflow, where it didn’t get much of a response, and I was pointed in this direction by Ben Bolker. I’m happy to send the whole dataset to anyone who wants but thought that it would be presumptuous to include an enormous dput() here. I’m looking at the effects of

Re: [R] Efficient way to update a survival model

2019-09-03 Thread Andrews, Chris
library("survival") set.seed(1) v <- runif(nrow(pbc), min = 0, max = 2) Cox0 <- coxph(Surv(pbc$time,pbc$status == 2) ~ v, data = pbc) Cox <- vector("list", 10) for (k in 1:10) { form <- as.formula(sprintf(". ~ . + cos(%d * v)", k)) Cox[[k]] <- update(if (k==1) Cox0 else Cox[[k-1]]