楼主: jib
1313 0

[经济] SPSS专版 [推广有奖]

  • 0关注
  • 0粉丝

已卖:1份资源

高中生

7%

还不是VIP/贵宾

-

威望
0
论坛币
476 个
通用积分
0.4500
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
398 点
帖子
11
精华
0
在线时间
22 小时
注册时间
2013-9-16
最后登录
2025-11-25

楼主
jib 发表于 2013-11-28 23:39:01 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
利用SPSS Macro进行m次样本的抽样之后,将SPSS的OUTPUT转存为扩展名为.txt。
*STEP ONE: generating dataset with different distribution.
*----------------------------------------------------------------------------------.
INPUT PROGRAM.
+ LOOP #I =1 TO 5000.
+  COMPUTE NORM =rv.normal(100,15).
+ END CASE.
+ END LOOP.
+ END FILE.
END INPUT PROGRAM.
EXECUTE.

*STEP TWO: draw random samples from the given distributions.
View those distributions as the population we are interested in.
*------------------------------------------------------------------------------------------------------

*create a Macro facility to do the sampling process.
*-------------------------------------------------------------------------.
DEFINE ASMPL ( vars = !CHAREND ( '/' ) ).
!DO !i =1 !TO 1000.
  temporary.
  sample 100 from 5000.
  descriptive var =!vars /statistics =mean.
  write format !vars(f10.4).
!DOEND.
!ENDDEFINE.
*call the Macro program to do the sampling for those distributions.
ASMPL vars =norm /.


*STEP THREE: read output into SPSS file and check their distribution.
*------------------------------------------------------------------------------------------------------.
data list file ='E:\output.txt' records =13
/8 norm(22x,f9.4).
execute.

freq var =norm /format =notable /histogram =normal /statistics =all.

结果显示:
Data List will read 13 records from E:\output.txt
Variable   Rec   Start     End         Format
NORM         8      23      31         F9.4

>Warning # 1114
>Undefined error #1114 - Cannot open text file "C:\PROGRA~1\SPSS\en\windows\spss.err": No such file or directory
>Command line: 10087  Current case: 1  Current splitfile group: 1
>Field contents: '0 99.3194'
>Record number: 8  Starting column: 23  Record length: 8192

>Warning # 1114
>Undefined error #1114 - Cannot open text file "C:\PROGRA~1\SPSS\en\windows\spss.err": No such file or directory
>Command line: 10087  Current case: 2  Current splitfile group: 1
>Field contents: '0 103.196'
>Record number: 21  Starting column: 23  Record length: 8192

>Warning # 1114
>Undefined error #1114 - Cannot open text file "C:\PROGRA~1\SPSS\en\windows\spss.err": No such file or directory
>Command line: 10087  Current case: 3  Current splitfile group: 1
>Field contents: '0 101.214'
>Record number: 34  Starting column: 23  Record length: 8192

>Warning # 1114
>Undefined error #1114 - Cannot open text file "C:\PROGRA~1\SPSS\en\windows\spss.err": No such file or directory
>Command line: 10087  Current case: 4  Current splitfile group: 1
>Field contents: '0 98.3637'
>Record number: 47  Starting column: 23  Record length: 8192

>Warning # 1114
>Undefined error #1114 - Cannot open text file "C:\PROGRA~1\SPSS\en\windows\spss.err": No such file or directory
>Command line: 10087  Current case: 5  Current splitfile group: 1
>Field contents: '0 100.067'
>Record number: 60  Starting column: 23  Record length: 8192


>Warning # 1114
>Undefined error #1114 - Cannot open text file "C:\PROGRA~1\SPSS\en\windows\spss.err": No such file or directory
>Command line: 10087  Current case: 6  Current splitfile group: 1
>Field contents: '0 100.032'
>Record number: 73  Starting column: 23  Record length: 8192

>Warning # 1114
>Undefined error #1114 - Cannot open text file "C:\PROGRA~1\SPSS\en\windows\spss.err": No such file or directory
>Command line: 10087  Current case: 7  Current splitfile group: 1
>Field contents: '0 99.9544'
>Record number: 86  Starting column: 23  Record length: 8192

>Warning # 1114
>Undefined error #1114 - Cannot open text file "C:\PROGRA~1\SPSS\en\windows\spss.err": No such file or directory
>Command line: 10087  Current case: 8  Current splitfile group: 1
>Field contents: '0 99.7957'
>Record number: 99  Starting column: 23  Record length: 8192

>Warning # 1114
>Undefined error #1114 - Cannot open text file "C:\PROGRA~1\SPSS\en\windows\spss.err": No such file or directory
>Command line: 10087  Current case: 9  Current splitfile group: 1
>Field contents: '0 99.8836'
>Record number: 112  Starting column: 23  Record length: 8192

>Warning # 1114
>Undefined error #1114 - Cannot open text file "C:\PROGRA~1\SPSS\en\windows\spss.err": No such file or directory
>Command line: 10087  Current case: 10  Current splitfile group: 1
>Field contents: '0 97.8752'
>Record number: 125  Starting column: 23  Record length: 8192

>Warning # 92
>Undefined error #92 - Cannot open text file "C:\PROGRA~1\SPSS\en\windows\spss.err": No such file or directory


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:SPSS专版 SPSS PSS distribution descriptive interested different 扩展名 样本

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
jg-xs1
拉您进交流群
GMT+8, 2025-12-30 13:00