R codes and Programming
Practical way to label factors
```
library(memisc)
labels(anemia$anem)<-c("not anemic"=0, "anemic"=1) #library memisc
```
Newer Post
Older Post
Home
Introduction to the Analysis of Survival Data in the Presence of Competing Risks
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4741409/
Regression model with variables with different lengths
Sometimes when you are running a regression model with variables that have different lengths, r will prompt with the following error message...
Practical way to label factors
``` library(memisc) labels(anemia$anem)<-c("not anemic"=0, "anemic"=1) #library memisc ```
Function to calculate CI of linear regression coefficients
Amateur code ``` jad<-function(x, y) { model<-lm(y~x) std.err<-coef(summary(model))[, 2] coef.model1<-coef(summary(model)...