Analysis of variance of R-4

In this section:

1: Principle Analysis of variance

2: Single factor analysis of variance, two-factor analysis of

3: interaction term

A: analysis of variance is the principle of

Analysis of variance principle

Hypothesis testing of the population mean, there are three cases:
1, compared with a population mean constant;
comparison between the overall mean 2, two;
3, a comparison between two or more population mean;

For the first two cases with Z distribution and the distribution of T will be able to quickly get hypothesis test results. If you compare the overall greater than three, they continue to use the comparison results can also be obtained, but need pairwise comparisons, time-consuming and labor-intensive.

In this case, a one-time analysis can compare the two and more than two population mean variance was used to see if there is a significant difference between them.

Commonly used methods include analysis of variance: ANOVA, multivariate analysis of variance, analysis of covariance, multivariate analysis of variance, repeated measures ANOVA, analysis of variance components.

Classified into three or more: determined using analysis of variance was significant
null hypothesis is: X1 = X2 = X3 no significance between

Second, one-factor analysis of variance, two-factor analysis of

2.1 Single-factor analysis of variance

cre = read.csv("creditcard_exp.csv",stringsAsFactors = F)
= na.omit increase (increase)

cre$edu = as.factor(cre$edu_class)
boxplot(avg_exp~edu_class,data=cre)
anova(lm(avg_exp~edu_class,data=cre))

## Data analysis here is creditcard_exp.csv credit card

## edu_class is education level

Do first boxplot ## may be substantially lower if the associated look

 

 More than 2.2 correlation factor

For example, the credit card table, will be associated with age and education

 

 Third, the interaction term

 

Guess you like

Origin www.cnblogs.com/hero799/p/11974706.html