《医学统计学》课程教学资源(文献资料)Three primary input styles in SAS(三种基本输入方法)

Three primary input styles in SAS List input Column input Formatted input
Three primary input styles in SAS ——List input ——Column input ——Formatted input

List input you can use the INPUT statement with list input to read 1.free-format data(data that is not organized in fixed fields)自由格式数据 2.free-format data that is separated by nonblank delimiters,such as commas以非 空格为分隔符 3.free-format data that contains missing values含缺失值
List input • you can use the INPUT statement with list input to read 1. free-format data (data that is not organized in fixed fields)自由格式数据 2. free-format data that is separated by nonblank delimiters, such as commas以非 空格为分隔符 3. free-format data that contains missing values含缺失值

4.character values that exceed eight Characters超过8个字符的字符型值 5.nonstandard free-format data非标准 数据 6.character values that contain embedded blanks含嵌入空格的字符型值
4. character values that exceed eight Characters超过8个字符的字符型值 5. nonstandard free-format data非标准 数据 6. character values that contain embedded blanks含嵌入空格的字符型值

Most free-format data fields are clearly separated by blanks and are easy to imagine as variables and observations. But fields can also be separated by other delimiters,such as commas,as shown below. Raw Data File Credit ·例 -+-10-+ -20 MALE,27,1,8,0,0 FEMALE,29,3,14,5,10 FEMALE,34,2,10,3,3 MALE,35,2,12,4,8 FEMALE,36,4,16,37 MALE,21,1,5,0,0 MALE,25,2,9,2,1 FEMALE,21,1,4,26 ALE,38,3,11,4,3 FEMALE,30,3,5,1,0
• Most free-format data fields are clearly separated by blanks and are easy to imagine as variables and observations. But fields can also be separated by other delimiters, such as commas, as shown below. • 例

When characters other than blanks are used to separate the data values,you can tell SAS which field delimiter to use.Use the DLM= option in the INFILE statement to specify a delimiter other than a blank(the default). ·data perm.survey; infile credit dlm=','; input Gender Age Bankcard FreqBank Deptcard FreqDept; run; The field delimiter must not be a character that occurs in a data value
• When characters other than blanks are used to separate the data values, you can tell SAS which field delimiter to use. Use the DLM= option in the INFILE statement to specify a delimiter other than a blank (the default). • data perm.survey; infile credit dlm=','; input Gender $ Age Bankcard FreqBank Deptcard FreqDept; run; • The field delimiter must not be a character that occurs in a data value

例 Reading Missing Values at the End of a Record Suppose the third person represented in the raw data file below did not answer the questions about how many department store credit cards she has and how often she uses them 1-+2-一-10-+- 20 2LE271800 FEMALE 3 14 5 10 FEM2LE34210■ MALE3521248 FEMALE 36 4 16 3 7 MALE211500 MALE252921 FEMALE 21 1 4 2 6 LE3831143 FEMALE 30 3 5 1 0
例 Reading Missing Values at the End of a Record • Suppose the third person represented in the raw data file below did not answer the questions about how many department store credit cards she has and how often she uses them

Because the missing values occur at the end of the record,you can use the MISSOVER option in the INFILE statement to read the missing values at the end of the record. The MISSOVER option prevents SAS from going to another record if,when using list input, it does not find values in the current line for all the INPUT statement variables. At the end of the current record,values that are expected but not found are set to missing
• Because the missing values occur at the end of the record, you can use the MISSOVER option in the INFILE statement to read the missing values at the end of the record. • The MISSOVER option prevents SAS from going to another record if, when using list input, it does not find values in the current line for all the INPUT statement variables. • At the end of the current record, values that are expected but not found are set to missing

·data perm.survey; infile credit missover; input Gender Age Bankcard FreqBank Deptcard FreqDept; run; Obs gender age bankcard fregbank deptcard freqdept male 27 8 0 0 female 29 3 14 5 10 female 只 2 10 male 35 2 female 36 4 16 6 male 21 1 5 0 0
• data perm.survey; infile credit missover; input Gender $ Age Bankcard FreqBank Deptcard FreqDept; run;

Obs gender age bankcard freqbank deptcard freqdept 1 male 27 1 8 0 0 2 female 29 3 14 5 10 3 female 34 2 10 35 4 female 36 4 16 3 7 5 male 21 1 5 0 0

