corr_p_cell: Correlation Cell FUN

Description Usage Arguments Author(s) Examples

View source: R/corr_p_cell.R

Description

To calculating Pearson product-moment correlation coefficient.

Usage

1
2
       corr_p_cell(x, y, z, w, cell_ids, row_ids, col_ids, vnames, vars, n_min,
       digits = 3)

Arguments

x

The x variable

y

The y variable

z

NOT USED

w

Weights for x and y variable.

cell_ids

Index vector for selecting values in cell.

row_ids

NOT USED

col_ids

NOT USED

vnames

NOT USED

vars

NOT USED

n_min

Minimum n in the cell for useful calculation. Cells with n<n_min deliver no output.

digits

Integer indicating the number of decimal places.

Author(s)

ADES <[email protected]>

Examples

1
2
3
4
5
6
7
8
sex     <- factor(rbinom(1000, 1, 0.4),  labels=c('Men', 'Women'))
height  <- rnorm(1000, mean=1.70, sd=0.1)
weight  <- rnorm(1000, mean=70, sd=5)
bmi     <- weight/height^2
d<-data.frame(sex, bmi, height, weight)
tabular.ade(x_vars=c('bmi','height','weight'), xname=c('BMI','Height','Weight'),
            y_vars=c('bmi','height','weight'), yname=c('BMI','Height','Weight'),
            rows=c('sex','ALL'), rnames=c('Gender'), data=d, FUN=corr_p_cell)

etable documentation built on May 29, 2017, 9:45 a.m.