{
  "_id": "6a181b17acfb0bcc41db0e4e",
  "Package": "swaprinc",
  "Title": "Swap Principal Components into Regression Models",
  "Version": "1.0.1.9000",
  "Authors@R": "person(\"Mackson\", \"Ncube\", , \"macksonncube.stats@gmail.com\", role = c(\"aut\", \"cre\", \"cph\"))",
  "Description": "Obtaining accurate and stable estimates of regression\ncoefficients can be challenging when the suggested statistical\nmodel has issues related to multicollinearity, convergence, or\noverfitting. One solution is to use principal component\nanalysis (PCA) results in the regression, as discussed in Chan\nand Park (2005) <doi:10.1080/01446190500039812>. The swaprinc()\npackage streamlines comparisons between a raw regression model\nwith the full set of raw independent variables and a principal\ncomponent regression model where principal components are\nestimated on a subset of the independent variables, then\nswapped into the regression model in place of those variables.\nThe swaprinc() function compares one raw regression model to\none principal component regression model, while the compswap()\nfunction compares one raw regression model to many principal\ncomponent regression models. Package functions include\nparameters to center, scale, and undo centering and scaling, as\ndescribed by Harvey and Hansen (2022)\n<https://cran.r-project.org/package=LearnPCA/vignettes/Vig_03_Step_By_Step_PCA.pdf>.\nAdditionally, the package supports using Gifi methods to\nextract principal components from categorical variables, as\noutlined by Rossiter (2021)\n<https://www.css.cornell.edu/faculty/dgr2/_static/files/R_html/NonlinearPCA.html#2_Package>.",
  "License": "MIT + file LICENSE",
  "Encoding": "UTF-8",
  "Roxygen": "list(markdown = TRUE)",
  "RoxygenNote": "7.2.3",
  "URL": "https://github.com/mncube/swaprinc",
  "BugReports": "https://github.com/mncube/swaprinc/issues",
  "Config/testthat/edition": "3",
  "Config/pak/sysreqs": "cmake make libicu-dev",
  "Repository": "https://mncube.r-universe.dev",
  "Date/Publication": "2023-04-18 23:42:49 UTC",
  "RemoteUrl": "https://github.com/mncube/swaprinc",
  "RemoteRef": "HEAD",
  "RemoteSha": "9d9ef19b7c0da66b591fb5c8c321da9784eac441",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-28 10:30:19 UTC",
    "User": "root"
  },
  "Author": "Mackson Ncube [aut, cre, cph]",
  "Maintainer": "Mackson Ncube <macksonncube.stats@gmail.com>",
  "MD5sum": "31ebdef5b7838113422fe6a52651781b",
  "_user": "mncube",
  "_type": "src",
  "_file": "swaprinc_1.0.1.9000.tar.gz",
  "_fileid": "8333907986e2743868e8988c2e8b68cdbc7b05f24a3a561746779bf8d01a8cda",
  "_filesize": 107992,
  "_sha256": "8333907986e2743868e8988c2e8b68cdbc7b05f24a3a561746779bf8d01a8cda",
  "_created": "2026-05-28T10:30:19.000Z",
  "_published": "2026-05-28T10:38:15.450Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 78272161598,
      "time": 427,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "ERROR",
      "artifact": "7263715156"
    },
    {
      "job": 78272161536,
      "time": 132,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7263621821"
    },
    {
      "job": 78272161512,
      "time": 255,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7263654010"
    },
    {
      "job": 78272161504,
      "time": 129,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7263612994"
    },
    {
      "job": 78271751092,
      "time": 159,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7263578613"
    },
    {
      "job": 78272161421,
      "time": 114,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7263616127"
    },
    {
      "job": 78272161466,
      "time": 76,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7263604183"
    },
    {
      "job": 78272161528,
      "time": 95,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7263610101"
    },
    {
      "job": 78272161508,
      "time": 88,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7263607829"
    }
  ],
  "_buildurl": "https://github.com/r-universe/mncube/actions/runs/26569201789",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/mncube/swaprinc",
  "_commit": {
    "id": "9d9ef19b7c0da66b591fb5c8c321da9784eac441",
    "author": "Mackson Ncube <macksonncube@gmail.com>",
    "committer": "Mackson Ncube <macksonncube@gmail.com>",
    "message": "Increment version number to 1.0.1.9000\n",
    "time": 1681861369
  },
  "_maintainer": {
    "name": "Mackson Ncube",
    "email": "macksonncube.stats@gmail.com",
    "login": "mightymetrika",
    "twitter": "@mightymetrika",
    "description": "",
    "uuid": 134214097
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "broom",
      "role": "Imports"
    },
    {
      "package": "broom.mixed",
      "role": "Imports"
    },
    {
      "package": "dplyr",
      "role": "Imports"
    },
    {
      "package": "Gifi",
      "role": "Imports"
    },
    {
      "package": "lme4",
      "role": "Imports"
    },
    {
      "package": "magrittr",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "role": "Imports"
    },
    {
      "package": "tidyselect",
      "role": "Imports"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    }
  ],
  "_owner": "mncube",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [],
  "_tags": [],
  "_stars": 0,
  "_contributors": [
    {
      "user": "mncube",
      "count": 70,
      "uuid": 46875726
    }
  ],
  "_userbio": {
    "uuid": 46875726,
    "type": "user",
    "name": "Mackson Ncube",
    "description": "Applied Statistician"
  },
  "_downloads": {
    "count": 169,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/swaprinc"
  },
  "_devurl": "https://github.com/mncube/swaprinc",
  "_searchresults": 2,
  "_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/swaprinc.html",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/mncube/swaprinc",
  "_realowner": "mncube",
  "_cranurl": true,
  "_releases": [
    {
      "version": "1.0.1",
      "date": "2023-04-17"
    }
  ],
  "_exports": [
    "%>%",
    "compswap",
    "swaprinc"
  ],
  "_help": [
    {
      "page": "compswap",
      "title": "Compare swaprinc Models",
      "topics": [
        "compswap"
      ]
    },
    {
      "page": "swaprinc",
      "title": "Swap in Principal Components",
      "topics": [
        "swaprinc"
      ]
    }
  ],
  "_readme": "https://github.com/mncube/swaprinc/raw/HEAD/README.md",
  "_rundeps": [
    "backports",
    "boot",
    "broom",
    "broom.mixed",
    "cli",
    "coda",
    "codetools",
    "colorspace",
    "cpp11",
    "digest",
    "dplyr",
    "forcats",
    "furrr",
    "future",
    "generics",
    "Gifi",
    "globals",
    "glue",
    "lattice",
    "lifecycle",
    "listenv",
    "lme4",
    "magrittr",
    "MASS",
    "Matrix",
    "minqa",
    "nlme",
    "nloptr",
    "parallelly",
    "pillar",
    "pkgconfig",
    "purrr",
    "R6",
    "rbibutils",
    "Rcpp",
    "RcppEigen",
    "Rdpack",
    "reformulas",
    "rlang",
    "stringi",
    "stringr",
    "tibble",
    "tidyr",
    "tidyselect",
    "utf8",
    "vctrs",
    "withr"
  ],
  "_score": 2.6989700043360187,
  "_indexed": true,
  "_nocasepkg": "swaprinc",
  "_universes": [
    "mncube",
    "mightymetrika"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.0.1.9000",
      "date": "2026-05-28T10:37:30.000Z",
      "distro": "noble",
      "commit": "9d9ef19b7c0da66b591fb5c8c321da9784eac441",
      "fileid": "69398ec0e6439fc35d52193d839dce35e787e53c1ccf24b67a88d5eb81a70d55",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/mncube/actions/runs/26569201789"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.0.1.9000",
      "date": "2026-05-28T10:32:33.000Z",
      "distro": "noble",
      "commit": "9d9ef19b7c0da66b591fb5c8c321da9784eac441",
      "fileid": "9d7cae4521de0a832c3ccb3f40a2a49192038bae123f61bd791d6e64165f8dc2",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mncube/actions/runs/26569201789"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.0.1.9000",
      "date": "2026-05-28T10:32:58.000Z",
      "commit": "9d9ef19b7c0da66b591fb5c8c321da9784eac441",
      "fileid": "7364f1ab4645457b60aa7a037098c6565f13dbf19fe2efd021d7b2f89ab75fa5",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mncube/actions/runs/26569201789"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.0.1.9000",
      "date": "2026-05-28T10:32:10.000Z",
      "commit": "9d9ef19b7c0da66b591fb5c8c321da9784eac441",
      "fileid": "e77c0bdfaa95caf4248dfe0af7d935de9dadc7a0dac6034c666fd59cc35e51a1",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mncube/actions/runs/26569201789"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.0.1.9000",
      "date": "2026-05-28T10:32:29.000Z",
      "commit": "9d9ef19b7c0da66b591fb5c8c321da9784eac441",
      "fileid": "92343d6310dfafef28a93e7a350df95e6ca80072a6ba51e839a3fbcc74c124a2",
      "status": "success",
      "buildurl": "https://github.com/r-universe/mncube/actions/runs/26569201789"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.0.1.9000",
      "date": "2026-05-28T10:31:34.000Z",
      "commit": "9d9ef19b7c0da66b591fb5c8c321da9784eac441",
      "fileid": "557f28e68390f3b2edb1c3db81cba87e3fd6e24495bfd81b1b5671e710136bd7",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mncube/actions/runs/26569201789"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.0.1.9000",
      "date": "2026-05-28T10:31:55.000Z",
      "commit": "9d9ef19b7c0da66b591fb5c8c321da9784eac441",
      "fileid": "281115b15a141abd0bbcc6a349a52aa7339b4988f4188252ce22f53de73d44ab",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mncube/actions/runs/26569201789"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "1.0.1.9000",
      "date": "2026-05-28T10:31:44.000Z",
      "commit": "9d9ef19b7c0da66b591fb5c8c321da9784eac441",
      "fileid": "d7553061db00c761eca6a59008356dcb2663325972ccbc00991325bcb2613af9",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mncube/actions/runs/26569201789"
    }
  ]
}