plot_missings: Plot missing values

Description Usage Arguments Examples

View source: R/plots.R

Description

This function plots missing values in the round robin matrix for visual inspection.

Usage

1
plot_missings(formule, data, show.ids=TRUE)

Arguments

formule

A formula specifying the variable names. Example usage: DV ~ perceiver.id*target.id | group.id (group.id only necessary in multi group data sets)

data

The data frame

show.ids

Should the id's of the persons be printed on the axes?

Examples

1
2
3
4
5
6
7
data(multiGroup)
m2 <- multiGroup
m2$ex[m2$perceiver.id==90201] <- NA
m2$ex[m2$perceiver.id>92001] <- NA
m2$ex[sample(nrow(m2),  1000)] <- NA
plot_missings(ex~perceiver.id*target.id|group.id, data=m2)
(RR1m <- RR(ex~perceiver.id*target.id|group.id, data=m2, na.rm=TRUE))

Example output

Loading required package: ggplot2
Round-Robin object ('RR'), calculated by TripleR
------------------------------------------------
Univariate analysis of one round robin variable in multiple groups (significance test based on Lashley & Bond, 1997, Psychological Methods)

Univariate analyses for: ex 
---------
Group descriptives: n =  9 ; average group size =  21.67 ; range:  18 - 24 
                         estimate standardized    se t.value p.value
actor variance              0.223        0.129 0.027   8.336   0.000
partner variance            0.733        0.424 0.081   9.029   0.000
relationship variance       0.774        0.447 0.018  42.629   0.000
error variance                 NA           NA    NA      NA      NA
actor-partner covariance   -0.020       -0.051 0.033  -0.629   0.530
relationship covariance     0.042        0.054 0.018   2.291   0.023
Actor effect reliability: .855 
Partner effect reliability: .951 
NULL


Partial correlations with self ratings (controlled for group membership):
                                r    t     df      p   
self rating with Actor effect   .308 3.975 151.000 .000
self rating with Partner effect .594 9.066 151.000 .000


There were 15 warnings (use warnings() to see them)

TripleR documentation built on May 30, 2017, 4:19 a.m.