Kaplan Meier curve - curve

I'm working on survival analysis from my dataset.
My question is :
Is there a function in survminer or ggplot package that make the survival curve style look like Stata output (as if it's created by stata software)?
Thanks in advance.

Related

Confidence interval with statsmodels is not displayed correctly

I would like to display the confidence intervals (not the predictions) on my linear regression model. I used the code that is given below.
confidence interval code
It seems to me that this code does not work when there are few points. How to get continuous lines at the intervals on the figure (the link is below)?
Thank you in advance for your answers.
Picture results : Intervalle de confiance régression linéaire

python curve fitting optimization GUI

I'm new to programming but i have to do a project in python which is about to make a GUI for curve fitting. My inputs are the data points and the functions that should be fitted. The method of fitting is suggested to be chooseable for example least squares method or other fitting methods in the GUI. My problem is when i find some decent resource i get an error code when installing some packages that will be used. I use anaconda for python. My question is where should i start this project ? Could you guys suggest some decent resource for this kind of problem?
Thanks,
Adam
I have several of these done with different GUI frameworks, all have curve fitting and surface fitting with plots of fitted curves and surfaces. All have the same functionality, and should make a good example for a similar project. My personal recommendation is tkinter.
https://github.com/zunzun/tkInterFit (tkinter)
https://github.com/zunzun/wxPythonFit (wxpython)
https://github.com/zunzun/pyQt5Fit (pyqt5)
https://github.com/zunzun/pyGtkFit (pygtk)

Writing a Gaussian Radial Basis Function in Mathematica?

How could I start to write a Gaussian Radial Basis Function in Mathematica? Please provide coding as references if possible. I have already tried but I still could not run it. Please show some guide to help me run it.
Without more details, it's impossible to give any better answer than this.
GaussionRadialBasis[x_Real, parameter_Real:1] := Exp[-parameter*x^2];

Algorithm of ellipse fitting in OpenCV

I read the code of ellipse fitting in OpenCV, the following link gives the source code of ellipse fitting in OpenCV: http://lpaste.net/161378.
I want to know some details about ellipse fitting in OpenCV, but I can not find any documents of the algorithm. In the comments, it said " New fitellipse algorithm, contributed by Dr. Daniel Weiss". But I can not find any paper about ellipse fitting of Dr. Daniel Weiss.
I have some questions of the algorithm:
Why does the algorithm need re-fit. It first fit for parameters A - E, and then re-fit for parameters A - C with those center coordinates.
Ellipse need the satisfy the constraint of 4*a*b - c^2 > 0, how does the algorithm satisfy it?
I'm wondering about this myself since I've discovered that the algorithm is bugged. See this bug-report: https://github.com/Itseez/opencv/issues/6544
I tried to find any relevant papers by Dr. Daniel Weiss and failed.
You might find this repo useful (with pip set-up):
https://github.com/bdhammel/least-squares-ellipse-fitting
which works from an upgrade to the Fitzgibbon algorithm (as a starting point), as authored by Halir here:
https://github.com/bdhammel/least-squares-ellipse-fitting/blob/master/media/WSCG98.pdf
I've since tested this a little and seems to be very effective. Note that the 'example' on the repo home page is out of date -- look to the example.py module in the code itself for usage that seems to work as to module imports, etc.
The documentation of the OpenCV function cv::fitEllipse mentions this paper:
Andrew W Fitzgibbon and Robert B Fisher. A buyer's guide to conic fitting. In Proceedings of the 6th British conference on Machine vision (Vol. 2), pages 513–522. BMVA Press, 1995.
Also related link: OpenCV Ellipse fitting: extract parameters.

Plugin to control NURBS to mesh curve divisions

I've written a few plugins using C# and I'm familiar with Python, however I find the documentation in the SDK very difficult to understand. My previous plugins that I've written are largely based on modifications to collections of sample code.
Using Rhino3d, I'd like more control over how it meshes curves. I'd like to control the number of mesh vertex divisions on a curve/arc using my algorithm based on the angle and radius of the curve. I actually already have a plugin that calculates the number of divisions (range) to use.
Currently I am forced to export it into ANSYS APDL (where I can directly specify divisions by selecting each line), meshing, then importing back to rhino.
in fact mesh is a graph and Ansys can handle graphs, but Ansys SDK is tricky... as a beginner check this posts:
http://sysmagazine.com/posts/140397/
alyms-alis.blogspot.ch/2013/01/integration-c-and-module-of-ansys.html
meshing is a science itself. There are some algorithms and approaches which are working fine and found implementation as http://www.mi.fu-berlin.de/en/math/groups/ag-geom/publications/db/KNP07-QuadCover.pdf

Resources