Skip to content

Instantly share code, notes, and snippets.

@karan19100
Created July 18, 2020 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karan19100/38e29fedafbba2e4919c0604dfceedbb to your computer and use it in GitHub Desktop.
Save karan19100/38e29fedafbba2e4919c0604dfceedbb to your computer and use it in GitHub Desktop.
t-value_by_karanshah
modSummary <- summary(mod1) # capture model summary as an object
modCoeff <- modSummary$coefficients # model coefficients
beta.estimate <- modCoeff["HEMAGLOBIN_CENT", "Estimate"] # get beta coefficient estimate
std.error <- modCoeff["HEMAGLOBIN_CENT", "Std. Error"] # get standard error
t_value <- beta.estimate/std.error # calculate t statistic
print(t_value) # print t-value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment