Publications by Janine Medina
Lab assignment #4
# Setting up environment library(lavaan) ## This is lavaan 0.6-15 ## lavaan is FREE software! Please report any bugs. # Creating var/cov matrix for males (N = 322) lower_m <- ' 102.0100 36.7781 104.0400 16.3423 24.4999 101.0025 11.5271 14.4228 39.6885 102.0100 8.8597 17.1666 45.1044 39.7657 104.0400 14...
29 sym R (19202 sym/26 pcs)
CFA Example in Lab
# Load libraries (you may have to install packages first) library(psych) library(lavaan) ## This is lavaan 0.6-15 ## lavaan is FREE software! Please report any bugs. ## ## Attaching package: 'lavaan' ## The following object is masked from 'package:psych': ## ## cor2cov library(semTools) ## ## ################################################...
45 sym R (15021 sym/20 pcs) 1 img
F2 - 5 Example in class 4.18
Input data figure2_5.cor0 <- matrix(c(1,.50,.10,.20,.50, 1, .10, .30, .10, .10, 1, .20, .20, .30, .20,1), nrow=4, ncol=4, dimnames=list(c("X1", "X2", "X3", "X4"), c("X1", "X2", "X3", "X4"))) #1.00 .50 .10 .20 #.50 1.00 .10 .30 #.10 .10 1.00 .20 #.20 .30 .20 1.00 figure2_5.cor <- mxData(observed=figure2_5.cor0, type="cov", n...
214 sym 2 img
part 2 of lavan for 4.18 psych 214 class
Lavaan example Fig 2.5 #import data ch2.data <- ' 1.00 .50 1.00 .10 .10 1.00 .20 .30 .20 1.00 ' # make symmetric matrix and name variables ch2.cor <- getCov(ch2.data, names=c("A","B","C","D")) #models model.a <- ' G =~ a*A + b*B + c*C + d*D ' model.b <- ' E =~ a*A + b*B F =~ c*C + d*D ' #fit models fit.a <- cfa(model.a, sample.cov=ch2.cor, sample.n...
178 sym Python (3827 sym/6 pcs) 2 img
PSY 214 Lab #1
#Loading library library(lavaan) ## This is lavaan 0.6-15 ## lavaan is FREE software! Please report any bugs. # Read in data reg1 example modelData <- read.table("reg1.dat.csv", header = TRUE) View(modelData) # Creating model regression example 1 model1<-" ! regressions E=~1.0*Y_c Y_c ~ b*X_c ! residuals, variances and covariances X_c ~...
23 sym R (16792 sym/20 pcs)
SYP Descriptives pt1
#packages library(psych) #install.packages('epiDisplay') library(epiDisplay) ## Loading required package: foreign ## Loading required package: survival ## Loading required package: MASS ## Loading required package: nnet ## ## Attaching package: 'epiDisplay' ## The following objects are masked from 'package:psych': ## ## alpha, cs, lookup libr...
166 sym R (4363 sym/29 pcs) 8 img
Section 8 Lab Assignment
SECTION 8 STARTS HERE: library(haven) library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union library(ggplot2) library(psych) ## ## Attaching package: 'psych' ## The follo...
1771 sym R (168161 sym/59 pcs) 1 img
Lab Section 6
SECTION 5 STARTS HERE: library(haven) library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union library (ggplot2) library(psych) ## ## Attaching package: 'psych' ## The foll...
1974 sym R (7537 sym/43 pcs) 3 img
PSY 212 Lab #1 WK 1
#Libraries library(haven) library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union library (ggplot2) library(psych) ## ## Attaching package: 'psych' ## The following obje...
10519 sym R (3678139 sym/166 pcs) 29 img
PSY 212 Wk v2
#Libraries library(haven) library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union library (ggplot2) library(psych) ## ## Attaching package: 'psych' ## The following obje...
11007 sym R (3956698 sym/163 pcs) 28 img