xpssMeans: Simple descriptive statistics

Description Usage Arguments Details Author(s) Examples

View source: R/xpssMeans.R

Description

R Implementation of the SPSS Function MEANS.

Usage

1
2
xpssMeans(x, variables = NULL, by = NULL, missing = NULL,
  cells = "default", statistics = NULL)

Arguments

x

a (non-empty) data.frame or input data of class "xpssFrame".

variables

atomic character or character vector with the name of the variables.

by

atomic character or character vector with the name of the variables.

missing

atomic numeric with the name of the missing method. Default is NULL. Optionally table,dependent or include can be chosen. See note for more.

cells

specifies descriptiv statistics for the results. Default is mean, stddev and n. See notes for more.

statistics

specifies a anova or linearity test for each result. Default is NULL. Optionally anova can be chosen.

Details

The xpssMeans function displays by default the mean, standard deviation and the amount of observations for a numeric dependent variable. and group counts for a string variable within groups defined by one or more control (independent) variables. Other procedures that display univariate statistics are SUMMARIZE, FREQUENCIES, and DESCRIPTIVES.

missing:

table Deletes cases tablewise.
include Include user-missing values.
dependent Exclude user-missing values for dependent variables only.

statistics:

anova calculates sumsquare, degrees of freedom, meansquare, f-value and significance level.

cells:

all calculates all following descriptiv functions.
count displays the amount of observations.
first displays the first observation.
geometric displays the geometric mean
harmonic displays the harmonic mean
kurt calculates the bulge of the variable.
last displays the last observation.
max displays the maximum of the variable.
mean calculates the arithmetic mean, respectively the midpoint of the variable.
median calculates the median of the variable.
min displays the minimum of the variable.
range displays the span between the minimum and the maximum value.
sekurtosis calculates the standrard error of the bulge of the variable.
semean displays the standard error of the arithmetic mean.
seskewness calculates the standrard error of the inclination of the variable.
skew calculates the inclination of the variable.
stddev displays the standard deviation of the variable.
sum calculates the sum of each observation within the variable.
variance displays the variance.

Author(s)

Bastian Wiessner

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# mean of variable V3
xpssMeans(x=fromXPSS,variables="V3")

# mean of variable V3 and V4
xpssMeans(x=fromXPSS,variables=c("V3","V4"))

# mean of variable V3 and V6 by V4
xpssMeans(x=fromXPSS,variables=c("V3","V6"),by="V4")

# Filtering by V4 and calculate Mean of Variable V6 by V3 and V6_kl3
fromXPSS <- xpssFilter(x=fromXPSS,variable="V4",filtervalue=1)
xpssMeans(x=fromXPSS,variables="V6",by=c("V3","V6_kl3"))
fromXPSS <- xpssFilterOff(fromXPSS)

translateSPSS2R documentation built on May 30, 2017, 4:31 a.m.