概要

このノートブックでは、Navara and Prabowo (2026) による Mendeley Data の公開データ AI Adoption, Digital Capability, and Innovation Capability: The Mediating Role of Strategic Decision-Making Quality を分析します。

モデルでは、AI導入とデジタル能力が戦略的意思決定品質とイノベーション能力に影響し、 さらに戦略的意思決定品質がイノベーション能力を媒介的に高める、という関係を仮定します。 分析には、他のデモと同じくローカルの lvsem パッケージを使用します。

パッケージ

rm(list = ls(all = TRUE))

library(lvsem)
library(readxl)
library(ggplot2)
library(knitr)

データ読み込み

data_file <- "Excel data respondent.xlsx"
data_candidates <- c(
  file.path("data004", data_file),
  data_file,
  file.path("..", "data004", data_file)
)
data_path <- data_candidates[file.exists(data_candidates)][1]

if (is.na(data_path)) {
  stop("Excel file not found: ", data_file)
}

data_dir <- dirname(data_path)
raw_data <- readxl::read_excel(data_path)
names(raw_data) <- trimws(gsub("[\r\n]+", "\n", names(raw_data)))

dim(raw_data)
## [1] 342  43
head(raw_data)
## # A tibble: 6 × 43
##   Respondent   Age        `Last education`   Job           `Organization status`
##   <chr>        <chr>      <chr>              <chr>         <chr>                
## 1 Respondent 1 18 - 22 yo Bachelor's Degree  Government/p… Staff/Employee       
## 2 Respondent 2 23 - 27 yo Bachelor's Degree  Student/coll… Staff/Employee       
## 3 Respondent 3 18 - 22 yo Senior High School Student/coll… Business Owner       
## 4 Respondent 4 18 - 22 yo Senior High School Student/coll… Co-Founder           
## 5 Respondent 5 18 - 22 yo Bachelor's Degree  Student/coll… Staff/Employee       
## 6 Respondent 6 23 - 27 yo Bachelor's Degree  Student/coll… Business Owner       
## # ℹ 38 more variables: `Length of work/business experience` <chr>,
## #   `Type of company/business` <chr>, `business/work scale` <chr>,
## #   `Is your company currently using AI-based technology?` <chr>,
## #   `I intend to adopt an AI-based system in my business/work because it can improve my business performance and results.` <dbl>,
## #   `I use AI-based technology to help analyze data or information in my work or business.` <dbl>,
## #   `The application of AI technology helps improve the efficiency of my work processes or business operations.` <dbl>,
## #   `I believe that AI systems can provide reliable results or recommendations in my work.` <dbl>, …

モデル定義

item_map <- c(
  AIA1 = "I intend to adopt an AI-based system in my business/work because it can improve my business performance and results.",
  AIA2 = "I use AI-based technology to help analyze data or information in my work or business.",
  AIA3 = "The application of AI technology helps improve the efficiency of my work processes or business operations.",
  AIA4 = "I believe that AI systems can provide reliable results or recommendations in my work.",
  AIA5 = "The use of AI technology aligns with the needs and working methods of my business or work.",
  DC1 = "I have good skills in using various digital technologies to support my work/business.",
  DC2 = "I am able to utilize digital technologies (such as software, online platforms, or data systems) to support my work or business activities.\n",
  DC3 = "I have the ability to manage and utilize digital information or data to support work decision-making.",
  DC4 = "I am able to use various digital technologies to improve the efficiency of work processes or business operations.\n",
  DC5 = "I can integrate digital technology with my work processes or business strategies.\n",
  DC6 = "I am able to utilize digital technology to create or develop new ideas, products, or services in my work or business.\n",
  DC7 = "I have the ability to combine digital technology with organizational resources to improve work or business performance.\n",
  DC8 = "I have skills in using digital technology to communicate and collaborate with colleagues or business partners.\n",
  SDQ1 = "I always set clear goals before making strategic decisions in my work or business.",
  SDQ2 = "Before making a strategic decision, I gather information from various relevant sources (both internal and external).\n",
  SDQ3 = "I systematically evaluate several alternative solutions before making a final decision.\n",
  SDQ4 = "In making strategic decisions, I consider the potential risks and the chances of success of each alternative.\n",
  SDQ5 = "My strategic decisions are based on logical and structured analysis, not just intuition.\n",
  IC1 = "Before making strategic decisions, I set measurable and specific decision objectives as a basis for evaluation.\n",
  IC2 = "I evaluate strategic decision alternatives by quantitatively considering the probability of risks and their business consequences.",
  IC3 = "The strategic decisions I make are based on relevant data and analysis, not just personal intuition.\n",
  IC4 = "I make optimal use of the knowledge and information available within the organization before making strategic decisions.\n",
  IC5 = "In the strategic decision-making process, I encourage team participation to improve the quality of alternative evaluations.",
  IC6 = "I re-evaluate previous strategic decisions to improve the quality of subsequent decisions.\n",
  IC7 = "Every strategic decision I make is aligned with the company's long-term strategy and business objectives.\n"
)

