hugheylab / phers

https://phers.hugheylab.org
0 stars 0 forks source link

suggested revisions to overarching phers function #42

Closed jakejh closed 2 years ago

jakejh commented 2 years ago
  1. Change name to simply phers().
  2. Remove argument diseaseIds. The same effect can be achieved by simply subsetting the diseasePhecodeMap.
  3. Add argument for weights, which is NULL by default, which means calculate weights based on provided data.
  4. Have function return a named list of phecodeOccurrences, weights, and scores.
  5. Add argument for formula for calculating residual scores, which is NULL by default. If not NULL, the scores table has an additional column resid_score.

https://github.com/hugheylab/phers/blob/b9c3189aa469568616977b7c3b42ee3752f6584d/R/phers.R#L198-L200

arefnel commented 2 years ago

shouldn't the weights argument be true/false since the only other option is to use our weights?

jakejh commented 2 years ago

I don't think so. What if someone wants to calculate scores for a few patients from their institution, and to use weights based on all patients at their institution?

arefnel commented 2 years ago

Yeah you're right! They could even have a weight file saved and load that instead of having to calculate it every time.

arefnel commented 2 years ago

61633729b5a8c75c8f8ea2b3fb66a1f8fdadf721