colnames(transport)[1]="Sex" transport$age <- as.factor(transport$age) colnames(transport)[82]="use.of.parking.relay.metro" colnames(transport)[88:92]=c("drive.saloon.car", "drive.four.wheeler", "drive.estate.car", "drive.commercial.vehicle", "drive.sports.car") transport$driving.licence <- as.factor(transport$driving.licence) colnames(transport)[97:99]=c("ticket.public.transport.season", "ticket.velostar.season", "ticket.fraud") colnames(transport)[179:187]=c("choice.according.to.brand", "choice.according.to.price", "choice.according.to.category", "choice.according.to.fuel.consumption", "choice.according.to.carbon.gas.emissions", "choice.according.to.color", "choice.according.to.power", "choice.according.to.nb.of.km", "choice.according.to.age.of.the.car") colnames(transport)[189:195]=c("politics.far.left", "politics.green", "politics.socialists", "politics.modem", "politics.ump", "politics.far.right", "politics.no.preference") colnames(transport)[205]="buying.a.classic.or.an.estate.car" colnames(transport)[211]="regular.sport.practice" colnames(transport)[215]="people.using.car.fell.guilty" colnames(transport)[216]="pro.carbon.tariffs" library(FactoMineR) library(dynGraph) library(EnQuireR) summary(transport) #MCA transport.MCA <- transport[, c("going.to.work.or.school.by.car", "going.to.work.or.school.by.bike", "going.to.work.or.school.by.public.transport", "going.to.work.or.school.by.scooter", "going.to.work.or.school.by.motorcycle", "going.to.work.or.school.by.foot", "going.to.leisure.by.car", "going.to.leisure.by.bike", "going.to.leisure.by.public.transport", "going.to.leisure.by.scooter", "going.to.leisure.by.motorcycle", "going.to.leisure.by.foot", "doing.the.shopping.by.car", "doing.the.shopping.by.bike", "doing.the.shopping.by.public.transport", "doing.the.shopping.by.scooter", "going.to.leisure.by.motorcycle", "going.to.leisure.by.foot", "going.on.holidays.by.car", "going.on.holidays.by.bike", "going.on.holidays.by.public.transport", "going.on.holidays.by.scooter", "going.on.holidays.by.motorcycle", "going.on.holidays.by.feet", "travelling.generally.by.car", "travelling.generally.by.bike", "travelling.generally.by.public.transport", "travelling.generally.by.scooter", "travelling.generally.by.motorcycle", "travelling.generally.by.feet", "going.downtown.by.car", "going.downtown.by.bike", "going.downtown.by.public.transport", "going.downtown.by.scooter", "going.downtown.by.motorcycle", "going.downtown.by.feet", "you.do.not.have.any.car", "you.do.not.have.any.bike", "you.do.not.have.any.public.transport", "you.do.not.have.any.scooter", "you.do.not.have.any.motorcycle", "when.do.you.use.the.car", "when.do.you.use.the.bike", "when.do.you.use.public.transport", "when.do.you.use.the.scooter", "when.do.you.use.the.motorcycle", "when.do.you.walk", "how.often.do.you.use.the.car", "how.often.you.use.the.bike", "how.often.do.you.use.public.transport", "how.often.do.you.use.the.scooter", "how.often.do.you.use.the.motorcycle", "how.often.do.you.walk", "car.0.to.2.km", "car.2.to.5.km", "car.5.to.20.km", "car.more.than.20.km", "bike.0.to.2.km", "bike.2.to.5.km", "bike.5.to.20.km", "bike.more.than.20.km", "public.transport.0.to.2.km", "public.transport.2.to.5.km", "public.transport.5.to.20.km", "public.transport.more.than.20.km", "scooter.0.to.2.km", "scooter.2.to.5.km", "scooter.5.to.20.km", "scooter.more.than.20.km", "moto.0.to.2.km", "moto.2.to.5.km", "moto.5.to.20.km", "moto.more.than.20.km", "walk.0.to.2.km", "walk.2.to.5.km", "walk.5.to.20.km", "walk.more.than.20.km", "use.of.parking.relay.metro", "buy.with.a.car.dealer", "buy.with.a.private.individual", "buy.at.auction", "buy.with.a.private.individual.on.internet", "city.dweller", "drive.saloon.car", "drive.four.wheeler", "drive.estate.car", "drive.commercial.vehicle", "drive.sports.car", "i.do.not.want.a.car", "i.cannot.afford.a.car", "buying.gasoline", "driving.licence", "ticket.public.transport.season", "ticket.velostar.season", "ticket.fraud", "car.green", "car.bobo", "car.convenient", "car.long", "car.noisy", "car.dirty", "car.too.expensive", "car.cheap", "car.tiring", "car.dangerous", "car.healthy", "car.not.for.me", "car.polluting", "bike.green", "bike.bobo", "bike.convenient", "bike.long", "bike.noisy", "bike.dirty", "bike.too.expensive", "bike.cheap", "bike.tiring", "bike.dangerous", "bike.healthy", "bike.not.for.me", "bike.polluting", "public.transport.green", "public.transport.bobo", "public.transport.convenient", "public.transport.long", "public.transport.noisy", "public.transport.dirty", "public.transport.too.expensive", "public.transport.cheap", "public.transport.tiring", "public.transport.dangerous", "public.transport.healthy", "public.transport.not.for.me", "public.transport.polluting", "scooter.green", "scooter.bobo", "scooter.convenient", "scooter.long", "scooter.noisy", "scooter.dirty", "scooter.too.expensive", "scooter.cheap", "scooter.tiring", "scooter.dangerous", "scooter.healthy", "scooter.not.for.me", "scooter.polluting", "motorcycle.green", "motorcycle.bobo", "motorcycle.convenient", "motorcycle.long", "motorcycle.noisy", "motorcycle.dirty", "motorcycle.too.expensive", "motorcycle.cheap", "motorcycle.tiring", "motorcycle.dangerous", "motorcycle.healthy", "motorcycle.not.for.me", "motorcycle.polluting", "walking.green", "walking.bobo", "walking.convenient", "walking.long", "walking.noisy", "walking.dirty", "walking.too.expensive", "walking.cheap", "walking.tiring", "walking.dangerous", "walking.healthy", "walking.not.for.me", "walking.polluting", "brand.important", "choice.according.to.brand", "choice.according.to.price", "choice.according.to.category", "choice.according.to.fuel.consumption", "choice.according.to.carbon.gas.emissions", "choice.according.to.color", "choice.according.to.power", "choice.according.to.nb.of.km", "choice.according.to.age.of.the.car", "car.is.above.all", "politics.far.left", "politics.green", "politics.socialists", "politics.modem", "politics.ump", "politics.far.right", "politics.no.preference", "sit.on.the.fence", "eat.organic.food", "fruit.and.veg.market", "fruit.and.veg.supermarket", "fruit.and.veg.direct.sell", "fruit.and.veg.vegetable.garden", "eat.in.season.fruit.and.vegetables", "buying.a.wheeler", "buying.a.luxury.car", "buying.a.classic.or.an.estate.car", "buying.motor.cycle", "buying.scooter", "buying.a.bike", "no.needs", "carpool", "regular.sport.practice", "amator.tuning", "global.ecological.emergency", "day.to.day.environment.friendly.acts", "people.using.car.fell.guilty", "pro.carbon.tariffs")] res<-MCA(transport.MCA, ncp=5, quali.sup=96:212, graph = FALSE) #ventilation res<-MCA(transport.MCA, ncp=5, quali.sup=96:212, graph = FALSE, level.ventil = 0.05) plot.MCA(res, axes=c(1, 2), col.ind="black", col.ind.sup="blue", col.var="darkred", col.quali.sup="darkgreen", label=c("ind", "ind.sup", "quali.sup", "var"), invisible=c("")) #option to print supplementary categorical variables plot.MCA(res, axes=c(1, 2), col.ind="black", col.ind.sup="blue", col.var="darkred", col.quali.sup="darkgreen", label=c("ind", "ind.sup", "quali.sup", "var"), invisible=c("var","ind"),cex=0.7) #only individuals plot.MCA(res, axes=c(1, 2), col.ind="black", col.ind.sup="blue", col.var="darkred", col.quali.sup="darkgreen", label=c("ind", "ind.sup", "quali.sup", "var"), invisible=c("var","quali.sup"),cex=0.7) #dimensions description dimdesc(res) #Hierarchical clustering res.hcpc = HCPC(res) res.hcpc$desc.var #dynGraph dynGraph(res) #EnQuireR ENMCA(transport.MCA, quali.sup=96:212, level.ventil=0.05, report=TRUE)