martinctc / rwa

Package for running Relative Weights Analysis in R
https://martinctc.github.io/rwa
12 stars 8 forks source link

weights and missings #12

Open SietseDost opened 2 years ago

SietseDost commented 2 years ago

Hi Martin, love the package, but I have 2 questions:

  1. Is it possible to run the analysis with a separate weight variable?
  2. If I'm correct the analysis is standard with listwise deletion of missings. is it also possible to run it with pairwise deletion? Thanks!
jeppelsh commented 2 years ago

Hello Martin! I find @SietseDost's first feature also very helpful when weighting the answers of a survey so that they correspond to the total population. Thanks a lot in advance!

martinctc commented 9 months ago

Hi @SietseDost - currently we don't have any capability in rwa to support a separate weight variable. @stonid - do you by any chance have an implementation of this available, so we can look at including this in the package?

With your second question @SietseDost, this is also not available but I can include this as a feature in #6 or #7. The plan is to export the parameter for use in cor() here, in rwa():

  cor_matrix <-
    cor(thedata, use = "pairwise.complete.obs") %>%
    as.data.frame(stringsAsFactors = FALSE, row.names = NULL) %>%
    remove_all_na_cols() %>%
    tidyr::drop_na()
stonid commented 9 months ago

@SietseDost @martinctc Unfortunately, I don't have an implementation for weighting. The missing data option should be relatively easy to implement as a new feature as Martin noted.

SietseDost commented 8 months ago

Thanks @martinctc! Let me know when the pairwise deletion feature is available. And of course also if one day adding a weight variable is possible;-)