1 Q-Q图

1.1 正态qq图

Code
ggplot(iris,aes(sample = Sepal.Length))+
    stat_qq(distribution = qnorm , 
            dparams = list(mean=mean(iris$Sepal.Length),
                            sd=sd(iris$Sepal.Length)))+
    stat_qq_line()

1.2 泊松qq图

Code
ggplot(iris,aes(sample = Sepal.Length))+
    geom_qq(distribution = qpois , 
            dparams = list(lambda=mean(iris$Sepal.Length)) )+
    geom_qq_line()

Back to top