Hi all,
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 :
completetable1<- completetable[as.numeric(completetable$SalesInThousands)<99.65,]
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.
Thanks
snandy2011
Tags:
© 2021 TechTarget, Inc.
Powered by
Badges | Report an Issue | Privacy Policy | Terms of Service
Most Popular Content on DSC
To not miss this type of content in the future, subscribe to our newsletter.
Other popular resources
Archives: 2008-2014 | 2015-2016 | 2017-2019 | Book 1 | Book 2 | More
Most popular articles