0

我正在运行一个 R 脚本来对我的数据进行验证性因素分析,但我最终得到了错误Error: cannot allocate vector of size 56 Kb。我的脚本有问题还是与我的系统资源有关。这是一份包含80个项目和5个因素的问卷。这是代码。

    library(sem)
    mydata.girls=read.table('data-girls.txt',nrow=150)

    mydata.girls.cov=cov(mydata.girls)

    model.mydata.girls <- specifyModel()
    F1->V1,lam1,.48
    F1->V3,lam3,.53
    F1->V5,lam5,.48
    F1->V14,lam14,.46
    F1->V15,lam15,.57
    F1->V19,lam19,.47
    F1->V24,lam24,.61
    F1->V28,lam28,.56
    F1->V29,lam29,.54
    F1->V31,lam31,.62
    F1->V38,lam38,.44
    F1->V40,lam40,.60
    F1->V42,lam42,.43
    F1->V44,lam44,.55
    F1->V46,lam46,.44
    F1->V48,lam48,.68
    F1->V54,lam54,.53
    F1->V63,lam63,.49
    F1->V64,lam64,.53
    F1->V65,lam65,.58
    F1->V66,lam66,.53
    F1->V69,lam69,.42
    F1->V80,lam80,.45
    F2->V6,lam6,.62
    F2->V9,lam9,.47
    F2->V13,lam13,.43
    F2->V17,lam17,.47
    F2->V36,lam36,.51
    F2->V37,lam37,.61
    F2->V45,lam45,.69
    F2->V49,lam49,.58
    F2->V53,lam53,.61
    F2->V56,lam56,.58
    F2->V57,lam57,.63
    F2->V60,lam60,.61
    F2->V62,lam62,.61
    F2->V67,lam67,.57
    F2->V68,lam68,.55
    F2->V71,lam71,.62
    F2->V74,lam74,.49
    F2->V75,lam75,.72
    F3->V4,lam4,.63
    F3->V7,lam7,.52
    F3->V11,lam11,.66
    F3->V18,lam18,.64
    F3->V25,lam25,.64
    F3->V30,lam30,.63
    F3->V32,lam32,.67
    F3->V33,lam33,.56
    F3->V35,lam35,.56
    F3->V39,lam39,.49
    F3->V43,lam43,.56
    F3->V47,lam47,.54
    F3->V50,lam50,.62
    F3->V52,lam52,.55
    F3->V77,lam77,.60
    F3->V78,lam78,.56
    F3->V79,lam79,.67
    F4->V10,lam10,.59
    F4->V20,lam20,.70
    F4->V23,lam23,.48
    F4->V26,lam26,.78
    F4->V34,lam34,.72
    F4->V41,lam41,.72
    F4->V58,lam58,.73
    F4->V59,lam59,.70
    F4->V70,lam70,.69
    F4->V72,lam72,.78
    F4->V73,lam73,.48
    F4->V76,lam76,.72
    F5->V8,lam8,.73
    F5->V21,lam21,.74
    F5->V22,lam22,.63
    F5->V51,lam51,.56
    V1<->V1,e1,NA
    V2<->V2,e2,NA
    V3<->V3,e3,NA
    V4<->V4,e4,NA
    V5<->V5,e5,NA
    V6<->V6,e6,NA
    V7<->V7,e7,NA
    V8<->V8,e8,NA
    V9<->V9,e9,NA
    V10<->V10,e10,NA
    V11<->V11,e11,NA
    V12<->V12,e12,NA
    V13<->V13,e13,NA
    V14<->V14,e14,NA
    V15<->V15,e15,NA
    V16<->V16,e16,NA
    V17<->V17,e17,NA
    V18<->V18,e18,NA
    V19<->V19,e19,NA
    V20<->V20,e20,NA
    V21<->V21,e21,NA
    V22<->V22,e22,NA
    V23<->V23,e23,NA
    V24<->V24,e24,NA
    V25<->V25,e25,NA
    V26<->V26,e26,NA
    V27<->V27,e27,NA
    V28<->V28,e28,NA
    V29<->V29,e29,NA
    V30<->V30,e30,NA
    V31<->V31,e31,NA
    V32<->V32,e32,NA
    V33<->V33,e33,NA
    V34<->V34,e34,NA
    V35<->V35,e35,NA
    V36<->V36,e36,NA
    V37<->V37,e37,NA
    V38<->V38,e38,NA
    V39<->V39,e39,NA
    V40<->V40,e40,NA
    V41<->V41,e41,NA
    V42<->V42,e42,NA
    V43<->V43,e43,NA
    V44<->V44,e44,NA
    V45<->V45,e45,NA
    V46<->V46,e46,NA
    V47<->V47,e47,NA
    V48<->V48,e48,NA
    V49<->V49,e49,NA
    V50<->V50,e50,NA
    V51<->V51,e51,NA
    V52<->V52,e52,NA
    V53<->V53,e53,NA
    V54<->V54,e54,NA
    V55<->V55,e55,NA
    V56<->V56,e56,NA
    V57<->V57,e57,NA
    V58<->V58,e58,NA
    V59<->V59,e59,NA
    V60<->V60,e60,NA
    V61<->V61,e61,NA
    V62<->V62,e62,NA
    V63<->V63,e63,NA
    V64<->V64,e64,NA
    V65<->V65,e65,NA
    V66<->V66,e66,NA
    V67<->V67,e67,NA
    V68<->V68,e68,NA
    V69<->V69,e69,NA
    V70<->V70,e70,NA
    V71<->V71,e71,NA
    V72<->V72,e72,NA
    V73<->V73,e73,NA
    V74<->V74,e74,NA
    V75<->V75,e75,NA
    V76<->V76,e76,NA
    V77<->V77,e77,NA
    V78<->V78,e78,NA
    V79<->V79,e79,NA
    V80<->V80,e80,NA
    F1<->F1,NA,1
    F2<->F2,NA,1
    F3<->F3,NA,1
    F4<->F4,NA,1
    F5<->F5,NA,1
    F1<->F2,F1F2,0.69
    F1<->F3,F1F3,0.67
    F1<->F4,F1F4,0.61
    F1<->F5,F1F5,0.57
    F2<->F3,F2F3,0.74
    F2<->F4,F2F4,0.54
    F2<->F5,F2F5,0.47
    F3<->F4,F3F4,0.60
    F3<->F5,F3F5,0.52
    F4<->F5,F4F5,0.69

    mydata.girls.sem <- sem(model.mydata.girls, mydata.girls.cov, nrow(mydata.girls))
    summary (mydata.girls.sem)
    std.coef(mydata.girls.sem)
4

0 回答 0