[R] Fitting problem for Cox model with Strata as interaction term

2018-05-08 Thread wong jane
Dear All, I got a warning message "X matrix deemed to be singular" in Cox model with a time dependent coefficient. In my analysis, the variable "SEX" is a categorical variable which violate the PH assumption in Cox. I first used the survSplit() function to break the data set into different time i

Re: [R] Fitting problem

2010-09-27 Thread pj-uk
Updated! "MH"<-function(field,diameter,mu=10e-7,sig=0.1,Ms=100,chi=0){ #variables mu, sig, chi, Ms #input: field and diameter #all in CGS rho <- 5 kb <- 1.38e-16 t <- 300 length.d<-length(diameter) length.H<-length(field) M<-double(length.H) for (i in 1:length.H){ S

Re: [R] Fitting problem

2010-09-27 Thread Petr PIKAL
r-help-boun...@r-project.org napsal dne 27.09.2010 13:36:51: > > Oops I forgot to add another line to the code (see below)!! You could add I do not have the previous code, I do not keep mails. > some noise if you want to. Generating the data from the function was merely You want to add som

Re: [R] Fitting problem

2010-09-27 Thread pj-uk
Oops I forgot to add another line to the code (see below)!! You could add some noise if you want to. Generating the data from the function was merely a way to test if the fitting procedure works - I have experimental data that should allow me to calculate the parameters mu, sig, chi and Ms based

[R] Fitting problem

2010-09-27 Thread pj-uk
Hi, I have a function that generates a set of data but I am having problems determining the parameters using the nls fitting procedure. "MH"<-function(field,diameter,mu=10e-7,sig=0.1,Ms=100,chi=0){ #variables mu, sig, chi, Ms #input: field and diameter #all in CGS rho <- 5 kb <- 1.38e-16