Publications by Jake Reynolds - August 23, 2020
Final Project, VA High School Demographics - MDS Approach
library("MPsychoR") library("smacof") VaHSdata = read.csv("VaHSdata.csv") options(digits=2, scipen=999) data(list="VaHSdata", package="MPsychoR") mydata2<-missRanger::missRanger(data = VaHSdata, verbose=0) library(psych) describe(mydata2) #Standardized the variables since not all of the variables were the same. standardize = function(x){ ...
6953 sym R (6215 sym/56 pcs) 21 img
Final Project - Exploratory Multidimensional Scaling, part 1
library("MPsychoR") library("smacof") chps = read.csv("chps.csv") #Random force used to add missing values. missRanger - Fast Imputation of Missing Values by Chained Random Forests options(digits=2, scipen=999) data(list="chps", package="MPsychoR") data set 㤼㸱chps㤼㸲 not found mydata2<-missRanger::missRanger(data = chps, verbose=0) for(...
6002 sym R (3849 sym/37 pcs) 13 img
Module 6 - Biplots and Networks
#Biplots library("MPsychoR") data("BrainIQ") BrainIQ <- na.omit(BrainIQ[,-1]) ## we omit NAs and gender rownames(BrainIQ) <- 1:nrow(BrainIQ) ## relabel persons BrainIQ1 <- as.data.frame(scale(BrainIQ)) ## standardize regfit <- lm(cbind(VIQ, PIQ, Weight) ~ -1 + Height + MRI_Count, data = BrainIQ1) colnames(regfit$coef) <- c("VIQ", "PIQ", "W...
10240 sym R (8788 sym/65 pcs) 13 img
Module 2 - Preference Modeling
library("MPsychoR") data("bandpref") bandpref library("BradleyTerry2") package 㤼㸱BradleyTerry2㤼㸲 was built under R version 4.0.5 bandsBT <- BTm(cbind(Win1, Win2),Band1, Band2, data = bandpref) bandsAbil <- BTabilities(bandsBT) round(sort(bandsAbil[,1]), 3) Scorpions Emperor Slayer Death Rush -0.312 -0.024 0....
3746 sym R (3204 sym/23 pcs) 2 img
Module 1 - IRT
library(ltm) library(mirt) data("LSAT") head(LSAT) LSAT.model<-ltm(LSAT~z1, IRT.param=TRUE) coef(LSAT.model) Dffclt Dscrmn Item 1 -3.3597341 0.8253715 Item 2 -1.3696497 0.7229499 Item 3 -0.2798983 0.8904748 Item 4 -1.8659189 0.6885502 Item 5 -3.1235725 0.6574516 #Items 1 and 5 are easy. Most people are getting them right. It...
5138 sym R (4680 sym/48 pcs) 5 img
Module 1 i IRT
library(ltm) library(mirt) data("LSAT") head(LSAT) LSAT.model<-ltm(LSAT~z1, IRT.param=TRUE) coef(LSAT.model) Dffclt Dscrmn Item 1 -3.3597341 0.8253715 Item 2 -1.3696497 0.7229499 Item 3 -0.2798983 0.8904748 Item 4 -1.8659189 0.6885502 Item 5 -3.1235725 0.6574516 #Items 1 and 5 are easy. Most people are getting them right. It...
2690 sym R (1161 sym/20 pcs) 2 img
Module 2 - Preference Modeling
data( list="bandpref", package = "MPsychoR") bandpref Btm_bandpref <-BradleyTerry2::BTm(outcome=cbind(Win1, Win2), player1 = Band1, player2 = Band2, data = bandpref) BTabilities_bandpref <-BradleyTerry2::BTabilities(model = Btm_bandpref) BTabilities_bandpref <-BTabilities_bandpref[order(BTabilities_bandpref[,"ability"]),] BTabilities_bandpref...
2966 sym R (988 sym/11 pcs) 1 img
Module 3 - CA
superfan <- as.table(matrix(c(9, 12, 8, 1, 13, 1, 6, 20, 15, 4, 23, 18), ncol = 3)) attr(superfan, "dimnames") <- list(Band = c("Slayer", "Iron Maiden", "Metallica", "Judas Priest"), Fan = c("Horst", "Helga", "Klaus")) superfan Fan Band Horst Helga Klaus Slayer 9 13 15 Iron Maiden 12 1 ...
5929 sym R (5319 sym/46 pcs) 4 img
Module 4 - Gifi
library("MPsychoR") data("ASTI") st <- ASTI[ ,c(2,4,7,13,16,24,25)] pg <- ASTI[ ,c(11,14,15,17,18,23)] stpg <- data.frame(st = st, pg = pg) pcafit <- prcomp(stpg, scale = TRUE) library("Gifi") package 㤼㸱Gifi㤼㸲 was built under R version 4.0.5 knotslin <- knotsGifi(stpg, type = "E") prlin <- princals(stpg, knots = knotslin, degrees =...
6433 sym R (3108 sym/28 pcs) 7 img
Module 5 - MDS
options(digits=2, scipen=999) data(list="Wenchuan", package="MPsychoR") Wenchuan <-missRanger::missRanger(data = Wenchuan, verbose=0) for(j in 1:ncol(Wenchuan))Wenchuan[,j]<-round(Wenchuan[,j]) M <- tidyr::gather(data=Wenchuan,key="Item", value = "Value") M$Item <-factor(x=M$Item, levels = names(sort(tapply(X=M$Value, INDEX=M$Item, FUN=me...
6446 sym R (2881 sym/24 pcs) 7 img