R survminer 95%CI estimation method - r

A vendor that we work with is attempting to replicate my KM estimates/curves, including 95%CIs. I code in R while they code in SAS. I am using the survminer package in R and the surv_median function to derive my 95%CIs. They will be utilizing the PROC LIFETEST procedure.
I tried searching through the package documentation (link: survminer documenation) but couldn't find anything useful.
Any assistance determining the CI estimation methodology is greatly appreciated.

Related

Difference between brglm & logistf?

I am currently fitting a penalized logistic regression model using the package logistf (due to quasi-complete separation).
I chose this package over brglm because I found much more recommendations for logistf. However, the brglm seems to integrate better with other functions such as predict() or margins::margins(). In the documentation of brglm it says:
"Implementations of the bias-reduction method for logistic regressions can also be found in thelogistf package. In addition to the obvious advantage ofbrglmin the range of link functions that can be used ("logit","probit","cloglog"and"cauchit"), brglm is also more efficient computationally."
Has anyone experience with those two packages and can tell me whether I am overlooking a weakness in brglm, or can I just use it instead of logistf?
I'd be grateful for any insights!

pgmm function and gmm function in R

I have a very basic question regarding these two functions in R.
When I try to do panel data analysis using generalised moment method, I realised that both gmm and pgmm are functions for this method. What is the difference between them? Should I use pgmm one instead of gmm for panel data(I would like to do difference GMM estimation)?
Thank you in advance!
If you are doing panel analysis, you should use pgmm. It is part of the plm package for R, which is a comprehensive package for panel data econometrics.
I assume the gmm function you refer to is from the package of the same name. It is developed for cross-section GMM estimation, not panel data.

hybridEnsemble package in R

I want to build a Bagged Logistic Regression Model in R. My dataset is really biased and has 0.007% of positive occurrences.
My thoughts to solve this was to use Bagged Logistic Regression. I came across the hybridEnsemble package in R. Does anyone have an example of how this package can be used? I searched online, but unfortunately did not find any examples.
Any help will be appreciated.
The way that I would try to solve this is use the h2o.stackedEnsemble() function in the h2o R package. You can automatically create more balanced classifiers by using the balance_classes = TRUE option in all of the base learners. More information about how to use this function to create ensembles is located in the Stacked Ensemble H2O docs.
Also, using H2O will be way faster than anything that's written in native R.

Different between functions and regression models in R?

I'm really confused about regression models and functions in R. Here is my problem. I'm using the PLS package to make a model like Y~x. To do that I have to use 'plsr':
model=plsr(Y~X,ncomp=10,data=df1,center=TRUE, scale=TRUE, validation="LOO")
I couldn't find the source of the 'plsr' in the PLS source code but in the help document it says it refers to 'mvr{pls}' which I could find it. first is 'plsr' a function or model.. in the R terminology? is it built in R? and how does it refer to 'mvr' function in pls package?
Thanks

standard errors in R psoptim

I am working on estimating a non-linear function. I am using the optim and Rsolonp packages to do so and I am able to obtain the standard errors of my estimated parameters by using the Hessian that these functions calculate. As my problem seems to be a quite non-smooth one I found out that I can use the psoptim package. Nevertheless, I cannot figure out how I can obtain a Hessian using this package. Any help would be much appreciated.

Resources