Displaying 1 result from an estimated 1 matches for "ordscor".
Did you mean:
ordscore
2012 Apr 30
1
question on jitter in plot.Predict in rms
...v 2.14.1 under windows 7
####################################################################
#question about jitter/llist in rms
require(rms)
#simulate some data
n = 5000
age = runif(n)
score = runif(n) + 0.5*age
group<- as.numeric(sample(c(FALSE,TRUE), 5000, replace=T, prob=c(.1, .9)))
ordscore = as.numeric(factor(rep(1:5, length.out=n)))
table(group,ordscore)
e = rnorm(n, 0, 0.1)
#true model
y = group + 0.6*ordscore + group*ordscore + .2*age + e
#convert group to factor
group.f<-as.factor(group)
#save data characterics
dd1<-datadist(age,ordscore,group.f)
options(datadi...