Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Multiple Regression and Binomial Regression Sample
#Linear and multiple Regression data(iris) str(iris) head(iris) attach(iris) Fit=lm(Petal.Length~Sepal.Length) summary(Fit) plot(Petal.Length~Sepal.Length) Fit2=lm(Petal.Length~. , data=iris) summary(Fit2) Fit3=lm(Petal.Length~. -Species, data=iris) summary(Fit3) #Logistic Regression data(mtcars) str(mtcars) library(ggplot2) attach(mtcars) ggplot(mtcars, aes(wt, am))+geom_point()+stat_smooth(method="glm", method.args=list(family="binomial"), se=FALSE)+ggtitle ("Sigmoid Curve Sample") Binom=glm(am~wt, family=binomial(link='logit')) summary(Binom) #Probability of Y happening if X is hp=120, wt=2.8 newdata=data.frame(hp=120, wt=2.8) predict(Binom, newdata, type="response") #Multiple Regression library(MASS) library(car) library(lmtest) str(mtcars) names(mtcars) attach(mtcars) head(mtcars) Mod=lm(mpg~wt+hp+qsec+cyl) plot(Mod) #Normality of Residuals shapiro.test(Mod$residuals) #Homoesdacity of residuals ncvTest(Mod) #Autocorrelation dwtest(Mod) pairs(mtcars)
run
|
edit
|
history
|
help
0
19-08-2020-GaussSeidelSistema-menos-calc
Ass2 q2
Graficos
Mann Whitney wilcoxon test
R
Análise de Variâncias DIC e teste de Tukey 2
Hello, world!
T4_EX01_9436451
Are the items of a vector in a given data frame? (Filtering basics)
MSS PS: Introduction to R