Questions tagged [psych]

An R package for analysing personality, psychometrics and experimental psychology. Do not use this tag for Ruby standard library Psych.

psych is an package containing functions for analysing personality, psychometrics and experimental psychology. Functions are primarily for scale construction using factor analysis, and analysis, although others provide basic descriptive statistics. Item Response Theory is done using factor analysis of tetrachoric and polychoric s. Functions for simulating particular item and test structures are included. Several functions serve as a useful front end for structural equation modeling. Graphical displays of path diagrams, and structural equation models are created using basic graphics.

Repositories

Vignettes

Other resources

Related tags

294 questions
3
votes
2 answers

Is there a way to tell Psych in ruby to using inline mode?

environment: ruby1.9.3 , psych(any version) ex: o = { 'hash' => { 'name' => 'Steve', 'foo' => 'bar' } } => {"hash"=>{"name"=>"Steve", "foo"=>"bar"}} #is there a inline option? puts Psych.dump(o,{:inline =>true}) real result: --- hash: name:…
hey mike
  • 2,431
  • 6
  • 24
  • 29
3
votes
1 answer

Access general confidence boundaries of cronbach's alpha in R psych

I have a dataframe on which I use psych::alpha. In the output there are general confidence boundaries around a general cronbach's alpha value. I want to access those but they don't appear in the results when I save the output as a variable. In the…
Michael
  • 33
  • 4
3
votes
1 answer

Tidy repeated intraclass correlations for multiple readers

In my dataset, I have 5 readers who have classified tests (as either 0, 1 or 2) repeatedly over multiple days. On each day, only 2-3 readers out of the 5 actually classified tests. library(tidyverse) library(broom) df <- tibble(day = rep(1:10,10))…
Peter MacPherson
  • 683
  • 1
  • 7
  • 17
3
votes
0 answers

corr.test vs cor.test p-values

I'm trying to use corr.test from package psych (psych_1.6.9), but it seems to be giving different p values from cor.test while using method="spearman". Correlation coefficients are the same, but p values differ. I have put together some sample code…
Agnieszka G
  • 31
  • 1
  • 3
3
votes
1 answer

R : How to suppress a persistent warning message from alpha() function in my Rmd output?

Program : R 3.2.1 for Mac OSX IDE : RStudio Output : rmkd > html Package : "psych" Function : alpha() Problem : While using alpha(data, na.rm=F, check.keys=F, delete=F), because portions of the input-data is negatively correlated and…
mutableQ
  • 31
  • 2
3
votes
1 answer

Is there a good package for by-hand / manual / judgmental factor / component rotation?

I'm trying to add a function to manually (or by-hand, or judgmentally) rotate a factor loadings matrix from principal components analysis to the qmethod R package. By-hand rotation as in: one specifies the angle by which to rotate any given pair of…
maxheld
  • 3,963
  • 2
  • 32
  • 51
3
votes
1 answer

Describe function not working in R

Im trying to use describe function from psych package. However, I am getting the following error: Error in describe(ToothGrowth) : description must be a string of at least length 1 I made sure to reinstall the package, load it, and attaching…
Samehmagd
  • 473
  • 1
  • 5
  • 13
3
votes
2 answers

Why text "2e8" is treated as String by YAML on Mac but as Float on Linux in Ruby?

For the same ruby version, the same YAML parser engine Psych (but different minor versions), but different OS (Mac vs. Linux), text "2e8" is treated as String on Mac but as Float (200000000.0) on Linux. Why? How can I fix it so they show the same…
Ankush
  • 2,454
  • 2
  • 21
  • 27
3
votes
2 answers

Why is YAML throwing float ArgumentErrors on strings?

I have some nested strings in a complex hash that triggers "ArgumentError" exceptions. What's the best practiced way in dealing with this? require 'yaml' { a: 'hello', b: [{f:'hello',g:Hash.new,i:{a:'hello'}}], c: {e:"+."} }.to_yaml #=>…
Mr. Demetrius Michael
  • 2,326
  • 5
  • 28
  • 40
3
votes
1 answer

Psych argument error when parsing YAML in Ruby after upgrading Bundler

I've just upgraded to Bundler 1.1 from 1.0. All my code that works previously now breaks with the following error: ~/.gem/gems/psych-1.3.2/lib/psych.rb:203:in `parse': wrong number of arguments(2 for 1) (ArgumentError) from…
Michael Barton
  • 8,868
  • 9
  • 35
  • 43
2
votes
2 answers

YAML.load never returns in Rails initializer

I'm trying to load a yaml config file during initialization of my Rails 3.1 app, and the call to YAML.load never returns. Here is my initializer file: STRIPE_CONFIG = begin config = YAML.load(Rails.root.join('config', 'stripe.yml')) || {} …
Matt Huggins
  • 81,398
  • 36
  • 149
  • 218
2
votes
2 answers

Installing Ruby 3.2.2 using rbenv on macOS M2: Missing psych and libyaml issues

I am using rbenv on a Mac with an M2 CPU. I have ruby 2.7.2 installed and want to also install ruby 3.2.2. When running rbenv install 3.2.2, I get the following error: yaml.rb:3: warning: It seems your ruby installation is missing psych (for YAML…
polo
  • 1,352
  • 2
  • 16
  • 35
2
votes
3 answers

ERROR: Error installing psych: ERROR: Failed to build gem native extension

I am trying to update psych to 5.0.0, but I get the following error message: Updating psych Temporarily enhancing PATH for MSYS/MINGW... Building native extensions. This could take a while... ERROR: Error installing psych: ERROR: Failed to…
Ioannis
  • 31
  • 5
2
votes
1 answer

How can I create a parallel analysis scree in R?

Dataset Dput structure(list(V1 = structure(c(4, 4, 2, 2, 2, 2, 2, 2, 4, 4, 2, 3, 2, 3, 4, 2, 2, 2, 3, 3, 2, 3, 1, 3, 3, 3, 3, 4, 1, 2, 4, 1, 2, 3, 2, 3, 1, 1, 2, 2, 4, 3, 2, 1, 2, 3, 3, 4, 3, 3, 2, 3, 1, 4, 3, 2, 3, 4, 1, 3, 3, 3, 2, 2, 1, 2, 3,…
Shawn Hemelstrand
  • 2,676
  • 4
  • 17
  • 30
2
votes
1 answer

tab_corr, tab_df, and psych::describe on a mice mids object

I have imputed data saved as a mids object and am trying to adapt my usual workflow around imputed data. However, I cannot figure out how to use sjPlot's tab_corr() and tab_df() and psych's describe on a mids object. My goal is to generate a table…
jrcalabrese
  • 2,184
  • 3
  • 10
  • 30
1 2
3
19 20