我使用64位R(不是RStudio) 我收到以下错误:
nounsResults< - multinom(Major1~。,data = nouns,MaxNWts = 120000) 重量:101332(100521变量) 错误:无法分配大小为512 Kb的向量
我的代码是R中多项逻辑回归的第一次尝试 (多次gc()调用是我的恐慌)
library(foreign)
library(nnet)
library(ggplot2)
library(reshape2)
sink("C:\\Users\\xxx\\Dropbox\\__xx\\datafiles\\OutputR.txt", append=FALSE, split=TRUE)
gc()
memory.limit()
options(max.print=1000000)
nouns <- read.csv("C:\\Users\\xxx\\Dropbox\\__xx\\datafiles\\nouns-categorical_R1.csv")
#sapply(nouns,function(x) sum(is.na(x)))
gc()
nouns$Major1<-relevel(nouns$Major0, ref="ACCOUNTING")
nouns$Major1
gc()
nounsResults <- multinom(Major1 ~ ., data = nouns, MaxNWts=120000)
gc()
nounsResults