Displaying 20 results from an estimated 400 matches similar to: "coxph and robust variance estimation"
2007 Apr 24
1
Problem with length of array while calling C from R
Hello,
my problem is that I don't know how long must be an array of double while calling C from R.
R-Code:
> array <- c(1,1,1)
> save <- .C ( "Ctest" , a = array )
C-Code:
void Ctest ( double *array )
{ ...
array = (double*) realloc ( array , new_number * sizeof(double) ) ;
...
}
The length of "array" will be compute in C.
At the end save$a has a length
2005 Nov 28
6
How define global Variable?
Hello,
I try to define a global variable.
My example:
R> a <- "old"
R> test <- function () { a <- "new" }
R> test()
R> a # shoud be "new"
This doesn't work. I would like to modify the variable "a" in a
procedure. How can I do that.
Thank you for helping.
Sven Kn侟ppel (Germany-Berlin)
2009 Apr 15
2
AICs from lmer different with summary and anova
Dear R Helpers,
I have noticed that when I use lmer to analyse data, the summary function
gives different values for the AIC, BIC and log-likelihood compared with the
anova function.
Here is a sample program
#make some data
set.seed(1);
datx=data.frame(array(runif(720),c(240,3),dimnames=list(NULL,c('x1','x2','y'
))))
id=rep(1:120,2); datx=cbind(id,datx)
#give x1 a
2009 Jun 15
0
books on Time serie
A time series text with a title that seems designed to hide its
wide scope is:
Forecasting with Exponential Smoothing
The State Space Approach
Hyndman, R.J., Koehler, A.B., Ord, J.K., Snyder, R.D.
Springer 2009.
This book is actually an excellent overview of time series theory,
ARIMA as well as state space. It is of course, in part, a manual
for the forecast and other packages in what has been
2019 Apr 24
1
Bug in "stats4" package - "confint" method
Dear R developers,
I noticed a bug in the stats4 package, specifically in the confint method applied to ?mle? objects.
In particular, when some ?fixed? parameters define the log likelihood, these parameters are stored within the mle object but they are not used by the ?confint" method, which retrieves their value from the global environment (whenever they still exist).
Sample code:
>
2011 Oct 06
1
anova.rq {quantreg) - Why do different level of nesting changes the P values?!
Hello dear R help members.
I am trying to understand the anova.rq, and I am finding something which I
can not explain (is it a bug?!):
The example is for when we have 3 nested models. I run the anova once on
the two models, and again on the three models. I expect that the p.value
for the comparison of model 1 and model 2 would remain the same, whether or
not I add a third model to be compared
2018 Jan 17
1
Assessing calibration of Cox model with time-dependent coefficients
I am trying to find methods for testing and visualizing calibration to Cox
models with time-depended coefficients. I have read this nice article
<http://journals.sagepub.com/doi/10.1177/0962280213497434>. In this paper,
we can fit three models:
fit0 <- coxph(Surv(futime, status) ~ x1 + x2 + x3, data = data0) p <-
log(predict(fit0, newdata = data1, type = "expected")) lp
2012 Nov 15
1
Step-wise method for large dimension
Hi ,
I want to apply the following code fo my data with 400 predictors.
I was wondering if there ia an alternative way instead of typing 400 predictors for the following code.
I really appreciate your help.
fit0<-lm(Y~1, data= mydata)
fit.final<- lm(Y~X1+X2+X3+.....+X400, data=mydata) ???
step(fit0, scope=list(lower=fit0, upper=fit.final), data=mydata, direction="forward")
2023 Oct 24
1
by function does not separate output from function with mulliple parts
Colleagues,
I have written an R function (see fully annotated code below), with which I want to process a dataframe within levels of the variable StepType. My program works, it processes the data within levels of StepType, but the usual headers that separate the output by levels of StepType are at the end of the listing rather than being used as separators, i.e. I get
Regression results StepType
2018 Jan 18
1
Time-dependent coefficients in a Cox model with categorical variants
First, as others have said please obey the mailing list rules and turn of
First, as others have said please obey the mailing list rules and turn off html, not everyone uses an html email client.
Here is your code, formatted and with line numbers added. I also fixed one error: "y" should be "status".
1. fit0 <- coxph(Surv(futime, status) ~ x1 + x2 + x3, data = data0)
2. p
2009 May 11
1
Warning trying to plot -log(log(survival))
windows xp
R 2.8.1
I am trying to plot the -log(log(survival)) to visually test the proportional hazards assumption of a Cox regression. The plot, which should give two lines (one for each treatment) gives only one line and a warning message. I would appreciate help getting two lines, and an explanation of the warning message. My problem may the that I have very few events in one of my strata,
2011 May 08
1
anova.lm fails with test="Cp"
Here is an example, modified from the help page to use test="Cp":
--------------------------------------------------------------------------------
> fit0 <- lm(sr ~ 1, data = LifeCycleSavings)
> fit1 <- update(fit0, . ~ . + pop15)
> fit2 <- update(fit1, . ~ . + pop75)
> anova(fit0, fit1, fit2, test="Cp")
Error in `[.data.frame`(table, , "Resid.
2009 May 10
2
plot(survfit(fitCox)) graph shows one line - should show two
R 2.8.1
Windows XP
I am trying to plot the results of a coxph using plot(survfit()). The plot should, I believe, show two lines one for survival in each of two treatment (Drug) groups, however my plot shows only one line. What am I doing wrong?
My code is reproduced below, my figure is attached to this EMail message.
John
> #Create simple survival object
>
2004 Apr 27
0
Extracting labels for residuals from lme
Dear R-helpers,
I want to try to extract residuals from a multi-level
linear mixed effects model, to correlate with another
variable. I need to know which residuals relate to
which experimental units in the lme. I can show the
labels that relate to the experimental units via the
command
ranef(fit0)$resid
which gives:
604/1/0 -1.276971e-05
604/1/1 -1.078644e-03
606/1/0 -7.391706e-03
606/1/1
2006 Feb 27
1
help with step()
Folks:
I'm having trouble doing a forward variable selection using step()
First, I fit an initial model:
fit0 <- glm ( est~1 , data=all, subset=c(n>=25) )
then I invoke step():
fit1 <- step( fit0 , scope=list(upper=est~ pcped + pchosp + pfarm
,lower=est~1))
I get the error message: Error in eval(expr, envir, enclos) : invalid
'envir' argument
I looked at the
2006 Oct 18
1
MARS help?
I'm trying to use mars{mda} to model functions that look fairly
close to a sequence of straight line segments. Unfortunately, 'mars'
seems to totally miss the obvious places for the knots in the apparent
first order spline model, and I wonder if someone can suggest a better
way to do this. The following example consists of a slight downward
trend followed by a jump up after
2019 Dec 27
0
"simulate" does not include variability in parameter estimation
On 26/12/2019 11:14 p.m., Spencer Graves wrote:
> Hello, All:
>
>
> ????? The default "simulate" method for lm and glm seems to ignore the
> sampling variance of the parameter estimates;? see the trivial lm and
> glm examples below.? Both these examples estimate a mean with formula =
> x~1.? In both cases, the variance of the estimated mean is 1.
That's how
2019 Dec 27
2
"simulate" does not include variability in parameter estimation
Hello, All:
????? The default "simulate" method for lm and glm seems to ignore the
sampling variance of the parameter estimates;? see the trivial lm and
glm examples below.? Both these examples estimate a mean with formula =
x~1.? In both cases, the variance of the estimated mean is 1.
??? ??????? * In the lm example with x0 = c(-1, 1), var(x0) = 2, and
2019 Dec 27
1
"simulate" does not include variability in parameter estimation
On 2019-12-27 04:34, Duncan Murdoch wrote:
> On 26/12/2019 11:14 p.m., Spencer Graves wrote:
>> Hello, All:
>>
>>
>> ? ????? The default "simulate" method for lm and glm seems to ignore the
>> sampling variance of the parameter estimates;? see the trivial lm and
>> glm examples below.? Both these examples estimate a mean with formula =
>>
2009 May 29
1
Interface R <--> Processing
Dear Group members
I was wondering whether there is any interface to use processing (www.processing.org) to visualize R analyses?
If so could somebody point me to relevant ressources?
If not, are there any attempts to build such an interface / package?
Best Regards,
Simon
--
Nur bis 31.05.: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate und
Telefonanschluss nur 17,95 Euro/mtl.!*