Stata lincom function equivalent in R. P- value calculation?

Viewed 302

Can't figure out an equivalent function to "lincom" command in R ? Hence cannot really calculate p- values. If at all someone can help me with which stat-test to use to calculate p-values ?

Variables -
disease = numeric =0,1
race= char= European, Indian, Asian
Age1=num= 0,1
sex =factor= M,F

Stata code -

glm disease i.raceage1 sex, link(identity) family(binomial) 
testparm X 
di "Omnibus test of age1race interaction p = " %8.6f r(p) 
lincom age1 di %6.4f r(p) " | | " 
lincom age1 + _IraceXage1__i' 
di %6.4f r(p) " | " _continue 
lincom _IraceXage__i' 
di %6.4f r(p) " | "

So far, in R have reached till here any help would be appreciated -

R-

# install.packages("remotes")
# remotes::install_github("bmckuw/UWbe536")
library(UWbe536)

model1 <- glm(formula = disease ~ race * age1 + sex, family = binomial(link = "identity"), data = MORT)
summary(model1)
fit2 <- augment(model1, newdata = MORT, type.predict = "response")
fit2$.fitted <- fit2$.fitted*100
lincom(model1, lc = "age1 == 0")
lincom(model1, lc = "race+age1 = 0")
0 Answers
Related