Amy
Amy

Reputation: 131

Number of Observations in Regression

How can i find out how many observations were used in a regression?

    model_simple <- as.formula("completion_yesno ~  ac + ov + UCRate + FirstWeek + LastWeek + DayofWeekSu + DayofWeekMo + DayofWeekTu + DayofWeekWe + DayofWeekTh + DayofWeekFr + MonthofYearJan + MonthofYearFeb + MonthofYearMar + MonthofYearApr +MonthofYearMay+ MonthofYearJun + MonthofYearJul + MonthofYearAug + MonthofYearSep + MonthofYearOct + MonthofYearNov")
clog_simple1 = glm(model_simple,data=cllw,family = binomial(link = cloglog))
summary(clog_simple1)

I have tried the fitted command which did not result in a concrete number of observations N

Upvotes: 5

Views: 8275

Answers (1)

MrFlick
MrFlick

Reputation: 206411

Use the built in nobs() function

nobs(clog_simple1)

Upvotes: 13

Related Questions