【发布时间】:2021-06-12 16:45:27
【问题描述】:
我过去曾在回归表中使用过 stargazer。
但是,我想知道如何将 stargazer 与因子分析和主成分分析的输出一起使用。
我的代码运行如下:
fa1 <- factanal(new2, factors = 4, rotation = "varimax", sort = TRUE)
print(fa1, digits = 3, cutoff = .5, sort = TRUE)
load <- fa1$loadings[,1:2]
plot(load,type="n")
text(load,labels=names(new2),cex=.7)
与
two <- pca(new2, nfactors = 3)
这不起作用 - 我目前唯一的尝试。
stargazer(fa1, type = "text", title="Descriptive statistics", digits=1, out="table1.txt")
更新:自发布以来,我已经能够将对象转换为数据框:
已转换
然后我成功地使用了上面的代码,除了输出似乎不包括单个因素得分。
见下文:
【问题讨论】: