avvikelse: Calculate deviation (avvikelse) for each hospital using a...

View source: R/avvikelse.R

avvikelseR Documentation

Calculate deviation (avvikelse) for each hospital using a linear model

Description

Calculates number of patients, preoperative values, postoperative values, and devation for each hospital. Used to make some tables in the annual report.

Usage

avvikelse(prom_dat, out, preop = NULL, postop, decimals = 2)

Arguments

prom_dat

PROM-data frame.

out

Linear model outcome variable. Use string.

preop

Preoperative variable. Use string.

postop

Postoperative variable. Use string.

decimals

Number of decimals.

Details

The following variables MUST be included in the data set to be able to use the function (used to calculate deviation):

"PREP_HipPain", "PREP_VASHealth", "PREP_EQ5D3Lindex", "eq10", "eq20", "eq30", "eq40", "eq50" "P_DiaGrp", "P_Gender", "P_Age", "PREP_Charnley"

where "eq10", "eq20", "eq30", "eq40" and "eq50" are the five numbers extracted using eq5d_3l.

Value

Data frame including hospitals, number of patients, preoperative values (if preop not NULL), postoperative values, and devation.


swehip/shprplotfun documentation built on Oct. 21, 2022, 8:26 a.m.