Displaying 2 results from an estimated 2 matches for "getalong".
2012 Sep 15
5
create new variable with ifelse? (reproducible example)
Dear R users,
I have a reproducible data and try to create new variable "clo" is 1 if
know variable is equal to "very well" or "fairly well" and getalong is 4 or
5
otherwise it is 0.
rep_data<- read.table(header=TRUE, text="
id1 id2 know getalong
100000016_a1 100000016_a2 very well 4
100000035_a1 100000035_a2 fairly well NA
100000036_a1 100000036_a2 very well 3
100000039_a1 100000...
2012 Aug 13
0
rjags error. Error parsing model file:,syntax error on line 5 near ""
...) # Variance/Covariance matrix
}
"
writeLines(modelstring,con="model.txt")
#--------------------------------------------------------
# READ IN DATA AND PREPARE FOR JAGS
cfadata = read.csv("~/Desktop/rjags stuff/nelsdata.csv",header=T)
nData = NROW(cfadata)
yname = c("getalong", "spirit", "discfair", "friends", "tchgood",
"tcherint", "tchprais", "tlisten",
"studisr", "tputdown", "strict", "sputdown", "notsafe",
"dislrn", &q...