Prof River Huang asked the following question
Dear Attaullah, Is it possible to put the results of "predict f1-f2" (below) into a word file? Thanks.
Code:
sysuse auto, clear pca trunk weight length headroom predict f1-f2
Yes, it can be exported to a word / Excel or LaTeX document using asdocx. Since the preidct command leaves behind a fully-developed matrix, we can use the asdocx's sub-command wmat (write matrixt) to export this matrix to Word.
Code:
sysuse auto, clear
pca trunk weight length headroom
predict f1-f2

mat cof = r(scoef)
asdocx wmat, mat(cof) replace
Array