我正在研究一个Cox模型,我有一个变成簇的变量。
以下是一些工作示例:
lung2=lung
lung2$age.cl = cut(lung2$age, c(40,50,60,70,80,90))
cox = coxph(Surv(time, status) ~ age.cl, data = lung2)
它返回此表:
coef exp(coef) se(coef) z p
age.cl(50,60] 0.184 1.202 0.297 0.62 0.536
age.cl(60,70] 0.237 1.267 0.288 0.82 0.411
age.cl(70,80] 0.532 1.703 0.309 1.73 0.085
age.cl(80,90] 3.926 50.707 0.825 4.76 2e-06
默认情况下,coxph
计算默认情况下第一个群集的所有内容。但是如果临床默认值是70-80岁而不是40-50岁呢?
如何告诉coxph将第n个群集作为默认群集?
答案 0 :(得分:1)
driver = webdriver.PhantomJS()
driver.maximize_window()
driver.get("http://www.betpawa.co.ke/upcoming")
element = WebDriverWait(driver, 10).until(
EC.presence_of_element_located((By.CSS_SELECTOR, "div.events-wrapper")))
driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
time.sleep(2)
soup = BeautifulSoup(driver.page_source.encode('utf-8'),"html.parser")
print len(soup.findAll("div", {"class":"prematch"}))