问题标签 [parametric-equations]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
21 浏览

r - Survival analysis in R

I am trying to build a survival model on a dataset which has large number of covariates (~250). I used a Proportional Hazards model, and used the following formula:

I have created X using as.matrix() function on the train_df dataframe and excluding some columns using select. I wanted to know if this the correct way to define the formula or there exists a betterway to do this? I also noticed in summary of the param object that each covariate had an 'X' subscript.

I am also getting an error when I run the predict function:

The predict function returns the same number of rows as the train_df instead of the test_df. Any help would be greatly appreciated.

0 投票
0 回答
21 浏览

plot - xarray DataArray 有没有办法处理可变长度数组

本质上是试图用轨迹中不同数量的点来表示散点图,例如 3 条轨迹 y1,y2,y3 表示“y=f(x,z)”,但 x 的大小并不完全相同。问题是如何将 s 表示为 xarray DataArray。我的尝试导致错误“数据和暗淡的维数不同:0 vs 3”请注意以下示例中 x1 和 x2 的长度不同