## Warning: package 'forcats' was built under R version 4.4.2
## Warning: package 'lpSolve' was built under R version 4.4.2

Correlation and matching


## `geom_smooth()` using formula = 'y ~ x'




## 
##  Pearson's product-moment correlation
## 
## data:  rai$rai_pat and rai$rai_pro
## t = 3.4432, df = 19, p-value = 0.002725
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2569248 0.8295679
## sample estimates:
##      cor 
## 0.619862
##  Patient score greater Provider score greater            Same scores 
##                     10                      3                      8
## 
##  Pearson's product-moment correlation
## 
## data:  datum$one and datum$two
## t = Inf, df = 3, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  1 1
## sample estimates:
## cor 
##   1




Patient score
< 30 30-36 37+
< 30 11 6 0
30-36 0 1 2
37+ 0 0 1



61.9% (or 13/21) had the same grouping

38.1% (or 8/21) had a higher patient grouping

0% (or 0/21) had a higher provider grouping





Individual questions



##                 pctg_match            Question
## rai_pctg         0.3888889           RAI total
## rai_cancer_pctg  0.0000000 RAI total w/ cancer
## dep_liv_pctg     1.0000000    Dependent Living
## kidney_pctg      0.9444444      Kidney failure
## hf_pctg          0.8888889       Heart failure
## sob_pctg         0.9444444 Shortness of breath
## cancer_pctg      0.8888889              Cancer
## wt_loss_pctg     0.7777778         Lost weight
## appetite_pctg    0.8888889    Loss of appetite
## memory_pctg      0.7777778              Memory
## adl_cog_pctg     0.6111111     ADL*Cog decline
## get_ar_pctg      0.8333333      Getting around
## eating_pctg      0.9444444              Eating
## toilet_pctg      0.8888889           Toileting
## hygiene_pctg     0.8888889             Hygiene

More subjective questions?



During the last 3 months has it become difficult for you to remember things or organize your thoughts?

Patient score
No Yes
No 12 2
Yes 1 2


Have you lost weight of 10 pounds or more in the past 3 months without trying?

Patient score
No Yes
No 14 3
Yes 1 0



Medical history



Any kidney failure, kidney not working well, or seeing a kidney doctor (nephrologist)?

Patient score
No
No 17
Yes 1



Any history of chronic (long-term) congestive heart failure (CHF)?

Patient score
No Yes
No 15 1
Yes 0 1



In the past five years, have you been diagnosed with or treated for cancer?

Patient score
No Yes
No 15 1
Yes 1 1



ADLs



Toileting ADL

##    
##      1  2
##   1 16  2

1 = Can use toilet without help

2 = Needs help getting to or from toilet



Hygiene ADL

##    
##      1  3  4
##   1 16  1  1
##   X  3  0  0

1 = Can shower of bathe without prompt or help

3 = Needs helps preparing the tub or shower

4 = Needs some help with some elements of washing





Considering time between exams



## `geom_smooth()` using formula = 'y ~ x'

## `geom_smooth()` using formula = 'y ~ x'

## 
##  Pearson's product-moment correlation
## 
## data:  rai$rai_difference_abs and rai$clinical_to_pat
## t = 3.6404, df = 19, p-value = 0.001741
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2894092 0.8402012
## sample estimates:
##       cor 
## 0.6410117



Time between exams vs. specific questions



## # A tibble: 3 × 7
##   clinical_to_pat kidney_pat kidney_pro hf_pat hf_pro cancer_pat cancer_pro
##             <dbl>      <dbl>      <dbl>  <dbl>  <dbl>      <dbl>      <dbl>
## 1             261          0          1      1      1          0          0
## 2             118          0          0      1      0          1          0
## 3              76          0          0      0      0          0          1



## # A tibble: 7 × 6
##   id    clinical_to_pat wt_loss_pat wt_loss_pro memory_pat memory_pro
##   <fct>           <dbl>       <dbl>       <dbl>      <dbl>      <dbl>
## 1 46                 29           0           0          1          0
## 2 43                 36           0           0          1          0
## 3 28                 65           1           0          1          1
## 4 26                 76           1           0          0          0
## 5 24                 86           0           0          0          1
## 6 32                106           1           0          0          0
## 7 18                111           0           1          0          0





CAN analysis


## 
##  Pearson's product-moment correlation
## 
## data:  rai_can$rai_pat and rai_can$CAN
## t = 2.2319, df = 17, p-value = 0.03937
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.02786753 0.76487409
## sample estimates:
##       cor 
## 0.4760511
## 
##  Pearson's product-moment correlation
## 
## data:  rai_can$rai_pro and rai_can$CAN
## t = 1.1902, df = 17, p-value = 0.2503
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2023557  0.6497087
## sample estimates:
##       cor 
## 0.2773449





JEN-FI analysis


## 
##  Pearson's product-moment correlation
## 
## data:  rai_jenfi$rai_pat and rai_jenfi$JENFI
## t = 1.7645, df = 18, p-value = 0.09461
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.07049185  0.70647603
## sample estimates:
##       cor 
## 0.3840077
## 
##  Pearson's product-moment correlation
## 
## data:  rai_jenfi$rai_pro and rai_jenfi$JENFI
## t = 1.6927, df = 18, p-value = 0.1077
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.08605886  0.69854329
## sample estimates:
##       cor 
## 0.3705745



CAN vs. JEN-FI


## 
##  Pearson's product-moment correlation
## 
## data:  rai_jenfi_can$CAN and rai_jenfi_can$JENFI
## t = 1.8752, df = 17, p-value = 0.07804
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.04951559  0.73079239
## sample estimates:
##       cor 
## 0.4140048








Loss of appetite

Patient score
0 1
0 16 1



Getting around ADL

##    
##     1 2 4
##   1 6 1 0
##   2 1 9 1



Eating ADL

##    
##      1  3
##   1 16  1
##   3  0  1