Displaying 2 results from an estimated 2 matches for "schtyp".
Did you mean:
schirp
2012 Mar 13
2
sort list
Hello can anyone help please?
i read two words "cell1", "cell2" into a list. I want to turn this list
into a factor.
> cell_data <-list(c('cell1','cell2'))
> cell_data
[[1]]
[1] "cell1" "cell2"
> factor_list <- factor(cell_data)
Error in sort.list(y) : 'x' must be atomic for 'sort.list'
Have you called
2013 Jan 11
0
Error with looping through a list of strings as variables
...LTS.csv")
hsb2 <- read.csv("http://www.ats.ucla.edu/stat/data/hsb2.csv")
names(hsb2)
set.seed(8296)
ctrl <- cforest_unbiased(ntree=500, mtry=2)
varlist <- names(hsb2)[3:4]
for (h in varlist){
for (k in c(1,0)){
for (i in c(1,2)){ ## Data subset
filtered <- subset(hsb2,
schtyp == i
& female == k,
select = c(id:socst))
rank.cf <- cforest(h ~ write + math + science + socst,
data = filtered,
control = ctrl)
print(rank.cf)
## Standard importance values __________________________
imp=varimp(rank.cf,
conditional = TRUE)
print(imp)
## predict variables _________________...