2018年5月21日星期一

Producing graphs of the survival and baseline hazard function after Cox regression

  • When only plots=survival is specified on the proc phreg statement, SAS will produce one graph, a “reference curve” of the survival function at the reference level of all categorical predictors and at the mean of all continuous predictors.
https://stats.idre.ucla.edu/sas/seminars/sas-survival/

2018年4月18日星期三

Heine–Borel theorem

https://ipfs.io/ipfs/QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/wiki/Heine%E2%80%93Borel_theorem.html

2018年2月28日星期三

A SAS macro to rename all variable names in a data set

Data one;
 U_2=1;
 V_3=2;
 X_2=3;
 Y_2=4;
 Z_3=5;
Run;

options macrogen mprint mlogic;
%macro rename(lib,dsn);
options pageno=1 nodate;
proc contents data=&lib..&dsn;
title "Before Renaming All Variables";
run;
proc sql noprint;
 select nvar into :num_vars
 from dictionary.tables
 where libname="&LIB" and
 memname="&DSN";
 select distinct(name) into :var1-
:var%TRIM(%LEFT(&num_vars))
 from dictionary.columns
 where libname="&LIB" and
 memname="&DSN";
quit;
run;
proc datasets library=&LIB;
 modify &DSN;
 rename
 %do i=1 %to &num_vars;
 &&var&i=%substr(&&var&i., 1, %length(&&var&i.)-2)
%end;
;
quit;
run;
options pageno=1 nodate;
proc contents data=&lib..&dsn;
title "After Renaming All Variables";
run;
%mend rename;
%rename(WORK,ONE);/***Note the library and database name should be all in CAPITAL LETTERS)****/

2018年1月9日星期二

Some reviews for Martingales

1. Simple Random Walk
2. Sample path
https://math.stackexchange.com/questions/1472068/what-is-a-sample-path-of-a-stochastic-process