Learn R Programming

reproducer (version 0.4.2)

calculateBasicStatistics: calculateBasicStatistics

Description

This function calculates the following statistcs for a set of data: length, mean, median, variance, standard error of the mean, and confidence interval bounds. The input data must be a vector of 2 or more numerical values.

Usage

calculateBasicStatistics(x, alpha = 0.05)

Value

A dataframe comprising the length, mean, variance, standard error and confidence limit bounds of the input data x.

Arguments

x

The data to be summarized

alpha

The probability level to be used when constructing the confidence interval bounds.

Author

Barbara Kitchenham and Lech Madeyski

Examples

Run this code
ShortExperimentNames=c("E1","E2","E3","E4")
FullExperimentNames=c("EUBAS","R1UCLM","R2UCLM","R3UCLM")
Metrics=c("Comprehension","Modification")
Groups=c("A","B","C","D")
Type=c(rep("4G",4))
StudyID="S2"
Control="SC"
ReshapedData=ExtractExperimentData(KitchenhamEtAl.CorrelationsAmongParticipants.Scanniello14TOSEM
,ExperimentNames=FullExperimentNames, idvar="ParticipantID",timevar="Period",ConvertToWide=TRUE)
NewTable= ConstructLevel1ExperimentRData(ReshapedData,StudyID,ShortExperimentNames,Groups,
Metrics,Type,Control)
calculateBasicStatistics(NewTable$r)
 #    N    Mean Median Variance      SE LowerBound UpperBound
 # 1 32 0.06175 0.1688   0.2482 0.08808    -0.1109     0.2344

Run the code above in your browser using DataLab