{"id":32207146,"url":"https://github.com/paytonjjones/networktree","last_synced_at":"2026-02-23T14:03:56.942Z","repository":{"id":56935267,"uuid":"155432789","full_name":"paytonjjones/networktree","owner":"paytonjjones","description":"Recursive partitioning (tree models) of psychometric networks","archived":false,"fork":false,"pushed_at":"2022-09-05T18:44:29.000Z","size":37744,"stargazers_count":13,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-17T05:54:21.561Z","etag":null,"topics":["network-analysis","psychometrics","tree-models"],"latest_commit_sha":null,"homepage":"https://paytonjjones.github.io/networktree/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paytonjjones.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-30T18:00:49.000Z","updated_at":"2023-11-22T07:46:49.000Z","dependencies_parsed_at":"2022-08-21T06:50:40.769Z","dependency_job_id":null,"html_url":"https://github.com/paytonjjones/networktree","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/paytonjjones/networktree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paytonjjones%2Fnetworktree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paytonjjones%2Fnetworktree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paytonjjones%2Fnetworktree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paytonjjones%2Fnetworktree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paytonjjones","download_url":"https://codeload.github.com/paytonjjones/networktree/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paytonjjones%2Fnetworktree/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29745113,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["network-analysis","psychometrics","tree-models"],"created_at":"2025-10-22T05:47:07.283Z","updated_at":"2026-02-23T14:03:56.936Z","avatar_url":"https://github.com/paytonjjones.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file and run rmarkdown::render(\"README.Rmd\") --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  fig.path = \"man/figures/README-\"\n)\n\nrequire(networktree)\nrequire(qgraph)\nrequire(grid)\ndata(\"dass\")\n```\n\nPsychometric networks provide information about the statistical relationships between observed variables. ***networktree*** is a package for partitioning psychometric networks to reveal heterogeneity. \n\nConsider a depression network where the nodes represent different symptoms: \n\n```{r, echo = FALSE, fig.height=4, fig.width=4}\n\n\n# depression items from dass 21\nnodeVars \u003c- c(\"dass3_D\", \"dass42_D\", \"dass10_D\", \"dass13_D\", \"dass31_D\", \"dass17_D\", \"dass38_D\")\ndNames \u003c- c(\"anhedonia\", \"initiative\",\"lookforward\",\"sad\",\"unenthused\",\"worthless\",\"meaningless\")\ncolnames(dass)[match(nodeVars, colnames(dass))] \u003c- dNames\n\npcorDassDep \u003c- qgraph(cor(dass[,dNames]), graph=\"pcor\", labels=dNames, vsize=15, layout=\"spring\", label.norm=\"OOOOO\")\n```\n\n***networktree*** can be used to identify if this depression network is heterogeneous depending on the sample characteristics. For instance, we can test whether the network differs depending on participants' marital status.\n\n```{r, echo = FALSE}\ntree1 \u003c- networktree(nodevars=dass[,dNames], splitvars=dass[,\"married\",drop=F])\nplot(tree1, transform=\"pcor\",\n     labels=dNames, vsize=15, layout=pcorDassDep$layout, label.norm=\"OOOOO\",\n     partyargs=list(gp=gpar(fontsize=10)))\n```\n\nWe can explore multiple characteristics at once, with the more important splitting characteristics being prioritized in the tree model. Continuous partitioning variables (e.g., age) can be included, and ***networktree*** will automatically search for the ideal split point(s).\n\n```{r, echo = FALSE, fig.width=10, fig.height=6.5}\ntree_complex \u003c- networktree(nodevars=dass[,dNames], splitvars=dass[,c(\"age\", \"race\"),drop=F])\nplot(tree_complex,transform=\"pcor\",\n     labels=dNames, vsize=15, layout=pcorDassDep$layout, label.norm=\"OOOOO\",\n     partyargs=list(gp=gpar(fontsize=7)))\n```\n\nResources:\n\n* [Home Page](https://paytonjjones.github.io/networktree/)\n* [Getting Started - Tutorial](https://paytonjjones.github.io/networktree/index.html) \n* [CRAN documentation](https://cran.r-project.org/web/packages/networktree/index.html)  \n* [Example application](https://paytonjjones.github.io/networktree/articles/returns.html)\n* [Published paper](https://rdcu.be/b9Kyw) for a more advanced look. \n\nTo cite ***networktree***, use:\n\nJones, P.J., Mair, P., Simon, T., \u0026 Zeileis, A. (2020). Network trees: A method for recursively partitioning covariance structures. _Psychometrika_, **85**(4), 926-945. [doi:10.1007/s11336-020-09731-4](https://doi.org/10.1007/s11336-020-09731-4)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaytonjjones%2Fnetworktree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaytonjjones%2Fnetworktree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaytonjjones%2Fnetworktree/lists"}