粘贴syntax函数.sbs

来自「SPSS的实战介绍」· SBS 代码 · 共 45 行

SBS
45
字号
Sub Main
    Call REGRESSION_Syntax
    Call GRAPH_Syntax
End Sub

Sub REGRESSION_Syntax()
'This procedure was generated automatically using Paste from a dialog
'Procedure: REGRESSION
'Data File: D:\user\spss书\SPSS开发(全)\SPSS书稿文件\CH04\雇员.SAV

	Dim strCommand As String
	strCommand = strCommand & "REGRESSION"
	strCommand = strCommand & vbCrLf
	strCommand = strCommand & "  /MISSING LISTWISE"
	strCommand = strCommand & vbCrLf
	strCommand = strCommand & "  /STATISTICS COEFF OUTS R ANOVA"
	strCommand = strCommand & vbCrLf
	strCommand = strCommand & "  /CRITERIA=PIN(.05) POUT(.10)"
	strCommand = strCommand & vbCrLf
	strCommand = strCommand & "  /NOORIGIN"
	strCommand = strCommand & vbCrLf
	strCommand = strCommand & "  /DEPENDENT salary"
	strCommand = strCommand & vbCrLf
	strCommand = strCommand & "  /METHOD=ENTER salbegin  ."
	strCommand = strCommand & vbCrLf
	objSpssApp.ExecuteCommands strCommand, True

End Sub

Sub GRAPH_Syntax()
'This procedure was generated automatically using Paste from a dialog
'Procedure: GRAPH
'Data File: D:\user\spss书\SPSS开发(全)\SPSS书稿文件\CH04\雇员.SAV

	Dim strCommand As String
	strCommand = strCommand & "GRAPH"
	strCommand = strCommand & vbCrLf
	strCommand = strCommand & "  /BAR(SIMPLE)=MEAN(salary) BY jobcat"
	strCommand = strCommand & vbCrLf
	strCommand = strCommand & "  /MISSING=REPORT."
	strCommand = strCommand & vbCrLf
	objSpssApp.ExecuteCommands strCommand, True

End Sub

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?