Displaying 1 result from an estimated 1 matches for "syntaxfil".
Did you mean:
syntaxfel
2011 Jan 06
4
Different LLRs on multinomial logit models in R and SPSS
...et)
mod1 <- multinom(y ~ ., data=df, trace=F)
deviance(mod1) # 199.0659
mod0 <- update(mod1, . ~ 1, trace=FALSE)
deviance(mod0) # 204.2904
Output data and syntax for SPSS:
df2 <- df
df2[, 1] <- as.numeric(df[, 1])
write.csv(df2, file="dfxy.csv", row.names=F, na="")
syntaxfile <- "dfxy.sps"
cat('GET DATA
/TYPE=TXT
/FILE=\'', getwd(), '/dfxy.csv\'
/DELCASE=LINE
/DELIMITERS=","
/QUALIFIER=\'"\'
/ARRANGEMENT=DELIMITED
/FIRSTCASE=2
/IMPORTCASE=ALL
/VARIABLES=
y "F1.0"
a "F8.4"...