Learn R Programming

linea (version 0.1.1)

apply_normalisation: apply_normalisation

Description

Normalise data based on pool mean

Usage

apply_normalisation(
  raw_data = NULL,
  pool_var = NULL,
  dv = NULL,
  verbose = FALSE
)

Value

list containing a tibble of normalised data and a tibble of pool means

Arguments

raw_data

data.frame containing data for analysis

pool_var

string specifying the pool variable name (e.g. 'country')

dv

string specifying the dependent variable name

verbose

A boolean to specify whether to print warnings

Details

Normalise data by dividing all values in each pool by that pool's mean

Examples

Run this code
pooled_data = read_xcsv(
 verbose = FALSE,
 file = "https://raw.githubusercontent.com/paladinic/data/main/pooled%20data.csv")

norm_data = apply_normalisation(
 raw_data = pooled_data,
 pool_var = 'country',
 dv = 'amazon')

Run the code above in your browser using DataLab