Giter Site home page Giter Site logo

scripty's Introduction

scripty

Lifecycle: experimental CRAN status

The goal of scripty is to help automate the specification and comparison of different generating psychometric models for indicators of psychological constructs. The package also aims to help researchers calculate scores based on their determined psychometric model for use in subsequent analyses. This package is very early in its development, so functionality is likely to expand/change dramatically/suddenly.

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("jsakaluk/scripty")

Examples

library(dplyr) 
library(psych)
library(scripty)
data(bfi)

#Fit congeneric factor model to bfi agreeableness items
agree.mod <- congeneric(dplyr::select(bfi, A1:A5))

#Calculate H and Omega indexes of reliability: 
reliability(agree.mod)

#Extract factor score for agreeableness as a predictor
bfi <- scoreit(dplyr::select(bfi, A1:A5), bfi, scorerole = "predictor")

#Preview first few A1:A5 and factor scores
head(select(bfi, A1:A5, out.score))

scripty's People

Contributors

jsakaluk avatar

Stargazers

Danielle Navarro avatar

Watchers

 avatar

scripty's Issues

get_invareffsize & dplyr

Please briefly describe your problem and what output you expect. If you have a question, please don't use this form. Instead, ask on https://stackoverflow.com/ or https://community.rstudio.com/.

Please include a minimal reproducible example (AKA a reprex). If you've never heard of a reprex before, start by reading https://www.tidyverse.org/help/#reprex.

Brief description of the problem
Using the example in the documentation (HolzingerSwineford1939 data), I could only get the function to run when loading "dplyr" beforehand (otherwise an error pops up about the group_by function).

```devtools::install_github("jsakaluk/psyscores")
library(psyscores)
library(lavaan)
d <- HolzingerSwineford1939

# library(dplyr) # needed for code to run for me

d$group[d$school=="Pasteur"] = "Pasteur"
d$group[d$school=="Grant-White"] = "Grant-White"

fac.mod <- ' visual =~ x1 + x2 + x3'
fit <- cfa(fac.mod, data=d, group="group")

get_invareffsize(dat=d, fit=fit, nodewidth=.01, lowerLV=-5, upperLV=5, lvname=NULL)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.