Learn R Programming

multicon (version 1.6)

cor.comb.rep: Replicabilities and Correlations

Description

A function for getting the replicabilities for cor.comb() correlations See cor.comb() and vector.splithalf() for more information.

Usage

cor.comb.rep(x1, x2, x3, x4, set1, set2, set3, set4, sims = 100, CI = 0.95)

Arguments

x1
vector paired with set1
x2
vector paired with set2
x3
vector paired with set3
x4
vector paired with set4
set1
matrix paired with x1
set2
matrix paired with x2
set3
matrix paired with x3
set4
matrix paired with x 4
sims
Number of simulations to be run in the randomization test (100 by default).
CI
Desired confidence interval limits. Default is .95.

Value

N
The sample size. *See 'note'
Rep
Estimated replicability
SE
Standard Error of the estimated replicability
UL
Upper limit of the CI
LL
Lower limit of the CI

See Also

cor.comb vector.splithalf

Examples

Run this code
data(RSPdata)
names(RSPdata)
	#Computing the relationship between self reported extraversion and 
	#Behavior measured by RBQ1 "Interviews others"over 4 situations 
data(rbqv3.items)
rbqv3.items # the RBQ content
	 # The correlations between extraversion and RBQ001 in Situation 1 
cor(RSPdata$sEXT,RSPdata$v2rbq001)
cor(RSPdata$sEXT,RSPdata$v3rbq001) # ... Situation 2 
cor(RSPdata$sEXT,RSPdata$v4rbq001) # ... Situation 3
cor(RSPdata$sEXT,RSPdata$v5rbq001) # ... Situation 4 
	#now to use cor.comb to combine meta-analytically
cor.comb(y1=RSPdata$sEXT,y2=RSPdata$sEXT,y3=RSPdata$sEXT,y4=RSPdata$sEXT,
         x1=RSPdata$v2rbq001,x2=RSPdata$v3rbq001,x3=RSPdata$v4rbq001,x4=RSPdata$v5rbq001)
#now to test the replicability of these results
data(v2rbq)
data(v3rbq)
data(v4rbq)
data(v5rbq)

# Note in practice sims = 100 or more might be preferred
cor.comb.rep(x1=RSPdata$sEXT,x2=RSPdata$sEXT,x3=RSPdata$sEXT,
	x4=RSPdata$sEXT,set1=v2rbq,set2=v3rbq,set3=v4rbq,set4=v5rbq, sims=5) 
 

Run the code above in your browser using DataLab