[R] Help R
Jose Iparraguirre
Jose.Iparraguirre at ageuk.org.uk
Mon Jul 29 11:20:23 CEST 2013
Hola Maria Teresa,
For multiple imputation, I would suggest the Amelia package by Gary King, James Honaker, and Matthew Blackwell, which uses the expectation-maximisation (EM) algorithm with bootstrap. Its excellent vignette has examples which should be more than enough for your needs. Do read very carefully the imputation-improving transformation section to deal with ordinal, nominal, etc., variables.
With regards to which variables to select, this goes beyond this R-help group, but the package vignette provides you with this short answer:
"It is crucial to include at least as much information as will be used in the analysis model. That is, any variable that will be in the analysis model should also be in the imputation model. This includes any transformations or interactions of variables that will appear in the analysis model.
In fact, it is often useful to add more information to the imputation model than will be present when the analysis is run. Since imputation is predictive, any variables that would increase predictive power should be included in the model, even if including them in the analysis model would produce bias in estimating a causal effect (such as for post-treatment variables) or collinearity would preclude determining which variable had a relationship with the dependent variable (such as including multiple alternate measures of GDP)."
Hope this helps!
José
Prof. José Iparraguirre
Chief Economist
Age UK
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Mª Teresa Martinez Soriano
Sent: 26 July 2013 09:36
To: r-help at r-project.org
Subject: [R] Help R
Hi to everyone, first of all thanks for this service, it is being very useful for me, thanks in
advance.
I am new in R, so I suppose I could make really naive questions, I'm sorry.
I have to impute some missing values and I am trying to do it with VIM library trough Hot Deck
imputation.
I writte:vmGUImenu(), and it opens a small window of: Visualization and Imputation of Missing Values
and I select Imptation and Hot Deck and then one of the variables which I have to select is Select
Variables to Build Domains.
I don't know which variables I have to select, I don't understand this. I have tried don't put
anything and I get :
hotdeck(dataframe,variable=c("CRV.IE.2005","CRV.IE.2006","CRV.IE.2007","CRV.IE.2008","CRV.IE.2009","CR
V.IE.2010"),ord_var=c("CRV.IE.2001","CRV.IE.2002","CRV.IE.2003","CRV.IE.2004","CRV.IE.2005","CRV.IE.20
06","CRV.IE.2007","CRV.IE.2008","CRV.IE.2009","CRV.IE.2010"),domain_var=NULL,imp_suffix="_imp")
Mensajes de aviso perdido:
In hotdeck(data, variable = vars, ord_var = sort, domain_var = domain,
Some NAs remained, maybe due to a too restrictive domain building!?
In hotdeck(b, variable = c("CRV.IE.2005", "CRV.IE.2006", "CRV.IE.2007", Some NAs remained, maybe due
to a too restrictive domain building!?
What should I put in this variable??
Thanks in advance
Best regards
Teresa
[[alternative HTML version deleted]]
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
The Wireless from Age UK | Radio for grown-ups.
www.ageuk.org.uk/thewireless
If you’re looking for a radio station that offers real variety, tune in to The Wireless from Age UK.
Whether you choose to listen through the website at www.ageuk.org.uk/thewireless, on digital radio (currently available in London and Yorkshire) or through our TuneIn Radio app, you can look forward to an inspiring mix of music, conversation and useful information 24 hours a day.
-------------------------------
Age UK is a registered charity and company limited by guarantee, (registered charity number 1128267, registered company number 6825798).
Registered office: Tavis House, 1-6 Tavistock Square, London WC1H 9NA.
For the purposes of promoting Age UK Insurance, Age UK is an Appointed Representative of Age UK Enterprises Limited, Age UK is an Introducer
Appointed Representative of JLT Benefit Solutions Limited and Simplyhealth Access for the purposes of introducing potential annuity and health
cash plans customers respectively. Age UK Enterprises Limited, JLT Benefit Solutions Limited and Simplyhealth Access are all authorised and
regulated by the Financial Services Authority.
------------------------------
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are
addressed. If you receive a message in error, please advise the sender and delete immediately.
Except where this email is sent in the usual course of our business, any opinions expressed in this email are those of the author and do not
necessarily reflect the opinions of Age UK or its subsidiaries and associated companies. Age UK monitors all e-mail transmissions passing
through its network and may block or modify mails which are deemed to be unsuitable.
Age Concern England (charity number 261794) and Help the Aged (charity number 272786) and their trading and other associated companies merged
on 1st April 2009. Together they have formed the Age UK Group, dedicated to improving the lives of people in later life. The three national
Age Concerns in Scotland, Northern Ireland and Wales have also merged with Help the Aged in these nations to form three registered charities:
Age Scotland, Age NI, Age Cymru.
More information about the R-help
mailing list