77范文网 - 专业文章范例文档资料分享平台

stata课堂命令讲解(3)

来源:网络收集 时间:2019-04-09 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

30. | 1 | |-------| 31. | 1 | 32. | 1 | 33. | 1 | 34. | 1 | 35. | 2 | |-------| 36. | 1 | 37. | 1 | 38. | 1 | 39. | 1 | 40. | 1 | |-------| 41. | 2 | 42. | 1 | 43. | 1 | 44. | 1 | 45. | 1 | |-------| 46. | 1 | 47. | 1 | 48. | 1 | 49. | 1 | 50. | 1 | |-------| 51. | 1 | 52. | 1 | 53. | 2 | 54. | 1 | 55. | 2 | |-------| 56. | 1 | 57. | 1 | 58. | 1 | 59. | 2 | 60. | 1 | |-------| 61. | 1 | 62. | 1 | 63. | 1 | 64. | 3 | 65. | 1 | |-------|

66. | 1 | 67. | 1 | 68. | 1 | 69. | 1 | 70. | 1 | |-------| 71. | 1 | 72. | 1 | 73. | 1 | 74. | 2 | +-------+ .

聚类分析到此为止,接下来继续讲判定分析 线性+非线性+其他

先看线性判定分析discrimlda(线性的)

. discrimlda price mpg weight length,group(foreign)

Linear discriminant analysis

Resubstitution classification summary

+---------+ | Key | |---------| | Number | | Percent | +---------+

| Classified True foreign | Domestic Foreign | Total -------------+--------------------+---------

Domestic | 43 9 | 52

| 82.69 domestic判别正确率 17.31 | | | Foreign | 0 22 | 22

| 0.00 100.00 foreign判别正确率 | -------------+--------------------+---------

Total | 43 31 | 74 | 58.11 41.89 | 100.00 | | Priors | 0.5000 0.5000 |

.根据分析结果进行下一步检验estat . estatclasstable

100.00 100.00

Resubstitution classification table

+---------+ | Key | |---------| | Number | | Percent | +---------+

| Classified True foreign | Domestic Foreign | Total -------------+--------------------+---------

Domestic | 43 9 | 52 | 82.69 17.31 | 100.00 | | Foreign | 0 22 | 22 | 0.00 100.00 | 100.00 -------------+--------------------+---------

Total | 43 31 | 74 | 58.11 41.89 | 100.00 | | Priors | 0.5000 0.5000 |

. eatatcorr

unrecognized command: eatat r(199);

. estatcorr

Pooled within-group correlation matrix

| price mpg weight length -------------+---------------------------------------- price | 1.00000 mpg | -0.53117 1.00000 weight | 0.70551 -0.77521 1.00000 length | 0.56014 -0.75664 0.91898 1.00000

. estat covariance

Pooled within-group covariance matrix

| price mpg weight length -------------+--------------------------------------------

price | 8799417 mpg | -8438.941 28.6848 weight | 1318950 -2616.617 397186.1 length | 30603.94 -74.63974 10667.35 339.2432

. estaterrorrate错判率

Error rate estimated by error count

| foreign

| Domestic Foreign | Total

-------------+----------------------+----------

Error rate | .1730769 0 | .0865385 -------------+----------------------+----------

Priors | .5 .5 | .

. estatgrsum四个变量的分组描述性统计差异情况

Estimation sample discrimlda Summarized by foreign

| foreign

Mean | Domestic Foreign | Total -------------+----------------------+---------- price | 6072.423 6384.682 | 6165.257 mpg | 19.82692 24.77273 | 21.2973 weight | 3317.115 2315.909 | 3019.459 length | 196.1346 168.5455 | 187.9324 -------------+----------------------+----------

N | 52 22 | 74

每个变量进行方差分析. . estatanova

Univariate ANOVA summaries

| Adj.

Variable | Model MS Resid MS Total MS R-sq R-sq Pr> F

-------------+-------------------------------------------------------------

price | 1507382.7 6.336e+08 6.249e+08 .0024 -.0115 .1713 0.6802 mpg | 378.15352 2065.3059 2042.1943 .1548 .143 13.18 0.0005

F weight | 15496779 28597399 28417939 .3514 .3424 39.02 0.0000 length | 11767.15 24425.512 24252.11 .3251 .3158 34.69 0.0000 ---------------------------------------------------------------------------

Number of obs = 74 Model df = 1 Residual df = 72 生成的判别函数?——典型判别函数法canontest . estatcanontest

Canonical linear discriminant analysis

| | Like- | Canon. Eigen- Variance | lihood

Fcn | Corr.value Prop. Cumul. | Ratio F df1 df2 Prob>F ----+---------------------------------+------------------------------------

1 | 0.7494 1.28083 1.0000 1.0000 | 0.4384 22.094 4 0.0000 e

---------------------------------------------------------------------------

Ho: this and smaller canon. corr. are zero; e = exact F 调用多元函数形式 . estat loadings

Standardized canonical discriminant function coefficients

| function1 -------------+----------- price | -1.084153 mpg | .3115969 weight | 2.04874 length | -.4264069

显示分类函数 statclassfunction

Classification functions

| foreign | Domestic Foreign

-------------+---------------------- price | .0013868 .0022795 mpg | 4.577349 4.435253 weight | -.0341788 -.0421185 length | 2.534884 2.591428

_cons | -241.4898 -231.8288 -------------+----------------------

Priors | .5 .5

69

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库stata课堂命令讲解(3)在线全文阅读。

stata课堂命令讲解(3).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/zonghe/581591.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: