Results from a panel analysis can be used to determine whether cross-lagged effects occur in both directions (i.e., whether X1 predicts Y2 and Y1 predicts X2) and to assess the relative strength of the cross-lagged effects. For example, data based on the observation of a parent–child d...
model performance --- # obtain model results model_results <- compute(concrete_model, concrete_test[1:8]) # obtain predicted strength values predicted_strength <- model_results$net.result # examine the correlation between predicted and actual values cor(predicted_strength, concrete_test$strength) ...
cramer_v(): Compute Cramer’s V, which measures the strength of the association between categorical variables. 相关分析 计算相关性: cor_test(): correlation test between two or more variables using Pearson, Spearman or Kendall methods. cor_mat(): compute correlation matrix with p-values. Returns...
cor_mat(): compute correlation matrix with p-values. Returns a data frame containing the matrix of the correlation coefficients. The output has an attribute named "pvalue", which contains the matrix of the correlation test p-values. cor_get_pval(): extract a correlation matrix p-values from...
graph <- tbl_graph(nodes = nodes, edges = edges, directed = F) # 转换为合适的类型 # 使用ggraph画图 ggraph(graph, layout = 'linear', circular = T) + geom_edge_fan(aes(color = correlation, width = width),strength=3) + # 画线,添加属性 scale_edge_width(range = c(1,2)) + # ...
Pearson correlation coefficient (r) valueStrengthDirection Greater than .5StrongPositive Between .3 and .5ModeratePositive Between 0 and .3WeakPositive 0NoneNone Between 0 and –.3WeakNegative Between –.3 and –.5ModerateNegative Less than –.5StrongNegative ...
Evaluating model performance ---# obtain model resultsmodel_results <- compute(concrete_model, concrete_test[1:8])# obtain predicted strength valuespredicted_strength <- model_results$net.result# examine the correlation between predicted and actual valuescor(predicted_strength, concrete_test$strength)...
cor_gather(): takes a correlation matrix and collapses (or melt) it into long format data frame (paired list) cor_spread(): spread a long correlation data frame into wide format (correlation matrix). 相关矩阵取子集 cor_select(): subset a correlation matrix by selecting variables of interest...
Pearson correlation coefficient (r) valueStrengthDirection Greater than .5 Strong Positive Between .3 and .5 Moderate Positive Between 0 and .3 Weak Positive 0 None None Between 0 and –.3 Weak Negative Between –.3 and –.5 Moderate Negative Less than –.5 Strong Negative The Pearson corre...
The size of the correlation r indicates the strength of the linear relationship between x and y. Values of r close to –1 or to +1 indicate a stronger linear relationship between x and y. If r = 0 there is absolutely no linear relationship between x and y (no linear correlation). If...