[Rsiena-help] non-numeric data?

Maarten Selfhout maarten.vanzalk at oru.se
Fri May 28 10:38:54 CEST 2010


Dear Ruth,

I get a very strange error on  top of the prior mentioned ones: When I  
try to specify my covariates and behaviors, it tells me I have  
nonnumeric data:


 > library(RSiena)
 >     library(snow)
 >     library(rlecuyer)
 >     setwd('/Users/maartenselfhout/Desktop/sex and friends/school1')
 >     net.w1 <- as.matrix(read.table("W1SIENA.dat"))
 >      net.w2 <- as.matrix(read.table("W2SIENA.dat"))
 >      net.w3 <- as.matrix(read.table("W3SIENA.dat"))
 >   sex <- as.matrix(read.table("sex.dat"))
 >   mat <- as.matrix(read.table("mat.dat"))
 >  net.w1[net.w1 %in% c(6,9)] <- NA
 >    net.w2[net.w2 %in% c(6,9)] <- NA
 >    net.w3[net.w3 %in% c(6,9)] <- NA
 >  mat[mat %in% c(99)] <- NA
 >  mymodel <- sienaModelCreate(useStdInits = TRUE, projname = 's50_2')
Error: could not find function "sienaModelCreate"
 >  friendship <- sienaNet(array(c(net.w1, net.w2, net.w3), dim=c(232,  
232, 3)))
 > sex <- sienaNet(drink, type="sex")
Error in sienaNet(drink, type = "sex") : object 'drink' not found
 > sex <- sienaNet(sex, type="behavior")
Error in sienaNet(sex, type = "behavior") : entries must be numeric
 > sex[sex %in% c(99)] <- NA
 > sex <- varCovar(val = sex[,] )
Error in varCovar(val = sex[, ]) : val must be numeric or a factor
 > mat <- varCovar(val = mat[,] )
Error in varCovar(val = mat[, ]) : val must be numeric or a factor
 > source("/Users/maartenselfhout/Downloads/RSiena 2/sienascript")


However, the filers only have numeric data, which can be 0, 1, 2, 3 or  
99 for missing (which I recoded into NA above).

I get the exact same error in  the GUI. Is there something I need to  
add to specify the files correctly?

Kind regards,

Maarten




More information about the Rsiena-help mailing list