knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
r package for dyadic data analysis
An R package for assisting people in dyadic data analysis. Contains functions to organize output from the gls
and lme
functions from the nlme
package for cross-sectional data. Some functionality exists with the lme4
package. Improves user understanding of the Actor-Partner Independence Model by organizing actor and parter effects for the purpose of comparing parameters to each other.
# install.packages("devtools") devtools::install_github("RandiLGarcia/dyadr")
Here is an example of how to use some of the dyadr
functions.
First, load the package and get data:
library(nlme) library(dyadr)
Using the smallsummary
function
apim <- gls(Satisfaction_A ~ Tension_A + SelfPos_P, na.action = na.omit, correlation = corCompSymm(form = ~ 1 | CoupleID), data = acipair ) smallsummary(apim)
Using the crsp
function
# Empty Model apimie <- summary(gls(Satisfaction_A ~ 1, na.action = na.omit, correlation = corCompSymm(form = ~ 1 | CoupleID), data = acipair )) # sd of errors for the model or esd esd <- as.numeric(apim[6]) # sd of errors for the empty model or esd0 esd0 <- as.numeric(apimie[6]) # the R squared, using the crsp function crsp(esd, esd0)
Feel free to submit pull requests resolving documented issues.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.