Less local effects and some Code Functionality Updates - #146
Open
Kaladani wants to merge 22 commits into
Open
Conversation
…or the indirect behavior and indire t homophily effects and new implementation of non centered effects (mostly via nc flag in main effect isntead of new classes) where necessary.
…d update script, that looks for all files. Writing R Extensions recommend preventing the dependency fully: https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Using-Makevars Track makevars files again (as long as makevars(.win) is stored it should also be tracked?) Also repairs and refresh makevar files
…a update_source_unix bash script that can be used to automatically add missing cpps to the source list and reconfigure the script. To just update the source list e.g. also on windows the update_sources_list.sh script can be used.
Also add resolvedValue as an option to handle non-centered and centered versions of behavior effects. The manual has been adjusted accordingly. Added testthat scripts (for the weighted variants, not the pure avGroup effects), but checkEffects has still to be updated
Add non centered variant of popularity alter effect.
…havior effects. They can only be non-centered.
Cleanup other diffusion rate effects Update tests Cleanup various old files and errors.
…d indirect homophily Also more correctly handle non-cenetered effects for covariates even if they are centered by the user.
Improve diffusion effects logic to have mutable non-const changeContribution and proximityValue methods to allow some cached value updates. Rename and document gwdspFBX effect.
…r quad_nc (was not live anyway)
…nd make local benchmark and testthat easier to use. Also add some buildignore to handle vscode files (but those should not really surface in develop anyway).
Collaborator
Author
|
I have fixed a bug in one effects contribution accumulation (invisible in the egoStatistic check - but not verified against the changeContributions). Otherwise I can also update Description etc. to the current state or do you want to do that when merging? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a family of geometrically-weighted (GW) distance-2 and dyadwise-shared-partner
effects, on the network side, the behavior side, and as diffusion-rate exposure
effects, plus supporting group-level effect corrections and a build-system cleanup.
activity altereffect and a non-centered variant ofpopularity alter.totGwdspFF/totGwdspFB(+_nc): network-only structural controls forthe existing
totGwdspFFAlt/totGwdspFBAltinfluence effects (they depend onego's GW two-path/two-star count only, not on indirect alters' behavior).
totGwInAltDist2_nc: alter-wise GW version of the distance-2 familybehavior effects (non-centered only for now).
gwdspFFX/gwdspFBX(+_nc) andgwdist2XFF_nc/gwdist2XFB_nc:GW building blocks for weighted indirect homophily on the network side.
gwdspFFExposure/gwdspFBExposureandgwdist2FFExposure/gwdist2FBExposure, the GW counterparts oftotInExposureDist2/anyInExposureDist2. There are currently no FF versionsof the distance 2 exposure effects (and no BB version of any indirect influence or exposure effect).
avGroup/totGroupfamily,DegreeWeightedAverageGroupEffect)._nc) variants ofaltX,egoX,egoXaltX,totInDist2,gwInAltDist2as lower-order controls; covariate effects now more consistentlyrespect non-centering even when the covariate itself is user-centered.
(
AverageAlterInDist2NCEffect,TotalGwdspAlterNCEffect) into anncconstructorflag on the corresponding main class (
AverageAlterInDist2Effect,TotalGwdspAlterEffect); fixed a latent bug inQuadraticShapeNCEffect(currentlynot set in allEffects.csv, so not user-facing anyway).
BehaviorEffect::resolvedValue(actor, nc)andCovariateDependentNetworkEffect::resolvedValue(actor, nc), helpers that resolvea stored actor/covariate value to its centered or non-centered form depending on
an
ncflag, and switched every effect class with such a flag to use theminstead of duplicating the centering logic inline. Could be expanded to other centering versions as well. Note that
BehaviorEffect::value()returns the non-centered value whileCovariateDependentNetworkEffect::value()returns the centered value (opposite conventions for the same method name).avGroupEgoX/totGroupEgoXrows inallEffects.csvforbehaviorOneModeObjective/behaviorSymmetricObjective(pre-existing ondevelop) dispatched toAverageGroupEgoEffect, a network-side effect, sospecifying them as behavior effects would have constructed the wrong class.
Removed the erroneous rows; the correct network-side rows are untouched.
AverageTwoInStarAlterEffect,DoubleMixedStarEffect,StarMixedStarEffect, and generic helpersMixedOnlyTwoPathFunction,SameCovariateInTiesFunction2.\end{verbatim}}construct whose trailing brace was silently swallowed bythe
verbatimenvironment's own end-detection, leaving a{\footnotesizegroup unclosed for the rest of the document.
src/sources.listto a multi-line, easily diffable format withan automated update script (
update_sources_list.sh/update_sources_unix.sh);updated
configure/configure.ac/configure.win/Makevarsaccordingly, toavoid a build-time dependency on shell globbing for source discovery (per
Writing R Extensions' guidance on
Makevars).Checklist:
Checks
—
checkEffects.Rwas extended to cover all new effects (see diff); testsconfirmed behavior-preserving on
tests/newparallel.Rafter theresolvedValuerefactor.R CMD build+R CMD INSTALLon macOS (arm64);./configureregeneratessrc/Makevarsbyte-identical to the committed version, confirming
sources.listis in sync.R CMD check --as-cranon macOS(aarch64): 0 errors, 0 warnings, 4 NOTEs.
Documentation
— N/A: no exported R functions were added or modified in this PR.
— also fixed two pre-existing LaTeX bugs blocking the manual build (see above).