2018年12月23日星期日

some commands for Ubuntu


  1. cd /home/user/Download
  2. sudo cp filename /usr/bin
If you want to copy a folder from your download then just add -r before cp command
sudo cp -r foldername /usr/bin
you can use mv command to move that file or folder
sudo mv filename /usr/bin

 3. awk: line 2: missing } near end of file

use  awk '{print  $1,$2,$4,$5}'

2018年10月11日星期四

steps for simulation sample size

  1. Write the statistical model mathematically.
  2. Generate the sample according to the model with sample size N.
  3. Fit the model, perform the test, and record the rejection or acceptance of hull hypothesis.
  4. Repeat step 2 and 3 n (generally I used 5000) times.
  5. Calculate the power by (# of rejections)/n.
6 If power is too higher, decrease sample size N, repeat 2 - 5. If power is too lower, increase sample size N, repeat 2 - 5.

2018年9月25日星期二

number of basis fuction for spline regression

The number of basis function is n+d+1, where n is the number of (internal) knots, where is the degree of the basis function.

2018年6月13日星期三

R datasets

https://vincentarelbundock.github.io/Rdatasets/datasets.html

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/