{
  "_id": "6a104917acfb0bcc41c9f604",
  "Package": "wsMed",
  "Title": "Within-Subject Mediation Analysis Using Structural Equation\nModeling",
  "Version": "1.0.2",
  "Authors@R": "c(person(given = \"Wendie\",\nfamily =\"Yang\",\nrole = c(\"aut\", \"cre\"),\nemail = \"1581075494q@gmail.com\",\ncomment = c(ORCID = \"0009-0000-8388-6481\")),\nperson(given = \"Shu Fai\",\nfamily = \"Cheung\",\nrole = c(\"aut\"),\nemail = \"shufai.cheung@gmail.com\",\ncomment = c(ORCID = \"0000-0002-9871-9448\")))",
  "Description": "Within-subject mediation analysis using structural\nequation modeling. Examine how changes in an outcome variable\nbetween two conditions are mediated through one or more\nvariables. Supports within-subject mediation analysis using the\n'lavaan' package by Rosseel (2012) <doi:10.18637/jss.v048.i02>,\nand extends Monte Carlo confidence interval estimation to\nmissing data scenarios using the 'semmcci' package by Pesigan\nand Cheung (2023) <doi:10.3758/s13428-023-02114-4>.",
  "License": "GPL (>= 3)",
  "Encoding": "UTF-8",
  "RoxygenNote": "7.3.3",
  "Config/testthat/edition": "3",
  "VignetteBuilder": "knitr",
  "LazyData": "true",
  "URL": "https://yangzhen1999.github.io/wsMed/",
  "BugReports": "https://github.com/Yangzhen1999/wsMed/issues",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-10 08:39:57 UTC",
    "User": "root"
  },
  "Author": "Wendie Yang [aut, cre] (ORCID:\n<https://orcid.org/0009-0000-8388-6481>), Shu Fai Cheung [aut]\n(ORCID: <https://orcid.org/0000-0002-9871-9448>)",
  "Maintainer": "Wendie Yang <1581075494q@gmail.com>",
  "Config/pak/sysreqs": "cmake make libicu-dev libssl-dev libx11-dev\nzlib1g-dev",
  "Repository": "https://yangzhen1999.r-universe.dev",
  "Date/Publication": "2025-12-16 02:45:53 UTC",
  "RemoteUrl": "https://github.com/yangzhen1999/wsmed",
  "RemoteRef": "HEAD",
  "RemoteSha": "b9ed7e1ae4283f1fdd0e0cf684d0bd25cf729e7d",
  "MD5sum": "596bced0c3fec1f6cc274e9e5377f47b",
  "_user": "yangzhen1999",
  "_type": "src",
  "_file": "wsMed_1.0.2.tar.gz",
  "_fileid": "22e8e4038575732f94b80d61fb51a157347cbbda9efa09d4fb3305ead2e49edd",
  "_filesize": 1805050,
  "_sha256": "22e8e4038575732f94b80d61fb51a157347cbbda9efa09d4fb3305ead2e49edd",
  "_created": "2026-05-10T08:39:57.000Z",
  "_published": "2026-05-22T12:16:23.290Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 77377411044,
      "time": 242,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "6902398363"
    },
    {
      "job": 77377411183,
      "time": 209,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6902394856"
    },
    {
      "job": 77377411050,
      "time": 187,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6902467122"
    },
    {
      "job": 77377410988,
      "time": 208,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6902550521"
    },
    {
      "job": 77377410503,
      "time": 231,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6902371760"
    },
    {
      "job": 77377410612,
      "time": 142,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7160242168"
    },
    {
      "job": 77377411228,
      "time": 143,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "6902387331"
    },
    {
      "job": 77377411321,
      "time": 138,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6902386812"
    },
    {
      "job": 77377411142,
      "time": 140,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6902387119"
    }
  ],
  "_buildurl": "https://github.com/r-universe/yangzhen1999/actions/runs/25624198444",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/yangzhen1999/wsmed",
  "_commit": {
    "id": "b9ed7e1ae4283f1fdd0e0cf684d0bd25cf729e7d",
    "author": "Yangzhen1999 <2096735465@qq.com>",
    "committer": "Yangzhen1999 <2096735465@qq.com>",
    "message": "Update pkgdown site\n",
    "time": 1765853153
  },
  "_maintainer": {
    "name": "Wendie Yang",
    "email": "1581075494q@gmail.com"
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.1.0",
      "role": "Depends"
    },
    {
      "package": "knitr",
      "role": "Imports"
    },
    {
      "package": "lavaan",
      "role": "Imports"
    },
    {
      "package": "semmcci",
      "role": "Imports"
    },
    {
      "package": "mice",
      "role": "Imports"
    },
    {
      "package": "semboottools",
      "role": "Imports"
    },
    {
      "package": "MASS",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "role": "Imports"
    },
    {
      "package": "dplyr",
      "role": "Imports"
    },
    {
      "package": "ggplot2",
      "role": "Imports"
    },
    {
      "package": "methods",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "devtools",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "role": "Suggests"
    }
  ],
  "_owner": "yangzhen1999",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2025-38",
      "n": 3
    },
    {
      "week": "2025-39",
      "n": 1
    },
    {
      "week": "2025-45",
      "n": 2
    },
    {
      "week": "2025-51",
      "n": 2
    }
  ],
  "_tags": [],
  "_topics": [
    "mediation-analysis",
    "missing-data",
    "sem",
    "standardization",
    "within-subject"
  ],
  "_stars": 0,
  "_contributors": [
    {
      "user": "yangzhen1999",
      "count": 65,
      "uuid": 50649917
    },
    {
      "user": "sfcheung",
      "count": 2,
      "uuid": 7019263
    }
  ],
  "_userbio": {
    "uuid": 50649917,
    "type": "user",
    "name": "Yangzhen1999"
  },
  "_downloads": {
    "count": 168,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/wsMed"
  },
  "_devurl": "https://github.com/yangzhen1999/wsmed",
  "_pkgdown": "https://yangzhen1999.github.io/wsMed/",
  "_searchresults": 15,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "extra/wsMed.html",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/yangzhen1999/wsmed",
  "_realowner": "yangzhen1999",
  "_cranurl": true,
  "_releases": [
    {
      "version": "1.0.2",
      "date": "2025-12-11"
    }
  ],
  "_exports": [
    "GenerateModelCN",
    "GenerateModelCP",
    "GenerateModelP",
    "GenerateModelPC",
    "ImputeData",
    "MCMI2",
    "plot_moderation_curve",
    "PrepareData",
    "PrepareMissingData",
    "printGM",
    "wsMed"
  ],
  "_datasets": [
    {
      "name": "example_data",
      "title": "Example Data for within subject mediation",
      "object": "example_data",
      "class": [
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "A1",
        "A2",
        "A3",
        "B1",
        "B2",
        "B3",
        "C1",
        "C2",
        "C3",
        "D1",
        "D2",
        "D3",
        "Group",
        "W_Group"
      ],
      "rows": 100,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "GenerateModelCN",
      "title": "Generate Chained Mediation Model",
      "topics": [
        "GenerateModelCN"
      ]
    },
    {
      "page": "GenerateModelCP",
      "title": "Generate Combined Parallel and Chained Mediation Model",
      "topics": [
        "GenerateModelCP"
      ]
    },
    {
      "page": "GenerateModelP",
      "title": "Generate Parallel Mediation Model",
      "topics": [
        "GenerateModelP"
      ]
    },
    {
      "page": "GenerateModelPC",
      "title": "Generate Parallel and Chained Mediation Model",
      "topics": [
        "GenerateModelPC"
      ]
    },
    {
      "page": "ImputeData",
      "title": "Impute Missing Data Using Multiple Imputation",
      "topics": [
        "ImputeData"
      ]
    },
    {
      "page": "MCMI2",
      "title": "Monte Carlo Confidence Intervals for Multiple Imputation SEM Models",
      "topics": [
        "MCMI2"
      ]
    },
    {
      "page": "plot_moderation_curve",
      "title": "Plot moderation curves with Johnson-Neyman highlights",
      "topics": [
        "plot_moderation_curve"
      ]
    },
    {
      "page": "PrepareData",
      "title": "Prepare Data for Two-Condition Within-Subject Mediation (WsMed)",
      "topics": [
        "PrepareData"
      ]
    },
    {
      "page": "PrepareMissingData",
      "title": "Prepare Data with Missing Values for Mediation Analysis",
      "topics": [
        "PrepareMissingData"
      ]
    },
    {
      "page": "print.wsMed",
      "title": "Print Method for wsMed Objects",
      "topics": [
        "print.wsMed"
      ]
    },
    {
      "page": "printGM",
      "title": "Print Formatted SEM Model Syntax",
      "topics": [
        "printGM"
      ]
    },
    {
      "page": "wsMed",
      "title": "Within-Subject Mediation Analysis (Two-Condition)",
      "topics": [
        "wsMed"
      ]
    }
  ],
  "_readme": "https://github.com/yangzhen1999/wsmed/raw/HEAD/README.md",
  "_rundeps": [
    "backports",
    "bit",
    "bit64",
    "boot",
    "broom",
    "cli",
    "clipr",
    "codetools",
    "cpp11",
    "crayon",
    "dplyr",
    "evaluate",
    "farver",
    "forcats",
    "foreach",
    "generics",
    "GGally",
    "ggplot2",
    "ggstats",
    "glmnet",
    "glue",
    "GPArotation",
    "gtable",
    "haven",
    "highr",
    "hms",
    "isoband",
    "iterators",
    "jomo",
    "knitr",
    "labeling",
    "lattice",
    "lavaan",
    "lavaan.printer",
    "lifecycle",
    "lme4",
    "magrittr",
    "MASS",
    "Matrix",
    "mice",
    "minqa",
    "mitml",
    "mnormt",
    "nlme",
    "nloptr",
    "nnet",
    "numDeriv",
    "ordinal",
    "pan",
    "patchwork",
    "pbivnorm",
    "pillar",
    "pkgconfig",
    "prettyunits",
    "progress",
    "psych",
    "purrr",
    "quadprog",
    "R6",
    "rbibutils",
    "RColorBrewer",
    "Rcpp",
    "RcppEigen",
    "Rdpack",
    "readr",
    "reformulas",
    "rlang",
    "rpart",
    "S7",
    "scales",
    "semboottools",
    "semmcci",
    "shape",
    "stringi",
    "stringr",
    "survival",
    "tibble",
    "tidyr",
    "tidyselect",
    "tzdb",
    "ucminf",
    "utf8",
    "vctrs",
    "viridisLite",
    "vroom",
    "withr",
    "xfun",
    "yaml"
  ],
  "_vignettes": [
    {
      "source": "printGM.Rmd",
      "filename": "printGM.html",
      "title": "Demonstration of printGM()",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Demonstration of printGM()",
        "Using printGM() with WsMed()",
        "Using printGM() with GenerateModel*()"
      ],
      "created": "2025-03-12 11:34:17",
      "modified": "2025-11-07 03:47:46",
      "commits": 4
    },
    {
      "source": "GenerateModelCN.Rmd",
      "filename": "GenerateModelCN.html",
      "title": "GenerateModelCN",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "1. Difference Model Description",
        "1.1 Regression for ( Y_{\\text{diff}} ) and ( M_{\\text{diff}} )",
        "2. Indirect Effects",
        "2.1 Examples of Indirect Effects",
        "3. Total Effect",
        "4. Comparison of Indirect Effects",
        "4.1 Comparing Indirect Effects",
        "Interpretation:",
        "4.2 Example: Three Mediators ( M_1, M_2, M_3 )",
        "Indirect Effects",
        "Comparisons",
        "The indirect effects are compared as follows:[CI_{1\\text{vs}2} = \\text{indirect}1 - \\text{indirect}2][CI{1\\text{vs}3} = \\text{indirect}1 - \\text{indirect}3][CI{2\\text{vs}3} = \\text{indirect}2 - \\text{indirect}3][CI{1\\text{vs}12} = \\text{indirect}1 - \\text{indirect}{12}][CI{1\\text{vs}23} = \\text{indirect}1 - \\text{indirect}{23}][CI{1\\text{vs}123} = \\text{indirect}1 - \\text{indirect}{123}][CI{2\\text{vs}12} = \\text{indirect}2 - \\text{indirect}{12}][CI_{2\\text{vs}23} = \\text{indirect}2 - \\text{indirect}{23}][CI_{2\\text{vs}123} = \\text{indirect}2 - \\text{indirect}{123}][CI_{3\\text{vs}12} = \\text{indirect}3 - \\text{indirect}{12}][CI_{3\\text{vs}23} = \\text{indirect}3 - \\text{indirect}{23}][CI_{3\\text{vs}123} = \\text{indirect}3 - \\text{indirect}{123}][CI_{12\\text{vs}23} = \\text{indirect}{12} - \\text{indirect}{23}][CI_{12\\text{vs}123} = \\text{indirect}{12} - \\text{indirect}{123}][CI_{23\\text{vs}123} = \\text{indirect}{23} - \\text{indirect}{123}]",
        "5. C1 and C2 Coefficients",
        "6. Summary of Regression Equations"
      ],
      "created": "2024-12-09 13:07:25",
      "modified": "2025-11-07 03:47:46",
      "commits": 6
    },
    {
      "source": "GenerateModelCP.Rmd",
      "filename": "GenerateModelCP.html",
      "title": "GenerateModelCP",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "1. Model Description",
        "1.1 Regression for ( Y_{\\text{diff}} ) and ( M_{\\text{diff}} )",
        "2. Indirect Effects",
        "3. Total Effect",
        "4. Comparison of Indirect Effects",
        "4.1 Example: Three Mediators (( M_1, M_2, M_3 ))",
        "5. C1 and C2 Coefficients",
        "Definitions",
        "5.1 Example: Three Mediators (( M_1, M_2, M_3 ))",
        "6. Summary of Regression Equations"
      ],
      "created": "2024-12-09 13:07:25",
      "modified": "2025-11-07 03:47:46",
      "commits": 6
    },
    {
      "source": "GenerateModelP.Rmd",
      "filename": "GenerateModelP.html",
      "title": "GenerateModelP",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "1. Difference Model Description",
        "1.1 Regression for ( Y_1 ) and ( Y_2 )",
        "1.2 Difference Model for ( Y_{\\text{diff}} )",
        "1.3 Regression for ( M_{\\text{diff}} )",
        "2. Indirect Effects",
        "3. Total Effect",
        "4. Comparison of Indirect Effects",
        "4.1 Indirect Effect Definition",
        "4.2 Comparing Indirect Effects",
        "Interpretation",
        "5. C1- and C2-Measurement Coefficients",
        "5.1 Difference Model with Two Mediators",
        "5.2 C2-Measurement Coefficients",
        "5.3 C1-Measurement Coefficients",
        "6. Summary of Regression Equations",
        "6.1 Difference Model",
        "6.2 Defined parameters",
        "Summary"
      ],
      "created": "2024-12-09 13:07:25",
      "modified": "2025-11-07 03:47:46",
      "commits": 6
    },
    {
      "source": "GenerateModelPC.Rmd",
      "filename": "GenerateModelPC.html",
      "title": "GenerateModelPC",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "1. Model Description",
        "1.1 Regression for ( Y_{\\text{diff}} ) and ( M_{\\text{diff}} )",
        "2. Indirect Effects",
        "3. Total Effect",
        "4. Comparison of Indirect Effects",
        "4.1 Example: Three Mediators (( M_1, M_2, M_3 ))",
        "5. C1- and C2-Measurement Coefficients",
        "Definitions",
        "5.1 Example: Three Mediators (( M_1, M_2, M_3 ))",
        "6. Summary of Regression Equations"
      ],
      "created": "2024-12-09 13:07:25",
      "modified": "2025-11-07 03:47:46",
      "commits": 6
    },
    {
      "source": "MEMORE_vs_wsMed.Rmd",
      "filename": "MEMORE_vs_wsMed.html",
      "title": "MEMORE_vs_wsMed",
      "engine": "knitr::rmarkdown",
      "headings": [
        "introduction",
        "parallel mediation",
        "MEMORE 3.0 Analysis Report",
        "wsMed Analysis Report",
        "chained/serial mediation"
      ],
      "created": "2025-03-12 11:34:17",
      "modified": "2025-09-24 16:42:11",
      "commits": 3
    },
    {
      "source": "WsMed.Rmd",
      "filename": "WsMed.html",
      "title": "wsMed",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Main Function Overview",
        "Calling wsMed",
        "Examples at a Glance",
        "Example",
        "Dataset",
        "Example 1 -- Quick Start",
        "Key Arguments in Example 1",
        "Example 2 -- Using Bootstrap Confidence Intervals",
        "Key Arguments in This Example",
        "Example 3 -- Requesting Standardized Effects",
        "Example 4 -- Handling Missing Data",
        "Example 5 -- Moderated mediation with a continuous moderator W",
        "Example 6 -- Moderated mediation with a categorical moderator W",
        "Example 7 -- Covariates",
        "Understanding the Output",
        "1. Multiple Mediation (No Moderator)",
        "2. Moderated Mediation",
        "All Parameters Descriptions"
      ],
      "created": "2024-12-27 08:19:18",
      "modified": "2025-12-16 02:25:35",
      "commits": 9
    }
  ],
  "_score": 5.3222192947339195,
  "_indexed": true,
  "_nocasepkg": "wsmed",
  "_universes": [
    "yangzhen1999"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.0.2",
      "date": "2026-05-10T08:43:11.000Z",
      "distro": "noble",
      "commit": "b9ed7e1ae4283f1fdd0e0cf684d0bd25cf729e7d",
      "fileid": "64fad7e6ef51c94bfcef891ac4e0ea26c61d56db9336fc06bd1ff693cf602723",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/yangzhen1999/actions/runs/25624198444"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.0.2",
      "date": "2026-05-10T08:42:40.000Z",
      "distro": "noble",
      "commit": "b9ed7e1ae4283f1fdd0e0cf684d0bd25cf729e7d",
      "fileid": "beb5f99c6311ebd9641ab616e678299c90a6b853ec298170ada3e655cac45e0a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/yangzhen1999/actions/runs/25624198444"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.0.2",
      "date": "2026-05-10T08:54:14.000Z",
      "commit": "b9ed7e1ae4283f1fdd0e0cf684d0bd25cf729e7d",
      "fileid": "96cd3c598f49b0c7fcfd7bb99c78d2a4799d17b6675d532cc20f0d27dc9a168b",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/yangzhen1999/actions/runs/25624198444"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.0.2",
      "date": "2026-05-10T09:08:31.000Z",
      "commit": "b9ed7e1ae4283f1fdd0e0cf684d0bd25cf729e7d",
      "fileid": "5a9c7a0e14c5e911b61c15110b797a2cc4a9bc2721a2c712a891d9dc477da419",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/yangzhen1999/actions/runs/25624198444"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.0.2",
      "date": "2026-05-10T08:41:23.000Z",
      "commit": "b9ed7e1ae4283f1fdd0e0cf684d0bd25cf729e7d",
      "fileid": "4f3d4204cc6b242a41d87eb3112eb48b88c3258b96e23e83e2d110d30273d272",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/yangzhen1999/actions/runs/25624198444"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.0.2",
      "date": "2026-05-10T08:41:17.000Z",
      "commit": "b9ed7e1ae4283f1fdd0e0cf684d0bd25cf729e7d",
      "fileid": "6093c73e6d6571a6808097d97c7170ebb277c17781c3b16402ee5e37080fc2db",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/yangzhen1999/actions/runs/25624198444"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "1.0.2",
      "date": "2026-05-10T08:41:20.000Z",
      "commit": "b9ed7e1ae4283f1fdd0e0cf684d0bd25cf729e7d",
      "fileid": "352c9f9a2bec4244ed6016263b978569029d766edefea4c334ba0c1f7106a1a8",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/yangzhen1999/actions/runs/25624198444"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.0.2",
      "date": "2026-05-22T12:16:05.000Z",
      "commit": "b9ed7e1ae4283f1fdd0e0cf684d0bd25cf729e7d",
      "fileid": "794acaa7bd66227138f518e9d06af882250e3f19788094e9f2d5ac9792638b34",
      "status": "success",
      "buildurl": "https://github.com/r-universe/yangzhen1999/actions/runs/25624198444"
    }
  ]
}