Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rgr.OLS

Random Group Resampling OLS Regression


Description

This function uses Random Group Resampling (RGR) within an Ordinary Least Square (OLS) framework to allow one to contrast actual group results with pseudo group results. The number of columns in the output matrix of the function (OUT) has to correspond to the number of mean squares you want in the output which in turn is a function of the number of predictors. This specific function does RGR on an OLS hierarchical OLS model with two predictors as in Bliese & Halverson (2002). To run this analysis on data with more predictors, the function will have to be modified.

Usage

rgr.OLS(xdat1,xdat2,ydata,grpid,nreps)

Arguments

xdat1

The first predictor.

xdat2

The second predictor.

ydata

The outcome.

grpid

The group identifier.

nreps

The number of pseudo groups to create.

Value

A matrix containing mean squares. Each row provides mean square values for a single pseudo group iteration

Author(s)

References

Bliese, P. D., & Halverson, R. R. (2002). Using random group resampling in multilevel research. Leadership Quarterly, 13, 53-68.

See Also

Examples

data(lq2002)
RGROUT<-rgr.OLS(lq2002$LEAD,lq2002$TSIG,lq2002$HOSTILE,lq2002$COMPID,100)

#Compare values to those reported on p.62 in Bliese & Halverson (2002)
summary(RGROUT)

multilevel

Multilevel Functions

v2.6
GPL (>= 2)
Authors
Paul Bliese
Initial release
2016-07-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.