I am using Hmisc package for imputing the missing value. At first, I have converted all my dummy variables into factor. Then I am using aregimpute function from the HMisc package. I have written following code:
impute_miss <- aregImpute(~ MarketID + MarketSize + LocationID + AgeOfStore + Promotion+ week+SalesInThousands , data =table.miss, n.impute = 5) impute_miss
Then, I have completed the datasets by
impute.transcan function. I have written following code for that
completetable <- impute.transcan(impute_miss, imputation=1, data=table.miss,list.out=TRUE,pr=FALSE, check=FALSE) head(completetable)
Now i am checking the outlier via boxplot.
bp <- boxplot(as.numeric(completetable$SalesInThousands)) bp$out
still ow, It works fine.
But, after that, when i am going to remove the outlier by filtering, It shows me error.
i am using following code for that :
It is showing me the below error,
Error in completetable[as.numeric(completetable$SalesInThousands) < 99.65, : incorrect number of dimensions
I have tried a lot to solve this problem, but failed to recover. Can you please identify what wrong i have done?
Please help me to solve this problem.
Any suggestion is really appreciable.