2017.4.1-morning

本文记录了作者在教室上课的一天,详细描述了上课的情景。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

今天上午在教室上课

转载于:https://www.cnblogs.com/bgd140206202/p/6655815.html

df head(df) sleep_hours1 <- df$When.have.you.usually.gone.to.bed.in.the.past.month. sleep_hours2<-df$What.time.have.you.usually.gotten.up.in.the.morning.in.the.past.month. fall_asleep_time <- df$How.long.has.it.taken.you.to.fall.asleep.each.night.in.the.past.month. var1<-df$Cannot.get.to.sleep.within.30.minutes var2<-df$Wake.up.in.the.middle.of.the.night.or.early.morning var3<-df$Have.to.get.up.to.use.the.bathroom var4<-df$Cough.or.snore.loudly var5<-df$Feel.too.cold var6<-df$Feel.too.hot var7<-df$Have.bad.dreams var8<-df$Have.pain disturbance_vars <- cbind(var1, var2, var3, var4, var5, var6, var7, var8) colnames(disturbance_vars) <- c("Cannot get to sleep within 30 minutes", "Wake up in the middle of the night or early morning", "Have to get up to use the bathroom", "Cough or snore loudly", "Feel too cold", "Feel too hot", "Have bad dreams", "Have pain") disturbance_vars gender <- as.factor(df[["Gender"]]) gender X <- data.frame( fall_asleep_time, sleep_hours1, sleep_hours2, disturbance_vars, gender ) s1<-df$You.have.to.submit.an.assignment.in.less.than.a.day s2<-df$A.week.before.exams s3<-df$Asking.for.an.extra.ketchup.packet.at.a.restaurant s4<-df$Meeting.a.new.person s5<-df$Asking.for.help s6<-df$Confronting.someone s7<-df$Doing.something.without.help stress_cols <- cbind(s1,s2,s3,s4,s5,s6,s7) colnames(stress_cols) <- c("You have to submit an assignment in less than a day", "A week before exams", "Asking for an extra ketchup packet at a restaurant", "Meeting a new person", "Asking for help", "Confronting someone", "Doing something without help") stress_scores <- rowMeans(stress_cols) Y <- ifelse(stress_scores > median(stress_scores), 1, 0) Y model <- glm( Y ~., data = X, family = binomial(link = "logit") ) summary(model) step_model <- step( model, direction = "both", trace = 1 ) summary(step_model) 这是我的数据,然后我每次都会出现[.data.frame`(model_data, , rn, drop = FALSE):这个错误
06-05
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值