Tags:
create new tag
, view all tags, tagging instructions
Return to Stat Tools Home

Title: Linear Regression

Evaluate this tool by clicking on the stars:

  • 5 stars = highest rating
  • 1 star = lowest
  • SCORE = average of all votes
Tools Overall Rating
Score: 0, My vote: 0, Total votes: 0
Code Works Well
Score: 0, My vote: 0, Total votes: 0
Good Instructions
Score: 0, My vote: 0, Total votes: 0

Add Comments and then click on "Add comment" button

Please note any errors found in the macros.

 

StatToolsForm edit

Type of Tool SAS Macro
Title Linear Regression
Programmer/Email RuiChen
Contributing Site Rochester
Description This is a macro for performing linear regression with a numeric outcome, checking model assumptions, and producing output that is arranged in a way suitable for use in publications. Some features that add convenience include checking model assumptions, finding the observation with the largest Cook's distance and leverage, and showing basic statistics for predictors.

NOTE: There will be a RTF output file generated to save to user's local disk. Please specify the directory under which the output file is saved when calling %RegMacro.
Example Example code and example graphic
Classification Graph Type Fit Diagnostics
References

Datasets

Data

Software Program SAS
Software SAS
Macro Parameters >DSName: Name of SAS data set.
Dir: Directory where the output file is saved. Using '\' for Windows and '/' for Linux.
ID: Name of the variable for object ID.
Outcome: Name of outcome variable.
PredictNum: Name of the continuous covariates.
PredictClass: Name of the categorical covariates.
ClassRef : Reference value used to create the dummy variable for the corresponding PredictClass? variable. If no reference is specified, a dot (.) must be input as a place holder and the highest value of the variable will be served as reference level.
Format: Formats of the variables with with the same order in PredictClass?. if no format defined for the corresponding qualitattive variable, a dot (.) must be input as a place holder.
Diagnostic: Linear, ResidQuantile? or N (default=N)
-N: No diagnostic procedure is performed.
-Linear: Creating and testing quadratic terms.
-ResidQuantile: No plot but calculate the average squared studentized residual within each 10-percentile.
Plot: Multiple, Residual, QQ, or N (default=N)
-N: No plot will be generated.
-Residual: Plot of residual vs. predicted value.
-QQ: Q-Q plot.
-Multiple: multiple plots.
Outdata: Name of output SAS data set containing reg estimates, p-values, leverages, Cook's distances etc.
Outfile: Name of output file
Demographics: Y/N (default = N)
-Y: Frequencies and percentages are displayed with qualitative variable values means and standard deviations are displayed with quantitative variable values.

R-Code - Attachment

R-Code

SAS-Code - Attachment Rochester_Reg Macro_Main Macro
SAS-Code

Stata-Code - Attachment

Stata-Code

Other Code - Attachment

Other Code

Called Data Manipulation

Called Tool/Utility

Called Checking Macro

Called Other

Creation-Date

Revision-Date July 15, 2010
Example Code SAS Example Code
Example Output SAS Example Output
SAS Examples

SAS_Example_Code Rochester_Reg Macro_ SAS Example Code
SAS_Example_Output Rochester_Reg Macro_SAS Example Output
R Examples

R_Example_Code

R_Example_Output

Stats Examples

Special Features

Special Features Attached

Special Features Text

Notes1-Legend Section with calls to needed macros
Notes1

Notes2-Legend Macro call with fully specified parameters
Notes2

Notes3-Legend Section with definitions of global macro parameters
Notes3

Notes4-Legend Section with definitions of local macro variables
Notes4

See Also UCSF_Logistic Regression

Rochester_Count Reg
Checklists

Stat Tools Disclaimer This SAS macro is developed by Rui Chen and other members in the Department of Biostatistics and Computational Biology at the University of Rochester under the auspice of the CTSA BERD with the intent to facilitate data analyses and reporting in clinical and related research. It is copyrighted by Dr. Chen, October, 2008 and distributed for free public access.
Discliamer The views expressed within CTSpedia are those of the author and must not be taken to represent policy or guidance on the behalf of any organization or institution with which the author is affiliated.
Permission Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT OLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Reference Image

Topic revision: r16 - 06 Apr 2012 - 15:44:40 - MaryBanach
 

Copyright & by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding CTSPedia? Send feedback