## 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.3657, df = 18, p-value = 0.003443
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2468639 0.8345044
## sample estimates:
##       cor 
## 0.6214914




## 
##  Pearson's product-moment correlation
## 
## data:  rai$rai_pat and rai$rai_pro
## t = 3.3657, df = 18, p-value = 0.003443
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2468639 0.8345044
## sample estimates:
##       cor 
## 0.6214914
##  Patient score greater Provider score greater            Same scores 
##                     10                      2                      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



60% (or 12/20) had the same grouping

40% (or 8/20) had a higher patient grouping

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





Individual questions



##                 pctg_match            Question
## rai_pctg         0.4117647           RAI total
## rai_cancer_pctg  0.0000000 RAI total w/ cancer
## dep_liv_pctg     1.0000000    Dependent Living
## kidney_pctg      1.0000000      Kidney failure
## hf_pctg          0.8823529       Heart failure
## sob_pctg         1.0000000 Shortness of breath
## cancer_pctg      0.8823529              Cancer
## wt_loss_pctg     0.7647059         Lost weight
## appetite_pctg    0.8823529    Loss of appetite
## memory_pctg      0.7647059              Memory
## adl_cog_pctg     0.5882353     ADL*Cog decline
## get_ar_pctg      0.8235294      Getting around
## eating_pctg      0.9411765              Eating
## toilet_pctg      0.8823529           Toileting
## hygiene_pctg     0.8823529             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 11 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 13 3
Yes 1 0



Medical history



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

Patient score
No
No 17



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

Patient score
No Yes
No 15 1



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

Patient score
No Yes
No 14 1
Yes 1 1



ADLs



Toileting ADL

##    
##      1  2
##   1 15  2

1 = Can use toilet without help

2 = Needs help getting to or from toilet



Hygiene ADL

##    
##      1  3  4
##   1 15  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 = 1.7497, df = 18, p-value = 0.09719
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.07368897  0.70486260
## sample estimates:
##       cor 
## 0.3812644



Time between exams vs. specific questions



## # A tibble: 2 × 7
##   clinical_to_pat kidney_pat kidney_pro hf_pat hf_pro cancer_pat cancer_pro
##             <dbl>      <dbl>      <dbl>  <dbl>  <dbl>      <dbl>      <dbl>
## 1             118          0          0      1      0          1          0
## 2              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 = 1.7849, df = 16, p-value = 0.09325
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.07333265  0.73460438
## sample estimates:
##       cor 
## 0.4074885
## 
##  Pearson's product-moment correlation
## 
## data:  rai_can$rai_pro and rai_can$CAN
## t = 0.2907, df = 16, p-value = 0.775
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.4082005  0.5216989
## sample estimates:
##        cor 
## 0.07248322





JEN-FI analysis


## 
##  Pearson's product-moment correlation
## 
## data:  rai_jenfi$rai_pat and rai_jenfi$JENFI
## t = 1.366, df = 17, p-value = 0.1897
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1629918  0.6726260
## sample estimates:
##       cor 
## 0.3145007
## 
##  Pearson's product-moment correlation
## 
## data:  rai_jenfi$rai_pro and rai_jenfi$JENFI
## t = 1.4077, df = 17, p-value = 0.1772
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1536463  0.6778411
## sample estimates:
##       cor 
## 0.3231122



CAN vs. JEN-FI


## 
##  Pearson's product-moment correlation
## 
## data:  rai_jenfi_can$CAN and rai_jenfi_can$JENFI
## t = 1.5422, df = 16, p-value = 0.1426
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1287643  0.7077384
## sample estimates:
##       cor 
## 0.3597315








Loss of appetite

Patient score
0 1
0 15 1



Getting around ADL

##    
##     1 2 4
##   1 6 1 0
##   2 1 8 1



Eating ADL

##    
##      1  3
##   1 15  1
##   3  0  1