Displaying 1 result from an estimated 1 matches for "training_tru".
Did you mean:
training_true
2007 Apr 16
1
My First Function: cryptic error message
...in data
[snip]
#Recursive partitioning:
library("rpart")
# get a 2/3 random sample of ids
ids <- sample(probands$id,
size = 2*(length(probands$id))/3,
replace = FALSE)
# now I want a logical vector telling me which sample to put the
# subjects in:
#training_true <- probands$id %in% ids
training <- subset(probands, probands$id %in% ids)
testing <- subset(probands, ! probands$id %in% ids)
# formula for the rpart model
adhdcbin <- factor(probands$adhdcbin, ordered = TRUE,
labels = cbind("Control","ADHD" ))...