item_map <- trimws(gsub("[\r\n]+", "\n", item_map))

missing_items <- setdiff(unname(item_map), names(raw_data))
if (length(missing_items) > 0) {
  stop("Missing expected columns: ", paste(missing_items, collapse = " | "))
}

model_data <- as.data.frame(raw_data[, unname(item_map)])
names(model_data) <- names(item_map)

model_data[] <- lapply(model_data, function(x) {
  x <- as.numeric(as.character(x))
  x[!is.finite(x)] <- NA_real_
  x
})

model_data[] <- lapply(model_data, function(x) {
  ifelse(is.na(x), stats::median(x, na.rm = TRUE), x)
})

blocks <- list(
  AI_Adoption = paste0("AIA", 1:5),
  Digital_Capability = paste0("DC", 1:8),
  Strategic_Decision_Quality = paste0("SDQ", 1:5),
  Innovation_Capability = paste0("IC", 1:7)
)

block_summary <- data.frame(
  block = names(blocks),
  item_count = vapply(blocks, length, integer(1))
)
kable(block_summary, caption = "測定ブロック")
測定ブロック
block item_count
AI_Adoption AI_Adoption 5
Digital_Capability Digital_Capability 8
Strategic_Decision_Quality Strategic_Decision_Quality 5
Innovation_Capability Innovation_Capability 7
latent_vars <- names(blocks)
path <- matrix(
  0,
  nrow = length(latent_vars),
  ncol = length(latent_vars),
  dimnames = list(latent_vars, latent_vars)
)

path["Strategic_Decision_Quality", c("AI_Adoption", "Digital_Capability")] <- 1
path["Innovation_Capability", c(
  "AI_Adoption",
  "Digital_Capability",
  "Strategic_Decision_Quality"
)] <- 1

path
##                            AI_Adoption Digital_Capability
## AI_Adoption                          0                  0
## Digital_Capability                   0                  0
## Strategic_Decision_Quality           1                  1
## Innovation_Capability                1                  1
##                            Strategic_Decision_Quality Innovation_Capability
## AI_Adoption                                         0                     0
## Digital_Capability                                  0                     0
## Strategic_Decision_Quality                          0                     0
## Innovation_Capability                               1                     0
score_relation <- path + t(path)
score_relation
##                            AI_Adoption Digital_Capability
## AI_Adoption                          0                  0
## Digital_Capability                   0                  0
## Strategic_Decision_Quality           1                  1
## Innovation_Capability                1                  1
##                            Strategic_Decision_Quality Innovation_Capability
## AI_Adoption                                         1                     1
## Digital_Capability                                  1                     1
## Strategic_Decision_Quality                          0                     1
## Innovation_Capability                               1                     0

末尾の7つの観測変数は、データセットのタイトルと説明に合わせて Innovation_Capability として扱っています。ただし、質問文そのものは意思決定品質に近い 内容を含むため、構成概念の解釈には注意が必要です。

分析用データの出力

item_dictionary <- data.frame(
  construct = rep(names(blocks), vapply(blocks, length, integer(1))),
  item = unlist(blocks, use.names = FALSE),
  source_column = unname(item_map[unlist(blocks, use.names = FALSE)]),
  row.names = NULL
)

