p-value

Stepwise regression using p-values to drop variables with nonsignificant p-values

我是研究僧i 提交于 2019-11-27 06:07:51
I want to perform a stepwise linear Regression using p-values as a selection criterion, e.g.: at each step dropping variables that have the highest i.e. the most insignificant p-values, stopping when all values are significant defined by some threshold alpha . I am totally aware that I should use the AIC (e.g. command step or stepAIC ) or some other criterion instead, but my boss has no grasp of statistics and insist on using p-values. If necessary, I could program my own routine, but I am wondering if there is an already implemented version of this. Show your boss the following : set.seed(100

Looping through t.tests for data frame subsets in r

拥有回忆 提交于 2019-11-27 05:31:30
I have a data frame 'math.numeric' with 32 variables. Each row represents a student and each variable is an attribute. The students have been put into 5 groups based on their final grade. The data looks as follows: head(math.numeric) school sex age address famsize Pstatus Medu Fedu Mjob Fjob reason ... group 1 1 18 2 1 1 4 4 1 5 1 2 1 1 17 2 1 2 1 1 1 3 1 2 1 1 15 2 2 2 1 1 1 3 3 3 1 1 15 2 1 2 4 2 2 4 2 4 1 1 16 2 1 2 3 3 3 3 2 3 1 2 16 2 2 2 4 3 4 3 4 4 I am performing t-tests on each variable for group 1 vs. all the other groups to identify significantly different attributes with this group

Put stars on ggplot barplots and boxplots - to indicate the level of significance (p-value)

半世苍凉 提交于 2019-11-26 12:06:20
It's common to put stars on barplots or boxplots to show the level of significance (p-value) of one or between two groups, below are several examples: The number of stars are defined by p-value, for example one can put 3 stars for p-value < 0.001, two stars for p-value < 0.01, and so on (although this changes from one article to the other). And my questions: How to generate similar charts? The methods that automatically put stars based on significance level are more than welcome. Please find my attempt below. First, I created some dummy data and a barplot which can be modified as we wish.

Stepwise regression using p-values to drop variables with nonsignificant p-values

牧云@^-^@ 提交于 2019-11-26 11:54:20
问题 I want to perform a stepwise linear Regression using p-values as a selection criterion, e.g.: at each step dropping variables that have the highest i.e. the most insignificant p-values, stopping when all values are significant defined by some threshold alpha . I am totally aware that I should use the AIC (e.g. command step or stepAIC ) or some other criterion instead, but my boss has no grasp of statistics and insist on using p-values. If necessary, I could program my own routine, but I am

Looping through t.tests for data frame subsets in r

不打扰是莪最后的温柔 提交于 2019-11-26 11:36:40
问题 I have a data frame \'math.numeric\' with 32 variables. Each row represents a student and each variable is an attribute. The students have been put into 5 groups based on their final grade. The data looks as follows: head(math.numeric) school sex age address famsize Pstatus Medu Fedu Mjob Fjob reason ... group 1 1 18 2 1 1 4 4 1 5 1 2 1 1 17 2 1 2 1 1 1 3 1 2 1 1 15 2 2 2 1 1 1 3 3 3 1 1 15 2 1 2 4 2 2 4 2 4 1 1 16 2 1 2 3 3 3 3 2 3 1 2 16 2 2 2 4 3 4 3 4 4 I am performing t-tests on each

Put stars on ggplot barplots and boxplots - to indicate the level of significance (p-value)

帅比萌擦擦* 提交于 2019-11-26 02:29:37
问题 It\'s common to put stars on barplots or boxplots to show the level of significance (p-value) of one or between two groups, below are several examples: The number of stars are defined by p-value, for example one can put 3 stars for p-value < 0.001, two stars for p-value < 0.01, and so on (although this changes from one article to the other). And my questions: How to generate similar charts? The methods that automatically put stars based on significance level are more than welcome. 回答1: Please