An Introduction to Experimental Design Using SAS
Application of Experimental Design in Consumer Direct-Mail
Solicitations
Introduction to Design and Analysis of Experiments with the SAS System by Asheber Abebe
Saturday, May 21, 2011
Simulate a Normal Distribution
SAS offers a function called rannor which allows you to generate a sample from a normal distribution easily.
data temp(keep=x);
retain mu 50 std 20 seed 0;
do i=1 to 1000;
x = mu + std*rannor(seed);
output;
end;
run;
proc chart data=temp;
vbar x;
run;
Posted by sasdataguru@gmail.com at
1:47 PM
Tuesday, May 17, 2011
Survival Analysis Example Using LIFETEST
Survival data consist of a response (event time, failure time, or survival time) variable that measures the duration of time until a specified event occurs and possibly a set of independent variables thought to be associated with the failure time variable. These independent variables (concomitant variables, covariates, or prognostic factors) can be either discrete, such as sex or race, or continuous, such as age or temperature. The system that gives rise to the event of interest can be biological, as for most medical data, or physical, as for engineering data. The purpose of survival analysis is to model the underlying distribution of the failure time variable and to assess the dependence of the failure time variable on the independent variables.
The following data is from Prentice, R.L. "Exponential survivals with censoring and explanatory variables.", Biometrika 60, 1973, 279-288.
The LIFETEST procedure computes nonparametric estimates of the survival distribution function. You can request either the product-limit (Kaplan and Meier) or the life-table (actuarial) estimate of the distribution. PROC LIFETEST computes nonparametric tests to compare the survival(Kaplan-Meier) curves of two or more groups. No covariates involved. If covariates are involved, use Cox proportional hazards model.
H0: S1(t) = S2(t)
HA: S1(t) ^= S2(t)
HA: S1(t) ^= S2(t)
PROC LIEFTEST PLOTS=(S) LINEPRINTER DATA=DSV;
TIME WKS*CENS(1);
STRATA VAC;
run;
proc phreg data=hsv
model wks*cens(1) = trt /ties=exact;
run;
proc phreg data=hsv
model wks*cens(1) = trt /ties=exact;
run;
Posted by sasdataguru@gmail.com at
10:35 PM
Variable Type Definition
UCLA WhatStat offers very good definitions of variable types used in statistical analysis. I expand on that and summarize as below:
Categorical variable(called nominal variable): has two or more categories, but there is no intrinsic ordering to the categories.
Ordinal variable: is similar to a categorical variable. The difference between the two is that there is a clear ordering of the variables.
Interval variable: is similar to an ordinal variable, except that the intervals between the values of the interval variable are equally spaced.
Dummy variable(indicator variable): A categorical variable that has been dummy coded. Dummy coding (also called indicator coding) is usually used in regression models, but not ANOVA. A dummy variable can have only two values: 0 and 1. When a categorical variable has more than two values, it is recoded into multiple dummy variables.
Nominal variable:
Categorical variable(called nominal variable): has two or more categories, but there is no intrinsic ordering to the categories.
Ordinal variable: is similar to a categorical variable. The difference between the two is that there is a clear ordering of the variables.
Interval variable: is similar to an ordinal variable, except that the intervals between the values of the interval variable are equally spaced.
Dummy variable(indicator variable): A categorical variable that has been dummy coded. Dummy coding (also called indicator coding) is usually used in regression models, but not ANOVA. A dummy variable can have only two values: 0 and 1. When a categorical variable has more than two values, it is recoded into multiple dummy variables.
Nominal variable:
Posted by sasdataguru@gmail.com at
9:27 PM
Monday, May 16, 2011
Sunday, May 15, 2011
Online Statistical Analysis Cheat Sheets
What statistical analysis should I use? (summary)
Probability and Statistics
What is a p-value?
SAS Cheat Sheet
Choice of Statistical Methods
Choosing the Correct Statistical Test
Intuitive Biostatistics: Choosing a statistical test
If you want your own cheat sheet to be shared with readers or you know any good ones, please send them to me.
Probability and Statistics
What is a p-value?
SAS Cheat Sheet
Choice of Statistical Methods
Choosing the Correct Statistical Test
Intuitive Biostatistics: Choosing a statistical test
If you want your own cheat sheet to be shared with readers or you know any good ones, please send them to me.
Posted by sasdataguru@gmail.com at
12:39 AM
Saturday, May 14, 2011
Reader Friendly Statistics Books Recommendation List
What is a p-value anyway?
Medical Statistics from Scratch
Medical Statistics Made Easy
Medical and Health Science Statistics Made Easy
Your Statistical Consultant: Answers to Your Data Analysis Questions
Intuitive Biostatistics: A Nonmathematical Guide to Statistical Thinking
Common Errors in Statistics
Statistical Rules of Thumb
Medical Statistics from Scratch
Medical Statistics Made Easy
Medical and Health Science Statistics Made Easy
Your Statistical Consultant: Answers to Your Data Analysis Questions
Intuitive Biostatistics: A Nonmathematical Guide to Statistical Thinking
Common Errors in Statistics
Statistical Rules of Thumb
Posted by sasdataguru@gmail.com at
11:44 PM
Subscribe to:
Posts (Atom)