write.csv(model_data, file.path(data_dir, "data004_ai_adoption_clean.csv"), row.names = FALSE)
write.csv(item_dictionary, file.path(data_dir, "Data_Dictionary.csv"), row.names = FALSE)

data.frame(
  samples = nrow(model_data),
  variables = ncol(model_data)
)
##   samples variables
## 1     342        25

潜在変数スコア

lv_scores <- make_lv_scores(model_data, blocks, score_relation)

head(lv_scores)
##   AI_Adoption Digital_Capability Strategic_Decision_Quality
## 1  -0.7769915         -0.8627434                -0.81222487
## 2   0.7325806         -0.8627434                -0.81222487
## 3  -2.2912998          0.9877919                -0.44494876
## 4   0.4862224          1.2735684                 1.06419047
## 5   0.7325806          1.2735684                 1.06419047
## 6  -0.5205826         -0.3076111                -0.03829732
##   Innovation_Capability
## 1          -1.065772417
## 2           1.357092189
## 3           0.001296064
## 4           1.037455987
## 5           0.001296064
## 6          -0.406396559
round(cor(lv_scores), 3)
##                            AI_Adoption Digital_Capability
## AI_Adoption                      1.000              0.708
## Digital_Capability               0.708              1.000
## Strategic_Decision_Quality       0.658              0.715
## Innovation_Capability            0.697              0.758
##                            Strategic_Decision_Quality Innovation_Capability
## AI_Adoption                                     0.658                 0.697
## Digital_Capability                              0.715                 0.758
## Strategic_Decision_Quality                      1.000                 0.796
## Innovation_Capability                           0.796                 1.000
write.csv(lv_scores, file.path(data_dir, "data004_latent_scores.csv"), row.names = FALSE)

構造モデル

path_coefficients <- estimate_paths(lv_scores, path, scale_scores = FALSE)
path_effects <- effects_from_beta(path_coefficients)

path_coefficients
##                                                  path      beta
## 1           AI_Adoption_to_Strategic_Decision_Quality 0.4296059
## 2    Digital_Capability_to_Strategic_Decision_Quality 0.4776131
## 3                AI_Adoption_to_Innovation_Capability 0.3075609
## 4         Digital_Capability_to_Innovation_Capability 0.3490674
## 5 Strategic_Decision_Quality_to_Innovation_Capability 0.5663194
path_effects
##                                         relationships    direct  indirect
## 1                AI_Adoption -> Innovation_Capability 0.3075609 0.2432941
## 2           AI_Adoption -> Strategic_Decision_Quality 0.4296059 0.0000000
## 3         Digital_Capability -> Innovation_Capability 0.3490674 0.2704816
## 4    Digital_Capability -> Strategic_Decision_Quality 0.4776131 0.0000000
## 5 Strategic_Decision_Quality -> Innovation_Capability 0.5663194 0.0000000
##       total
## 1 0.5508550
## 2 0.4296059
## 3 0.6195489
## 4 0.4776131
## 5 0.5663194
endogenous_vars <- rownames(path)[rowSums(path) > 0]
r2_values <- sapply(endogenous_vars, function(dv) {
  preds <- names(which(path[dv, ] == 1))
  fit <- lm(
    as.formula(paste(dv, "~", paste(preds, collapse = " + "))),
    data = as.data.frame(lv_scores)
  )
  summary(fit)$r.squared
})

r2_table <- data.frame(
  construct = names(r2_values),
  R2 = as.numeric(r2_values),
  row.names = NULL
)

kable(
  data.frame(
    construct = r2_table$construct,
    R2 = round(r2_table$R2, 3)
  ),
  caption = "内生潜在変数のR2"
)
内生潜在変数のR2
construct R2
Strategic_Decision_Quality 0.558
Innovation_Capability 0.721
write.csv(r2_table, file.path(data_dir, "data004_r2.csv"), row.names = FALSE)

ブートストラップ

