#探索的因子分析 > x<-read.delim("clipboard") > factanal(x,factors=8,rotation="varimax") #確認的因子分析 > x<-read.delim("clipboard") > consumer.model.cfa<-' + f1=~active1+active2+active3 + f2=~fTV1+fTV2+fTV3 + f3=~fmagazine1+fmagazine2+fmagazine3 + f4=~fLIVE1+fLIVE2+fLIVE3 + f5=~fradio1+fradio2+fradio3 + f6=~faudition1+faudition2+faudition3 + f7=~fSNS1+fSNS2+fSNS3 + f8=~fyoutube1+fyoutube2+fyoutube3' > library(lavaan) > fit<-cfa(model=consumer.model.cfa,data=x,estimator="ML") > summary(fit,fit.measures=TRUE,standardized=T,rsquare=T) #共分散構造分析 > x<-read.delim("clipboard") > first.model.sem<-' + f1=~active1+active2+active3 + f2=~fTV1+fTV2+fTV3 + f3=~fmagazine1+fmagazine2+fmagazine3 + f4=~fLIVE1+fLIVE2+fLIVE3 + f5=~fradio1+fradio2+fradio3 + f6=~faudition1+faudition2+faudition3 + f7=~fSNS1+fSNS2+fSNS3 + f8=~fyoutube1+fyoutube2+fyoutube3 + f1~f2 + f1~f3 + f1~f4 + f1~f5 + f1~f6 + f1~f7 + f1~f8' > library(lavaan) > fit<-sem(model=first.model.sem,data=x,estimator="ML") > summary(fit,fit.measures=TRUE,standardized=T,rsquare=T) #コンジョイント分析 experiment<-expand.grid( + gentei=c("あり","なし"), + hindo=c("多い","少ない"), + offshot=c("あり","なし"), + SNS=c("あり","なし")) > design<-caFactorialDesign(data=experiment,type="orthogonal") > design > caEncodedDesign(design) > cor(caEncodedDesign(design)) > x<-read.delim("clipboard") > tprefm<-x > tprof<-caEncodedDesign(design) > tlevn<-as.matrix(c("あり","なし","多い","少ない","あり","なし","あり","なし")) > Conjoint(tprefm,tprof,tlevn)