PROPs: Proportions

Description Usage Arguments Author(s) See Also Examples

View source: R/PROPs.R

Description

The functions returns the proportion of ones in the dummy variables existing in a matrix.

Usage

1
PROPs(X, dummy = T, pos = NULL)

Arguments

X

A numeric matrix that should contain more than one regressor (intercept included).

dummy

A logical value that indicates if there are dummy variables in the matrix X. By default dummy=T.

pos

A numeric vector that indicates the position of the dummy variables, if these exist, in the matrix X. By default pos=NULL.

Author(s)

R. Salmer<f3>n (romansg@ugr.es) and C. Garc<ed>a (cbgarcia@ugr.es).

See Also

multiCol.

Examples

1
2
3
4
5
6
7
8
# random
x1 = sample(1:50, 25)
x2 = sample(1:50, 25)
x3 = sample(cbind(array(1,25), array(0,25)), 25)
x4 = sample(cbind(array(1,25), array(0,25)), 25)
x = cbind(x1, x2, x3, x4)
head(x)
PROPs(x, TRUE, pos = c(3,4))

multiColl documentation built on May 2, 2019, 4:53 p.m.