例 Reading Missing Values at the Beginning or Middle of a Record Suppose the value for Age is missing in the first record. Raw Data File Credit2 1-+-10-+-20 ALE,1,8,0,0 FAE,29,3,14,5,10 FEMALE,34,2,10,3,3 ALE,35,2,12,4,8 FEMALE,36,4,16,3,7
例 Reading Missing Values at the Beginning or Middle of a Record • Suppose the value for Age is missing in the first record
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《医学统计学》课程教学资源(文献资料)非参数bootstrap方法.pptx
- 《医学统计学》课程教学资源(文献资料)决策树中ID3算法与C4.5算法分析与比较.pdf
- 《医学统计学》课程教学资源(SAS相关材料)5 相关与回归分析.pdf
- 《医学统计学》课程教学资源(SAS相关材料)4 方差分析.pdf
- 《医学统计学》课程教学资源(SAS相关材料)3 SAS基本统计过程(二).pdf
- 《医学统计学》课程教学资源(SAS相关材料)2 SAS基本统计过程(一).pdf
- 《医学统计学》课程教学资源(SAS相关材料)1 SAS基础.pdf
- 《医学统计学》课程教学课件(PPT讲稿)绪论.ppt
- 《医学统计学》课程教学课件(PPT讲稿)统计图表(Statistical Table & Statistical Chart).ppt
- 《医学统计学》课程教学课件(PPT讲稿)相对数(Relative Number)及其应用.ppt
- 《医学统计学》课程教学课件(PPT讲稿)常用概率分布.ppt
- 《医学统计学》课程教学课件(PPT讲稿)假设检验和t检验.ppt
- 《医学统计学》课程教学课件(PPT讲稿)方差分析 Analysis of Variance, ANOVA.ppt
- 《医学统计学》课程教学课件(PPT讲稿)假设检验和t检验.ppt
- 《医学统计学》课程教学课件(PPT讲稿)卡方检验 Chi-square test(x2).ppt
- 《医学统计学》课程教学课件(PPT讲稿)线性相关与回归 Linear Correlation and Regression.ppt
- 《医学统计学》课程教学课件(PPT讲稿)实验设计.ppt
- 《医学统计学》课程教学资源(实验指导)实习四 计数资料的统计推断.ppt
- 《医学统计学》课程教学资源(实验指导)实习五 直线相关与回归.ppt
- 《医学统计学》课程教学资源(实验指导)实习二 计数资料的统计描述及抽样误差与抽样分布.ppt
- 《医学统计学》课程教学资源(文献资料)决策树分类算法.ppt
- 《医学统计学》课程教学资源(文献资料)最大似然估计.ppt
- 《医学统计学》课程教学资源(文献资料)灰色关联分析方法.ppt
- 《医学统计学》课程教学资源(文献资料)结构方程模型与SmartPLS软件应用.pptx
- 《医学统计学》课程教学资源(文献资料)非参数bootstrap方法及其MATLAB实现.pdf
- 《医学统计学》课程教学资源(文献资料)统计方法在循证医学中的应用.pptx
- 重庆医科大学:《医学统计学》课程教学资源(试卷习题)医学统计学套题1(试卷).doc
- 重庆医科大学:《医学统计学》课程教学资源(试卷习题)医学统计学套题1(答案).doc
- 重庆医科大学:《医学统计学》课程教学资源(试卷习题)医学统计学套题2(试卷).doc
- 重庆医科大学:《医学统计学》课程教学资源(试卷习题)医学统计学套题2(答案).doc
- 重庆医科大学:《医学统计学》课程教学资源(试卷习题)医学统计学套题3(试卷).doc
- 重庆医科大学:《医学统计学》课程教学资源(试卷习题)医学统计学套题3(答案).doc
- 重庆医科大学:《医学统计学》课程教学资源(试卷习题)医学统计学套题4(试卷).doc
- 重庆医科大学:《医学统计学》课程教学资源(试卷习题)医学统计学套题4(答案).doc
- 重庆医科大学:《医学统计学》课程教学资源(试卷习题)医学统计学套题5(试卷).doc
- 重庆医科大学:《医学统计学》课程教学资源(试卷习题)医学统计学套题5(答案).doc
- 重庆医科大学:《医学统计学》课程教学资源(试卷习题)医学统计学套题6(试卷).doc
- 重庆医科大学:《医学统计学》课程教学资源(试卷习题)医学统计学套题6(答案).doc
- 《临床检验仪器学》课程实验教学大纲 Clinical Laboratory Instruments.doc
- 《临床检验仪器学》课程教学资源(讲义)实验09 荧光分光光度计的使用.doc