Hello everyone,
I need to your help as I am new to this package and I am not sure how to solve it. I am following the tutorial in here,
My data set has the following types:
names(traindata)
[1] "click" "send" "open" "date" "cityid" "cityname" "announcerid"
[8] "announcername" "price" "discount" "discountconcept" "newsletterposition" "insubject" "countrycode"
[15] "category"
str(traindata)
'data.frame': 136248 obs. of 15 variables:
$ click : int 2377 2377 2117 2117 1798 1798 1736 1736 1730 1730 ...
$ send : int 330528 330528 613162 613162 398962 398962 431543 431543 591474 591474 ...
$ open : int 91800 91800 115215 115215 126315 126315 94315 94315 114725 114725 ...
$ date : Date, format: "2017-04-02" "2017-04-02" "2017-04-19" "2017-04-19" ...
$ cityid : Factor w/ 259 levels " 1"," 2",..: 139 139 167 167 140 140 167 167 140 140 ...
$ cityname : Factor w/ 251 levels "A Coru\314\261a",..: 249 249 160 160 249 249 160 160 249 249 ...
$ announcerid : Factor w/ 668 levels " 10"," 29",..: 133 133 231 231 148 148 249 249 163 163 ...
$ announcername : Factor w/ 667 levels "1 Click Health Insurance",..: 433 433 47 47 304 304 617 617 333 333 ...
$ price : num 15 15 99 99 0 ...
$ discount : num 0 0 0 0 76 76 0 0 0 0 ...
$ discountconcept : num [1:136248, 1] 15 15 99 99 -76 ...
..- attr(*, "dimnames")=List of 2
.. ..$ : NULL
.. ..$ : chr "discountconcept"
$ newsletterposition: Factor w/ 27 levels " 0"," 1"," 2",..: 3 3 1 1 1 1 2 2 2 2 ...
$ insubject : Factor w/ 2 levels "no","yes": 2 2 1 1 1 1 1 1 1 1 ...
$ countrycode : Factor w/ 9 levels "au","be","bn",..: 6 6 9 9 4 4 9 9 4 4 ...
$ category : Factor w/ 20 levels "","activities",..: 20 1 20 1 4 1 19 1 19 1 …
My predictive variable is click, I have to understand what are the most important attributes in order to increase the click. I use
FAMD (base, ncp = 5, graph = TRUE, sup.var = NULL,
ind.sup = NULL, axes = c(1,2), row.w = NULL, tab.comp = NULL)
res <- FAMD(traindata, ind.sup = c(1:3,9:11), sup.var = c(5:8,12:15)) ,
Even I am not sure if I am wrong or not. I am really confused. I am getting following error but I don't know how to solve it. I need your advise.
> res <- FAMD(traindata, ind.sup = c(1:3,9:11), sup.var = c(5:8,12:15))
Error in aggregate.data.frame(as.data.frame(x), ...) :
arguments must have same length
In addition: Warning message:
In coord.quali.var^2/dist2 :
longer object length is not a multiple of shorter object length
Is there any body that can help me how to resolve my issue?
Thank you very much for your help