search for: bshz

Displaying 2 results from an estimated 2 matches for "bshz".

Did you mean: bsh
2012 Apr 05
1
integrate function - error -integration not occurring with last few rows
...TIME", "DOSE") data1<-data1[order(data1$DOSE,data1$ID,data1$TIME),] ################ basescore=95 basescore_sd=0.12 fall=0.15 fall_sd=0.5 slope=5 dose_slope1=0.045 dose_slope2=0.045 dose_slope3=0.002 rise_sd=0.5 ed<-data1[!duplicated(data1$ID) , c(1,3)] ed$base=1 ed$drop=1 ed$bshz<-1 ed$up<-1 ed set.seed(5234123) k<-0 for (i in 1:length(ed$ID)) { k<-k+1 ed$base[k]<-basescore*exp(rnorm(1,0,basescore_sd)) ed$drop[k]<-fall*exp(rnorm(1,0,fall_sd)) ed$up[k]<-slope*exp(rnorm(1,0,rise_sd)) ed$bshz<-beta0 } comb1<-merge(data1[, c("ID","TI...
2012 Mar 25
2
avoiding for loops
I have data that looks like this: > df1 group id 1 red A 2 red B 3 red C 4 blue D 5 blue E 6 blue F I want a list of the groups containing vectors with the ids. I am avoiding subset(), as it is only recommended for interactive use. Here's what I have so far: df1 <- data.frame(group=c("red", "red", "red", "blue",