if (FALSE) {
data(D243)
Cost <- D243$Cost # Cost (Swiss francs)
LOS <- D243$LOS # Length of stay (days)
Adm <- D243$Typadm; Adm <- (Adm==" Urg")*1 # Type of admission
# (0=on notification, 1=Emergency)
Ass <- D243$Typass; Ass <- (Ass=="P" )*1 # Type of insurance
# (0=usual, 1=private)
Age <- D243$age # Age (years)
Dst <- D243$dest; Dst <- (Dst=="DOMI")*1 # Destination
# (1=Home, 0=another hospital)
Sex <- D243$Sexe; Sex <- (Sex=="M" )*1 # Sex (1=Male, 0=Female)
# Truncated maximum likelihood regression with Gaussian errors
z <- TML.noncensored(log(Cost)~log(LOS)+Adm+Ass+Age+Dst+Sex, otp="adaptive",
cov="nonparametric", control=list(fastS=TRUE))
z # -> print.TML(....)
sumz <- summary(z) # -> summary.TML(....)
sumz # -> print.summary.TML(....)
coef(z) # -> coef.TML(....)
vcov(z) # -> vcov.TML(....)
}
Run the code above in your browser using DataLab