Monday, March 14, 2011
SAS SQL union and intersection
http://support.sas.com/documentation/cdl/en/sqlproc/62086/HTML/default/a001361224.htm
Monday, February 28, 2011
“ANYDATE” INFORMATS
http://www.lexjansen.com/wuss/2006/SAS_essentials/ESS-Carroll.pdf
“ANYDATE” INFORMATS
Sometimes you are very lucky in that the raw data you receive contains dates that are the same format. Sometimes you will encounter a messy data file where the dates are all different types of formats. The “anydate” informats are designed to allow you to read in a variety of date forms including:
• DATE, DATETIME, and TIME
• DDMMYY, MMDDYY, and YYMMDD
• JULIAN, MONYY, and YYQ
Using the anydate informats can be particularly useful when you are reading in data that contains a mixture of date forms and you want certain parts of the dates you are reading in. Anydate informats include:
• ANYDTDTE. Extracts the date portion
• ANYDTDTM. Extracts the datetime portion
• ANYDTTME. Extracts the time portion
“ANYDATE” INFORMATS
Sometimes you are very lucky in that the raw data you receive contains dates that are the same format. Sometimes you will encounter a messy data file where the dates are all different types of formats. The “anydate” informats are designed to allow you to read in a variety of date forms including:
• DATE, DATETIME, and TIME
• DDMMYY, MMDDYY, and YYMMDD
• JULIAN, MONYY, and YYQ
Using the anydate informats can be particularly useful when you are reading in data that contains a mixture of date forms and you want certain parts of the dates you are reading in. Anydate informats include:
• ANYDTDTE. Extracts the date portion
• ANYDTDTM. Extracts the datetime portion
• ANYDTTME. Extracts the time portion
Personalized Medicine: A Discussion
http://blogs.forbes.com/matthewherper/2011/02/25/personalized-medicine-a-discussion/
Friday, February 25, 2011
Thursday, February 10, 2011
R code to show UU' != I
U matrix as in SVD X=UDV' is only column orthogonal but not necessarily row orthogonal. U matrix, a N by p matrix, does not contain all the eigenvectors of XX', but only the first p vectors. X is also a N by p matrix, and XX' may have as many as N eigenvectors.
Monday, December 06, 2010
load delimited file with :
From here
If your data is longer than the default length, you need to use informats. For example, date or time values, names, and addresses can be longer than eight characters. In such cases, you either need to add an INFORMAT statement to the DATA step or add informats directly in the INPUT statement. However, when the informats are used in the INPUT statement, care must be taken to honor the function of the delimiter to prevent read errors. If you add informats in an INPUT statement, you must add a colon (:) in front of the informat, as shown in this example:
If your data is longer than the default length, you need to use informats. For example, date or time values, names, and addresses can be longer than eight characters. In such cases, you either need to add an INFORMAT statement to the DATA step or add informats directly in the INPUT statement. However, when the informats are used in the INPUT statement, care must be taken to honor the function of the delimiter to prevent read errors. If you add informats in an INPUT statement, you must add a colon (:) in front of the informat, as shown in this example:
Tuesday, November 23, 2010
Gelman on Bayesian adaptive methods for clinical trials
http://www.stat.columbia.edu/~cook/movabletype/archives/2010/11/bayesian_adapti.html
Wednesday, November 17, 2010
proc means example
proc means data=one nway n mean std median min max noprint;
by treatment;
var variable;
output out=variable n=N mean=mean std=std median=median min=min max=max;
run;
by treatment;
var variable;
output out=variable n=N mean=mean std=std median=median min=min max=max;
run;
proc transpose data=variable out=t&variable;
var n mean std median min max;
run;
Monday, November 15, 2010
Monday, November 08, 2010
Monday, October 11, 2010
run regression in R
Gelman: I really hate to think that there are people out there running regressions in R and not using display() and coefplot() to look at the output.
Wednesday, October 06, 2010
Metric MDS starting from eigen()
this is an exercise to figure the details of MDS, or more specifically, what the coordinates are that are used in plotting. More explanations can be found here.
Tuesday, October 05, 2010
average heterzygosity
from Ascertainment bias in studies of human genome-wide polymorphism
A simple comparison of the HapMap and Perlegen genotype data was done by considering the 5682 windows of 500 kb across the entire genome and, for each window, tallying the SFS and calculating summary statistics such as average heterozygosity for each population and FST for each population pair and for the trio of samples.
The average uncorrected heterozygosity within the three population groups for the HapMap data were 0.281, 0.247, and 0.268 for the Yoruban, Chinese, and European samples. The corresponding figures for the uncorrected Perlegen data are 0.251, 0.211, and 0.229 for the African American, Chinese, and European samples.
histograms are like this.
A simple comparison of the HapMap and Perlegen genotype data was done by considering the 5682 windows of 500 kb across the entire genome and, for each window, tallying the SFS and calculating summary statistics such as average heterozygosity for each population and FST for each population pair and for the trio of samples.
The average uncorrected heterozygosity within the three population groups for the HapMap data were 0.281, 0.247, and 0.268 for the Yoruban, Chinese, and European samples. The corresponding figures for the uncorrected Perlegen data are 0.251, 0.211, and 0.229 for the African American, Chinese, and European samples.
histograms are like this.
Monday, October 04, 2010
2D plotting in SAS
This example shows a regression plot with prediction and confidence limits.
proc sgplot data=sashelp.class; reg x=height y=weight / CLM CLI; run;
Tuesday, September 28, 2010
Wednesday, September 22, 2010
Critical Chain Project Management
In CCPM two durations are estimated for each: an aggressive duration based on how long the task would take given full focus on the task and no problems, and a “safe” duration given full focus and typical variation with each task. The differences between aggressive and “safe” durations for each critical task contribute to a pooled “project buffer” which is adjusted for the project as a whole. The end of the project buffer is the team’s “commit date” and the buffer protects the project from uncertainty
Managers and leadership need to provide clear project and task priorities and a work environment that enables single-task focus, so that each task can be completed quickly and with high quality.
Managers and leadership need to provide clear project and task priorities and a work environment that enables single-task focus, so that each task can be completed quickly and with high quality.
Tuesday, September 21, 2010
meta analysis
Jadad scale to measure methological quality of a clinical trial
tool: CMA
publication standards: quorum (eg) and moose (eg)
proc mixed can be used in meta analysis.
tool: CMA
publication standards: quorum (eg) and moose (eg)
proc mixed can be used in meta analysis.
Wednesday, September 15, 2010
histogram alternatives
Beanplot
hist() + rug(): add one dimensional scatter plot below the histograms
for discrete data: barplot(table(a)), where a is a discrete vector. Or barplot (tabulate (a))
ecdf (Empirical CDF) summarizes the data into something like a smooth CDF line while graphing all the data points.
dhist in ggplot2
more discussion from Gelman here and also here
hist() + rug(): add one dimensional scatter plot below the histograms
for discrete data: barplot(table(a)), where a is a discrete vector. Or barplot (tabulate (a))
ecdf (Empirical CDF) summarizes the data into something like a smooth CDF line while graphing all the data points.
dhist in ggplot2
more discussion from Gelman here and also here
Subscribe to:
Posts (Atom)