SAS ats

March 18, 2018 | Author: Amitmse | Category: Sas (Software), Errors And Residuals, Statistics, Quantile, Correlation And Dependence


Comments



Description

http://www.ats.ucla.edu/stat/sas/sk/default.htm http://www.ats.ucla.edu/stat/sas/webbooks/reg/default.htm http://www.ats.ucla.edu/stat/sas/notes/ http://www.ats.ucla.edu/stat/sas/webbooks/reg/chapter1/sasreg1.htm 1.0 SAS statements and procs in this unit infile data input datalines set proc contents proc print Identifies an external raw data file to read Begins a data step which manipulates datasets Lists variable names in the input file Indicates internal data Reads a SAS data set Contents of a data set Prints observations of variables in a data set 1.0 SAS statements and procs in this unit proc contents proc print proc means proc univariate proc sort proc freq ods proc corr proc sgplot Contents of a SAS dataset Displays the data Descriptive statistics More descriptive statistics Sort a dataset Frequency tables, frequency charts, and crosstabs Output delivery system, allows access to additional output Correlation matrix and scatterplots Used here to produce scatterplots A First Regression Analysis: proc reg data="c:\sasreg\elemapi"; model api00 = acs_k3 meals full; run; The REG Procedure Model: MODEL1 Dependent Variable: api00 api 2000 Analysis of Variance Parameter Estimates Variable Label DF Parameter Estimate Standard Error t Value Pr > |t| Examining data proc contents data="c:\sasreg\elemapi" ; run; The CONTENTS Procedure -----Engine/Host Dependent Information---------Alphabetic List of Variables and Attributes----proc print data="c:\sasreg\elemapi"(obs=5) ; run; proc print data="c:\sasreg\elemapi"(obs=10) ; var api00 acs_k3 meals full; run; Obs api00 acs_k3 meals full proc means data="c:\sasreg\elemapi"; var api00 acs_k3 meals full; run; The MEANS Procedure Variable Label N Mean proc freq data="c:\sasreg\elemapi"; tables yr_rnd; run; StdDev Minimum Maximum yr_rnd Frequency Percent Cumulative Frequency Cumulative Percent proc univariate data="c:\sasreg\elemapi"; var acs_k3; run; The UNIVARIATE Procedure Variable: acs_k3 (avg class size k-3) Moments Basic Statistical Measures Tests for Location: Mu0=0 Quantiles (Definition 5) Quantile Estimate Extreme Observations ----Lowest-------Highest--Missing Values -----Percent Of----Missing Missing proc freq data="c:\sasreg\elemapi"; tables acs_k3; run; avg class size k-3 acs_k3 Frequency Frequency Missing = 2 Percent Cumulative Frequency Cumulative Percent proc print data="c:\sasreg\elemapi"; where (acs_k3 < 0); var snum dnum acs_k3; run; Obs snum dnum acs_k3 proc print data="c:\sasreg\elemapi"; where (acs_k3 < 0) and (acs_k3 ^= .); var snum dnum acs_k3; run; proc print data="c:\sasreg\elemapi"; where (dnum = 140); var snum dnum acs_k3; run; Obs snum dnum acs_k3 proc univariate data="c:\sasreg\elemapi"; var acs_k3 ; histogram / cfill=gray; run; graph proc univariate data="c:\sasreg\elemapi" plot; var acs_k3; run; graph proc univariate data="c:\sasreg\elemapi" plot; var full; run; graph proc freq data="c:\sasreg\elemapi" ; tables full; run; pct full credential full Frequency Percent Cumulative Frequency Cumulative Percent proc freq data="c:\sasreg\elemapi" ; where (full <= 1); tables dnum; run; district number dnum Frequency Percent Cumulative Frequency Cumulative Percent proc freq data="c:\sasreg\elemapi" ; where (dnum = 401); tables dnum; run; district number dnum Frequency Percent Cumulative Frequency Cumulative Percent proc insight data="c:\sasreg\elemapi"; scatter api00 acs_k3 meals full * api00 acs_k3 meals full; run; graph proc reg data="c:\sasreg\elemapi2"; model api00 = enroll ; plot api00 * enroll ; run; graph proc reg data="c:\sasreg\elemapi2" model api00 = enroll ; plot api00 * enroll / pred; run; quit; graph ; proc reg data="c:\sasreg\elemapi2"; model api00 = enroll ; plot residual. * predicted. ; run; 1.4 Multiple Regression proc reg data="c:\sasreg\elemapi2" ; model api00 = ell meals yr_rnd mobility acs_k3 acs_46 full emer enroll ; run; proc reg data="c:\sasreg\elemapi2" ; model api00 = ell meals yr_rnd mobility acs_k3 acs_46 full emer enroll / stb; run; Parameter Estimates proc reg data="c:\sasreg\elemapi2" ; model api00 = ell meals yr_rnd mobility acs_k3 acs_46 full emer enroll ; test1: test ell =0; run; Test TEST1 Results for Dependent Variable api00 Source DF Mean Square F Value Pr > F proc reg data="c:\sasreg\elemapi2" ; model api00 = ell meals yr_rnd mobility acs_k3 acs_46 full emer enroll / stb; test2: test ell; run; Test TEST2 Results for Dependent Variable api00 Source DF Mean Square F Value Pr > F proc reg data="c:\sasreg\elemapi2" ; model api00 = ell meals yr_rnd mobility acs_k3 acs_46 full emer enroll ; test_class_size: test acs_k3, acs_46; run; Test TEST_CLASS_SIZE Results for Dependent Variable api00 Source DF Mean Square F Value Pr > F proc corr data="c:\sasreg\elemapi2" ; var api00 ell meals yr_rnd mobility acs_k3 acs_46 full emer enroll ; run; Pearson Correlation Coefficients Prob > |r| under H0: Rho=0 Number of Observations api00 ell meals yr_rnd mobility Pearson Correlation Coefficients Prob > |r| under H0: Rho=0 Number of Observations proc univariate data="c:\sasreg\elemapi2"; var enroll ; histogram / cfill=gray; run; graph proc univariate data="c:\sasreg\elemapi2"; var enroll ; histogram / cfill=gray normal midpoints=100 to 1500 by 100; run; graph proc univariate data="c:\sasreg\elemapi2"; var enroll ; histogram / cfill=gray normal midpoints=100 to 1500 by 100 kernel; run; graph proc univariate data="c:\sasreg\elemapi2"; var enroll ; qqplot / normal; run; graph proc capability data="c:\sasreg\elemapi2" noprint; ppplot enroll ; run; graph data elemapi3; set "c:\sasreg\elemapi2"; lenroll = log(enroll); run; proc univariate data=elemapi3 noprint; var lenroll ; histogram / cfill=grayd0 normal kernel (color = red); run; graph Overview of SAS PROC REG: http://www.ats.ucla.edu/stat/sas/library/SASReg_mf.htm Annotated SAS Output- Regression: http://www.ats.ucla.edu/stat/sas/output/reg.htm
Copyright © 2024 DOKUMEN.SITE Inc.