Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plotCI.yhat

Plot CIs from yhat


Description

This function plots CIs that have been produced from /codebooteval.yhat.

Usage

plotCI.yhat(sampStat, upperCI, lowerCI, pid=1:ncol(sampStat), nr=2, nc=2)

Arguments

sampStat

Set of sample statistics

upperCI

Set of upper CIs

lowerCI

Set of lower CIs

pid

Which set of Metrics to plot (default to all)

nr

Number of rows (default = 2)

nc

Number of columns(default = 2)

Details

This function plots CIs that have been produced from /codebooteval.yhat.

Value

This returns a plot of CIs that have been produced from /codebooteval.yhat.

Author(s)

Kim Nimon <kim.nimon@gmail.com>

References

Nimon, K., & Oswald, F. L. (2013). Understanding the results of multiple linear regression: Beyond standardized regression coefficients. Organizational Research Methods, 16, 650-674.

See Also

Examples

## Bootstrap regression results predicting paragraph     
  ## comprehension based on three verbal tests: general info, 
  ## sentence comprehension, & word classification 
 
  ## Use HS dataset in MBESS 
     if (require("MBESS")){
     data(HS)

  ## Regression
     lm.out<-lm(t6_paragraph_comprehension~
                t5_general_information+t7_sentence+t8_word_classification,data=HS)

  ## Calculate regression metrics
     regrOut<-calc.yhat(lm.out)

  ## Bootstrap results
     require ("boot")
     boot.out<-boot(HS,boot.yhat,100,lmOut=lm.out,regrout0=regrOut)

  ## Evaluate bootstrap results
     result<-booteval.yhat(regrOut,boot.out,bty="perc")

  ## Plot results
  ## plotCI.yhat(regrOut$PredictorMetrics[-nrow(regrOut$PredictorMetrics),],
  ## result$upperCIpm,result$lowerCIpm, pid=which(colnames(regrOut$PredictorMetrics) 
  ## %in% c("Beta","rs","CD:0","CD:1","CD:2","GenDom","Pratt","RLW") == TRUE),nr=3,nc=3)
     }

yhat

Interpreting Regression Effects

v2.0-3
GPL (>= 2)
Authors
Kim Nimon <kim.nimon@gmail.com>, Fred Oswald, and J. Kyle Roberts.
Initial release
2020-12-31

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.