Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2 3 2 #314

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: seminr
Type: Package
Title: Building and Estimating Structural Equation Models
Version: 2.3.1
Date: 2022-06-30
Version: 2.3.2
Date: 2022-10-12
Authors@R: c(person("Soumya", "Ray", email = "soumya.ray@gmail.com", role = c("aut", "ths")),
person("Nicholas Patrick", "Danks", email = "nicholasdanks@hotmail.com", role = c("aut","cre")),
person("André", "Calero Valdez", role = "aut", email = "andrecalerovaldez@gmail.com"),
Expand Down
8 changes: 4 additions & 4 deletions R/estimate_bootstrap.R
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,11 @@ bootstrap_model <- function(seminr_model, nboot = 500, cores = NULL, seed = NULL
filled_rows <- apply(paths_descriptives != 0, 1, any, na.rm=TRUE)
paths_descriptives <- subset(paths_descriptives, filled_rows, filled_cols)

# Get the number of DVs
if (length(unique(structural_model[,"target"])) == 1) {
dependant <- unique(structural_model[,"target"])
# Get the names of endogenous variables
if (length(all_endogenous(structural_model)) == 1) {
dependant <- all_endogenous(structural_model)
} else {
dependant <- colnames(paths_descriptives[, 1:length(unique(structural_model[,"target"]))])
dependant <- colnames(paths_descriptives[, 1:length(all_endogenous(structural_model)), drop = F])
}

# Construct the vector of column names
Expand Down
4 changes: 3 additions & 1 deletion R/feature_higher_order.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ HOCs_in_model <- function(measurement_model, structural_model = NULL) {
# Get subset of HOCs also present in structural model, if one is provided
if (length(HOCs) > 0) {
output <- list()
j <- 1
for (i in 1:length(HOCs)) {
if(HOCs[[i]][1] %in% construct_names(structural_model)) {
output[[i]] <- HOCs[[i]]
output[[j]] <- HOCs[[i]]
j <- j + 1
}
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion R/library.R
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ return_only_composite_scores <- function(object){
total_effects <- function(path_coef) {
output <- path_coef
paths <- path_coef
while (sum(paths) > 0) {
while (sum(paths) != 0) {
paths <- paths %*% path_coef
output <- output + paths
}
Expand Down
5 changes: 2 additions & 3 deletions R/plot_dot.R
Original file line number Diff line number Diff line change
Expand Up @@ -743,10 +743,8 @@ format_edge_label <- function(template, variable, value) {
}

#' Returns the type of a construct from a model
#'
#' @param model the model to get the type from
#' @param construct the character string name of the construct
#'
#' @return Returns a character string
get_construct_type <- function(model, construct) {
#if (!(construct %in% model$constructs)) {
Expand Down Expand Up @@ -885,7 +883,8 @@ extract_sm_nodes <- function(model, theme, structure_only = FALSE) {

if (startsWith(construct_type, "HOC") && !structure_only) {

row_index <- grepl(construct, model$mmMatrix[,1])
# row_index <- grepl(construct, model$mmMatrix[,1])
row_index <- model$mmMatrix[,1] == construct
result <- model$mmMatrix[row_index, 2]
sm_nodes <- c(sm_nodes, result)
}
Expand Down
989 changes: 743 additions & 246 deletions doc/SEMinR.html

Large diffs are not rendered by default.