
A Function That Writes, Saves, and Exports Syntax for Fitting Observed Actor-Partner Interdependence Models
Source:R/scriptObsAPIM.R
scriptObsAPIM.RdA Function That Writes, Saves, and Exports Syntax for Fitting Observed Actor-Partner Interdependence Models
Usage
scriptObsAPIM(
X1 = NULL,
Y1 = NULL,
X2 = NULL,
Y2 = NULL,
equate = "none",
k = FALSE,
writeTo = NULL,
fileName = NULL
)Arguments
- X1
character of vector name containing X variable/composite for partner 1
- Y1
character of vector name containing Y variable/composite for partner 1
- X2
character of vector name containing X variable/composite for partner 2
- Y2
character of vector name containing Y variable/composite for partner 2
- equate
character of what parameter(s) to constrain ("actor", "partner", "all"); default is "none" (all freely estimated)
- k
input logical for whether Kenny & Ledermann's (2010) k parameter should be calculated to characterize the dyadic pattern in the APIM. Default to FALSE
- writeTo
A character string specifying a directory path to where the output file(s) should be saved. If set to
".", the file(s) will be written to the current working directory. The default isNULL, and examples use a temporary directory created bytempdir(). When dealing with tabular output,writeTois only relevant ifgtTab = TRUE.- fileName
A character string specifying a desired base name for the output file. The default is
NULL. The specified name will be automatically appended with the appropriate file extension (e.g.,.txtforlavaanscripts,.rtffor tabular output whengtTab = TRUE, or other extensions as appropriate for the output type). If a file with the same name already exists in the user's chosen directory, it will be overwritten.
Examples
obsAPIMScript <- scriptObsAPIM (X1 = "SexSatA", Y1 = "RelSatA",
X2 = "SexSatB", Y2 = "RelSatB",
equate = "none",
writeTo = tempdir(),
fileName = "obsAPIM_script")