diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2014-04-30 09:07:22 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2014-04-30 09:07:22 +0200 |
commit | 7e783e89b8ef28438ec9d20fec99b1125d9a25b0 (patch) | |
tree | 685c02ecd981fcc2a03b60fbcca111a86a225ef6 | |
parent | 6ac5441b02f6efebb3e6df81559c818b36841521 (diff) |
Restore t-test (1- and 2-sided) for fitted parameters
-rw-r--r-- | R/mkinfit.R | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/R/mkinfit.R b/R/mkinfit.R index 16b4ff3c..d3edd2fb 100644 --- a/R/mkinfit.R +++ b/R/mkinfit.R @@ -338,14 +338,17 @@ summary.mkinfit <- function(object, data = TRUE, distimes = TRUE, alpha = 0.05, se <- sqrt(diag(covar) * resvar)
lci <- param + qt(alpha/2, rdf) * se
uci <- param + qt(1-alpha/2, rdf) * se
-
+ tval <- param/se
+ pval1 <- 2 * pt(abs(tval), rdf, lower.tail = FALSE)
+ pval2 <- pt(abs(tval), rdf, lower.tail = FALSE)
}
names(se) <- pnames
modVariance <- object$ssr / length(object$residuals)
- param <- cbind(param, se, lci, uci)
- dimnames(param) <- list(pnames, c("Estimate", "Std. Error", "Lower", "Upper"))
+ param <- cbind(param, se, lci, uci, tval, pval1, pval2)
+ dimnames(param) <- list(pnames, c("Estimate", "Std. Error", "Lower", "Upper",
+ "t value", "Pr(>|t|)", "Pr(>t)"))
blci <- buci <- numeric()
# Only transform boundaries of CI for one parameter at a time
|