samuelae / associator Goto Github PK
View Code? Open in Web Editor NEWan R package to work with association data
Home Page: http://samuelaeschbach.com/associatoR/
License: GNU General Public License v3.0
an R package to work with association data
Home Page: http://samuelaeschbach.com/associatoR/
License: GNU General Public License v3.0
The \texttt{ar_cross_targets()} produces cross-tables between variables in the \texttt{targets} and \texttt{participants} tables while respecting the retrieval counts from \texttt{responses}. This can be used, for instance, to evaluate the proportion of responses from each target cluster for different individual difference factors. The function takes the \texttt{associatoR} object as input and returns a table of class \texttt{tibble} containing grouped statistics. Per default, the function produces frequencies, but the user can request group-normalized counts using the \texttt{normalize} argument.
ar_cross_targets(ar_obj,
participant_vars = c(gender, education),
target_var = cluster,
normalize = TRUE)
when running the examples with the new and updated data set, the ar_compare_embeddings produces an error Error in svd(A, nu = nu, nv = nv) : infinite or missing values in 'x'
, but only if both participant vars are compared simultaneously
ar_obj = ar_import(intelligence,
participant = participant_id,
cue = cue,
response = response,
participant_vars = c(gender, education),
response_vars = c(response_position, response_level)) %>%
ar_normalize(case = "most_frequent", punct = "end", whitespace = "squish", process_cues = TRUE) %>%
ar_set_targets(targets = "cues") %>%
ar_embed_targets()
ar_compare_embeddings(ar_obj, c(gender, education))
the help file/documentation for ar_compare() needs a clear description of counting [what will be counted exactly] and distinguish clearly between summarizing and counting
remove them
when ar_cluster_targets() is run with an associatoR object containing a clustering solution already, multiple cluster variables (with suffixes) are joined together
add exact prompt and system prompts, as well as GPT-4 version
remove the generic plot function for the associatoR class object, since there are now dedicated plotting functions (ar_plot_embedding()
and ar_plot_wordcloud()
)
The \texttt{ar_compare_targets} function is the analog to \texttt{ar_cross_targets()} for continuous target variables. It can produce summaries of other variables, such as the targets' psycholinguistics properties. The function takes the \texttt{associatoR} object as input, as well as the participant and target variables of interest and, for the \texttt{fun} argument, a summarizing function. Per default, the function calculates the arithmetic mean. The function returns a table of class \texttt{tibble} containing grouped statistics
ar_compare_targets(ar_obj,
participant_vars = c(gender, education),
target_var = valence,
fun = median)
to reproduce:
ar_obj <- ar_import(intelligence,
participant = participant_id,
cue = cue,
response = response,
participant_vars = c(gender, education),
response_vars = c(response_position, response_level)) %>%
ar_normalize(case = "lower", punct = "all", whitespace = "squish") %>%
ar_set_targets("cues") %>%
ar_count_targets()
ar_correlate_targets(ar_obj, participant_vars = c("education", "gender"))
either ar_response_position(), or something more general
suggested by Dirk in 5. Characterizing targets
see manuscript
This reproduces the Error:
> ar_obj <- ar_import(intelligence,
+ participant = participant_id,
+ cue = cue,
+ response = response_clean,
+ participant_vars = c(gender, education),
+ response_vars = c(response_position, response_level))
Error in `dplyr::rename()`:
! Names must be unique.
✖ These names are duplicated:
* "response" at locations 5 and 6.
Run `rlang::last_trace()` to see where the error occurred.
> rlang::last_trace()
<error/vctrs_error_names_must_be_unique>
Error in `dplyr::rename()`:
! Names must be unique.
✖ These names are duplicated:
* "response" at locations 5 and 6.
---
Backtrace:
▆
1. ├─associatoR::ar_import(...)
2. │ └─data %>% dplyr::rename(id = !!participant) %>% ...
3. ├─dplyr::rename(., response = !!response)
4. └─dplyr:::rename.data.frame(., response = !!response)
Run rlang::last_trace(drop = FALSE) to see 12 hidden frames.
The \texttt{ar_compare_embeddings()} function evaluates the representational similarity of \texttt{target_embeddings} for each of one or more variables in the \texttt{participants} table. The group-specific \texttt{target_embeddings} are generated in the background and used to calculate the representational similarity based on either the correlation of the lower-triangle similarity matrices or the average correlation of row-similarities. This can be specified via the \texttt{use} argument. The function permits passing arguments to \texttt{ar_embed()} in the background via the ellipsis argument.
ar_compare_embeddings(ar_obj,
participant_vars = c(gender, education),
use = "triangle")
Add simple interface to correct spelling of words manually, or partially manually, e.g. check against dictionary, then provide interface to manually correct
make NULL or "original" or similar an option on all arguments
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.