set.seed(123)
boot_paths <- bootstrap_paths(
  model_data,
  blocks,
  path,
  br = 1000,
  seed = 123,
  score_matrix = score_relation
)

kable(
  data.frame(
    path = boot_paths$path,
    round(boot_paths[, c("beta", "boot_se", "t_value")], 3)
  ),
  caption = "ブートストラップによるパス推定"
)
ブートストラップによるパス推定
path beta boot_se t_value
AI_Adoption_to_Strategic_Decision_Quality 0.304 0.075 4.043
Digital_Capability_to_Strategic_Decision_Quality 0.500 0.078 6.428
AI_Adoption_to_Innovation_Capability 0.179 0.055 3.260
Digital_Capability_to_Innovation_Capability 0.300 0.056 5.351
Strategic_Decision_Quality_to_Innovation_Capability 0.464 0.063 7.352
write.csv(
  boot_paths,
  file.path(data_dir, "data004_path_coefficients_bootstrap.csv"),
  row.names = FALSE
)

測定モデル

measures <- measurement_summary(model_data, blocks, lv_scores)

kable(
  data.frame(
    block = measures$reliability$block,
    round(measures$reliability[, c("alpha", "composite_reliability", "ave")], 3)
  ),
  caption = "信頼性とAVE"
)
信頼性とAVE
block alpha composite_reliability ave
AI_Adoption 0.778 0.849 0.530
Digital_Capability 0.825 0.867 0.450
Strategic_Decision_Quality 0.765 0.842 0.516
Innovation_Capability 0.813 0.862 0.471
kable(
  data.frame(
    block = measures$loadings$block,
    item = measures$loadings$item,
    loading = round(measures$loadings$loading, 3)
  ),
  caption = "外部負荷量"
)
外部負荷量
block item loading
AI_Adoption AIA1 0.727
AI_Adoption AIA2 0.718
AI_Adoption AIA3 0.724
AI_Adoption AIA4 0.731
AI_Adoption AIA5 0.739
Digital_Capability DC1 0.678
Digital_Capability DC2 0.702
Digital_Capability DC3 0.713
Digital_Capability DC4 0.684
Digital_Capability DC5 0.700
Digital_Capability DC6 0.604
Digital_Capability DC7 0.591
Digital_Capability DC8 0.683
Strategic_Decision_Quality SDQ1 0.693
Strategic_Decision_Quality SDQ2 0.721
Strategic_Decision_Quality SDQ3 0.724
Strategic_Decision_Quality SDQ4 0.707
Strategic_Decision_Quality SDQ5 0.745
Innovation_Capability IC1 0.722
Innovation_Capability IC2 0.667
Innovation_Capability IC3 0.691
Innovation_Capability IC4 0.682
Innovation_Capability IC5 0.639
Innovation_Capability IC6 0.704
Innovation_Capability IC7 0.699
write.csv(
  measures$reliability,
  file.path(data_dir, "data004_reliability_ave.csv"),
  row.names = FALSE
)
write.csv(
  measures$loadings,
  file.path(data_dir, "data004_outer_loadings.csv"),
  row.names = FALSE
)

モデル図

node_df <- data.frame(
  block = c(
    "AI_Adoption",
    "Digital_Capability",
    "Strategic_Decision_Quality",
    "Innovation_Capability"
  ),
  label = c(
    "AI導入\n(AI_Adoption)",
    "デジタル能力\n(Digital_Capability)",
    "戦略的意思決定\n品質\n(Strategic_Decision_Quality)",
    "イノベーション\n能力\n(Innovation_Capability)"
  ),
  x = c(0, 0, 3.0, 6.2),
  y = c(2.2, 0.4, 1.3, 1.3),
  stringsAsFactors = FALSE
)

edge_df <- boot_paths
edge_split <- strsplit(edge_df$path, "_to_")
edge_df$from <- vapply(edge_split, `[`, character(1), 1)
edge_df$to <- vapply(edge_split, `[`, character(1), 2)
edge_df$label <- sprintf("beta = %.3f\nT = %.3f", edge_df$beta, edge_df$t_value)

