if (FALSE) {
# example 1:Perceptual analysis of associations between car models and car attributes
# load car data
data(car)
# compute 5 runs of disjunctive and conjunctive models with 1 up to 4 features
car.lst<-stepplfm(minF=1,maxF=4,maprule="disj/conj",freq1=car$freq1,
freqtot=car$freqtot,M=5,emcrit1=1e-6)
# print output of the conjunctive model with 4 features
car.lst$conj[[4]]
# print output of the stepplfm analysis on the car data
car.lst
# summarize and print output of stepplfm analysis on car data
sumcar<-summary(car.lst)
sumcar
# visualize fit of models with different mapping rules and a different number of features
par(pty="s")
par(mfrow=c(2,2))
plot(car.lst,which="BIC")
plot(car.lst,which="AIC")
plot(car.lst,which="VAF")
}
if (FALSE) {
# example 2: analysis on determinants of anger-related behavior
# load anger data
data(anger)
# compute 1 run of disjunctive models with 1 up to 3 features
anger.lst<-stepplfm(minF=1,maxF=3,maprule="disj",freq1=anger$freq1,freqtot=anger$freqtot,M=1)
# print output of disjunctive model with 2 features
anger.lst[[2]]
# print output of stepplfm analysis on anger data
anger.lst
# summarize and print output of stepplfm analysis on anger data
sumanger<-summary(anger.lst)
sumanger
# visualize fit of models with different mapping rules and a different number of features
par(pty="s")
par(mfrow=c(2,2))
plot(anger.lst,which="BIC")
plot(anger.lst,which="AIC")
plot(anger.lst,which="VAF")
}
Run the code above in your browser using DataLab