Log partial likelihood of a Cox Model - r

I need to use Cox's partial likelihood method to establish a Cox's proportional hazards regression model with the significant predictors of my model.
I am wondering if the coxph() function in R does this automatically or if there is a special function which can?
I found the following function in the link below, but I cannot seem to find a package that contains it:
https://www.rdocumentation.org/packages/survcomp/versions/1.22.0/topics/logpl

Related

GARCH model augmented with exponential part

I am currently working on univariate GARCH models with different specifications and got stuck on including the exponential term in the variance equation:
mean model (setting ω4 = 0)
variance model
I am using the rugarch package in R and (unsuccessfully) tried the 'eGARCH' model type and external regressor option for the recession dummy INBER to get the estimates. Is this generally the correct way for including the exponential part or am I completely off?

How to run a weighted Cox regression model

I'm trying to run a weighted Cox regression model but none of the resources I found were actually useful to figure out how to do that.
Basically, I just want to run the model specified below, but weighted.
coxph(Surv(df$outcome)~df$treatment)
Apparently the coxphw function is the way to do this, but I cannot figure out the necessary specifications to actually make that function run.
The 'template' option of the coxphw determines which type of (weighted) estimation of Cox regression is requested. You can choose "AHR" for estimation of average HRs or "ARE" for estimation of average regression effects and "PH" for unweighted Cox proportional hazards regression. Check the ref manual for more details.
Hope it helps

How to find the best fitted models using the forward ,backward and the stepwise selection in poisson regression using R programming?

I am using regsubsets method for linear regression and came across step() method for selecting columns for logistic regression methods.
I am not sure whether we can use regsubsets or steps for Poisson regression. It will be helpful if there is a method to find the best subsets for Poisson regression in R programming.
From here it looks like
step() (base R: works on glm objects -> includes Poisson regression models)
bestglm package
glmulti package
Possibly others.
Be prepared for the GLM (Poisson etc.) case to be much slower than the analogous problem for Gaussian responses (OLS/lm).

Using Huggingface pretrained bert-uncased model for regression. However, the predict method returns logit

I am using TFAutoModelForSequenceClassification for regression. Training and evaluation looked correct. However, the predict method returned logits. How do I transform the logits to regression values that I care about?
The code I used to train the model

Is there Hurdle model function for GAMM on R?

I am working with a dataset that is zero inflated and I found a function that allows me to do a GLMM with the glmmadmb function. But, I realized that my data are not linearly related with the environmental variables I want to test, this is why I am looking for a GAMM instead of a GLMM.
Does anyone know which function can replace glmmadmb for a GAMM ?

Resources