edge_df <- merge(
  edge_df,
  node_df[, c("block", "x", "y")],
  by.x = "from",
  by.y = "block"
)
names(edge_df)[names(edge_df) %in% c("x", "y")] <- c("x_from", "y_from")

edge_df <- merge(
  edge_df,
  node_df[, c("block", "x", "y")],
  by.x = "to",
  by.y = "block"
)
names(edge_df)[names(edge_df) %in% c("x", "y")] <- c("x_to", "y_to")

edge_df$x_label <- c(1.35, 1.35, 3.25, 3.25, 4.70)[match(
  edge_df$path,
  c(
    "AI_Adoption_to_Strategic_Decision_Quality",
    "Digital_Capability_to_Strategic_Decision_Quality",
    "AI_Adoption_to_Innovation_Capability",
    "Digital_Capability_to_Innovation_Capability",
    "Strategic_Decision_Quality_to_Innovation_Capability"
  )
)]
edge_df$y_label <- c(1.85, 0.72, 2.62, 0.18, 1.72)[match(
  edge_df$path,
  c(
    "AI_Adoption_to_Strategic_Decision_Quality",
    "Digital_Capability_to_Strategic_Decision_Quality",
    "AI_Adoption_to_Innovation_Capability",
    "Digital_Capability_to_Innovation_Capability",
    "Strategic_Decision_Quality_to_Innovation_Capability"
  )
)]

r2_df <- data.frame(
  block = r2_table$construct,
  r2_label = sprintf("R2 = %.3f", r2_table$R2),
  stringsAsFactors = FALSE
)
r2_df <- merge(r2_df, node_df[, c("block", "x", "y")], by = "block")
r2_df$y_label <- ifelse(
  r2_df$block == "Strategic_Decision_Quality",
  r2_df$y + 0.62,
  r2_df$y - 0.55
)

model_plot <- ggplot() +
  geom_segment(
    data = edge_df,
    aes(
      x = x_from + 0.58,
      y = y_from,
      xend = x_to - 0.58,
      yend = y_to
    ),
    arrow = arrow(length = unit(0.20, "cm")),
    linewidth = 0.75,
    color = "#374151",
    alpha = 0.90
  ) +
  geom_label(
    data = node_df,
    aes(x = x, y = y, label = label),
    size = 3.8,
    fontface = "bold",
    label.size = 0.35,
    fill = "#ffffff",
    color = "#111827"
  ) +
  geom_label(
    data = edge_df,
    aes(x = x_label, y = y_label, label = label),
    size = 2.9,
    label.size = 0.20,
    fill = "#ffffff",
    color = "#111827"
  ) +
  geom_label(
    data = r2_df,
    aes(x = x, y = y_label, label = r2_label),
    size = 3.0,
    label.size = 0.25,
    fill = "#eef7f2",
    color = "#111827"
  ) +
  coord_cartesian(xlim = c(-0.9, 7.1), ylim = c(-0.5, 3.0), clip = "off") +
  theme_void() +
  theme(
    plot.background = element_rect(fill = "#ffffff", color = NA),
    panel.background = element_rect(fill = "#ffffff", color = NA),
    plot.title = element_text(color = "#111827", face = "bold", hjust = 0.5)
  ) +
  labs(title = "AI導入・デジタル能力・戦略的意思決定品質のlvsemモデル")

model_plot

ggsave(
  file.path(data_dir, "data004_lvsem_ai_adoption_model.png"),
  model_plot,
  width = 12,
  height = 7,
  dpi = 180
)

最終出力

cat("サンプルサイズ:", nrow(model_data), "\n")
## サンプルサイズ: 342
print(round(r2_values, 3))
## Strategic_Decision_Quality      Innovation_Capability 
##                      0.558                      0.721

参考文献・データ

  • Navara, D., & Prabowo, P. (2026). AI Adoption, Digital Capability, and Innovation Capability: The Mediating Role of Strategic Decision-Making Quality. Mendeley Data, V2. https://doi.org/10.17632/fs78cfs84v.2
  • 使用パッケージ: lvsem
  • 使用データ: Excel data respondent.xlsx