[R] code to run a simulation

2018-07-06 Thread Adam Z. Jabir
Hi Guys, I am doing some imputation for my dataset. I am looking for code to do simulation before choosing the right package (mice, Knn). Does anyone have some code that can do the following: 1. introduce some missing rate into the data 2. Apply the two imputaion methods 3. Compute

[R] command to change some vars to missing into my dataset

2018-07-05 Thread Adam Z. Jabir
Hi, I want to simulate missing at random for my dataset. Do you know an easy way to do it? I want to try not to have the missing�s for the same observations. I mean if one observation is been selected randomly to have missing I don�t want to have all the var of the same obs missing. I want

[R] R is creating a new level which is emty after importing a SAS file

2018-07-04 Thread Adam Z. Jabir
Hi, I have imported some sasdata into R using the sas7bdat package. I have some nominal variables with some missing values. R is creating a new level which is emty ��.When I ask for tabulate this new level is presented with 0 as a frequency. I want to get rid of this level and have my file