r - glm summary not giving coefficients values -


i'm trying apply glm on given dataset,but summary(model1) not giving me correct output , it's not giving coefficient values estimate std. error z value pr(>|z|) etc, it's giving me na output individual attribute element.

text <- c('learned new concept today : metamorphic testing.  t.co/0is1ius3aw','bmc bioinformatics biomed central: detecting novel ncrnas experimental #rnomics not easy task... http:/t.co/ui3unxpx #bing @myen','bmc bioinformatics biomed central: small #rna regulatory function scientific ... detecting novel… http:/t.co/wwhoekr0vc #bing','true or false? link(#addition, #classification) http:/t.co/zmjutft8iq #oxytocin','biologists have sense of humor, computational bio people http:/t.co/wfzqaafy') name <- c('qsoft consulting','fabrice leclerc','sungsam gong','frederic','zach stednick') screen_name <-c ('qsoftconsulting','rnomics','sunggong','rnomics','jdwasmuth') followers_count <- c(734,1900,234,266,788) retweet <- c(1,3,5,0,2) friends_count <-c(34,532,77,213,422) statuses_count <- c(234,643,899,222,226) favourites_count <- c(144,2677,445,930,254)  df <- data.frame(text,name,screen_name,retweet,friends_count,statuses_count,favourites_count) mydata<-df mydata$favourites_count <- ifelse( mydata$favourites_count >= 445, 1, 0)  #converting fav_count binary values 

splitting data

library(caret) split=0.60 trainindex <- createdatapartition(mydata$favourites_count, p=split, list=false) data_train <- mydata[ trainindex,] data_test <- mydata[-trainindex,] 

glm model

library(e1071) model1 <- glm(favourites_count~.,family = binomial, data = data_train) summary(model1) 

i want p value further analysis far think code right, how can correct output?

a binomial distribution work if dependent variable has 2 outcomes. should consider poisson distribution when dependent variable count. see here more details: http://www.statmethods.net/advstats/glm.html


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -