similar to: issues with calling predict.coxph.penal (survival) inside a function

Displaying 20 results from an estimated 200 matches similar to: "issues with calling predict.coxph.penal (survival) inside a function"

2008 Apr 14
2
Bug in ci.plot(HH Package) (PR#11163)
Full_Name: Yasuhiro Nakajima Version: 2.6.1 OS: WinXP SP2 Submission from: (NULL) (202.237.255.13) Dear all, I noticed the following behaviour of ci.plot in HH Package(ver.2.1-9): > library(HH) > data(women, package="datasets") > attach(women) > ft <- lm(height~weight) > windows() > ci.plot(ft,conf.level=0.95) > windows() > ci.plot(ft,conf.level=0.999) I
2008 Nov 24
1
Discrepancy in the PBC data set
The data set in R is wrong. I've found mistakes on 2 lines in a quick look. I don't know if the data is incorrect in the Appendix of Fleming and Harrington as well (someone seems to have borrowed my copy), which is where the data set appears to have been taken from, given all the "-9" codes in it. (Note, Tom Fleming originally got the data from me, so I'm fairly
2005 Jul 21
1
About object of class mle returned by user defined functions
Hi, There is something I don't get with object of class "mle" returned by a function I wrote. More precisely it's about the behaviour of method "confint" and "profile" applied to these object. I've written a short function (see below) whose arguments are: 1) A univariate sample (arising from a gamma, log-normal or whatever). 2) A character string
2012 Sep 16
1
trying to obtain same nls parameters as in example
Dear R-users; I'm working with a a dataset that was previously used to fit a nonlinear model of the form: Y ~ a * (1 + b * log(1 - c * X^d)) The parameters published elsewhere are: a = 1.758863, b = .217217, c = .99031, and d = .054589 However, there is no way I can replicate this result. I've tried several options (including SAS) w/o success. The data is: X <-
2009 Dec 03
0
Problem with predict() and factors
I am working on a script that takes numeric performance indicators and runs them against a series of regressors (dummy regressors, yes\no stuff via 0 and 1, e.g. Was is Christmas this week 0=no, 1=yes). The script is as follows (Written as a function): -- Begin Script -- doEnv <- function(HOUR,ENVNAME,REPORTNAME) { library(RODBC) library(forecast) library("geneplotter")
2011 Mar 20
3
manova question
Dear friends, Sorry for this somewhat generically titled posting but I had a question with using contrasts in a manova context. So here is my question: Suppose I am interested in doing inference on \beta in the case of the model given by: Y = X %*% \beta + e where Y is a n x p matrix of observations, X is a n x m design matrix, \beta is m x p matrix of parameters, and e is a
2007 Apr 17
3
Extracting approximate Wald test (Chisq) from coxph(..frailty)
Dear List, How do I extract the approximate Wald test for the frailty (in the following example 17.89 value)? What about the P-values, other Chisq, DF, se(coef) and se2? How can they be extracted? ######################################################> kfitm1 Call: coxph(formula = Surv(time, status) ~ age + sex + disease + frailty(id, dist = "gauss"), data = kidney)
2006 Jul 29
1
fancier plotting
Hi thank you for talking the time to help me with this. I have a sequence of numbers in a file and an equal sequence of various character, say(a b c d) each occurs more than once. I need to plot the numbers so that numbers corresponding to a in the other sequence would have green dots, those corresponding to b a red dot, nothing on c and blue square for d. i.e 2 a show a green dot 4 b show a
2007 Oct 01
4
Disentagling formulas
I am writing a program in which I would like to take in a formula, change the response (Y) variable into something else, and then pass the formula, with the new Y variable to another function. That is, I am starting with formula <- Y~X1+X2+X3 and I'd like to do something like Y <- formula$Y newY <- f(Y) lm(newY~X1+X2+X3) So far, it seems that my
2004 Oct 25
1
Ref: Variable scope or function behaviour or array reassign
Dear R- helpers Following a draft structure of the R script for which I am facing problem Step 1 x <- of type array with original values y <- of type array with original values Step 2 for (ctr in 1:10) { # my problem here the both x and y still show the original values from step 1 # in spite of making changes to the old values of the arrays x and y in the function function
2009 Mar 21
2
limiting simulated animal movement
Hi, I am trying to simulate animal movement in a gridded landscape made up of cells. At each time step (iteration), the animal moves from one cell to another in a random fashion. This is how I am simulating movement, where a and b are the x,y co-ordinates of the animal at the previous time step: for (i in 1:no.of.steps){ direction <- sample(1:8, 1) if(direction == 1){ a <- a b <- b -
2008 Jan 04
1
Plotting labeled impulses: label collision
Dear all, As you can see from the attachment I'm using R to automatically annotate peptide fragmentation mass spectra, which are represented by impulse plots. I'd like to poll you on approaches of how to deal as generally as possible with the two biggest annotation issues I run into: 1) very close annotated masses (impulses) with similar y-axis dimensions - resulting in overlapping labels
2006 Apr 17
0
autoscall the y-axis
Dear R users I need to auto scale the left y axis in the code below, so that when I scroll left or right the left y-axis scale changes to accumulate the range of the displayed data with in the max hight of the y-axis. also how can I make the crosshair horizontal since it is only vertical in this code. this code with a kind help from "Gregory (Greg) L. Snow Ph.D." just
2004 Oct 13
2
debugging non-visible functions
Hi, I would like to step-through a non-visible function. but apparently I don't know enough about namespaces to get that to work: > methods(predict) ... deleted lines ... [27] predict.rpart* predict.smooth.spline* [31] predict.survreg.penal* Non-visible functions are asterisked > debug(predict.rpart) Error: Object "predict.rpart" not found >
2003 Jan 29
3
multinomial conditional logit models
A multinomial logit model can be specified as a conditional logit model after restructuring the data. Doing so gives flexibility in imposing restrictions on the dependent variable. One application is to specify a loglinear model for square tables, e.g. quasi-symmetry or quasi-independence, as a multinomial logit model with covariates. Further details on this technique and examples with several
2009 Mar 15
0
Axes crossing at origin
Hi, I'm having a bit of trouble with the axes in my plots. I don't like the way R does not have them cross in the origin. Is there another plot/axis function? i tried using abline as suggested by someone from this list, but in my case this gives no satisfactory result, as the abline does sometimes lie on top of the y axis and sometimes not, depending on how i scale the image... #bild16
2006 Sep 22
4
Creating Movies with R
Dear All, I'd like to know if it is possible to create animations with R. To be specific, I attach a code I am using for my research to plot some analytical results in 3D using the lattice package. It is not necessary to go through the code. Simply, it plots some 3D density profiles at two different times selected by the user. I wonder if it is possible to use the data generated for different
2010 Aug 13
2
Unable to retrieve residual sum of squares from nls output
Colleagues, I am using "nls" successfully (2.11.1, OS X) but I am having difficulties retrieving part of the output - residual sum of squares. I have assigned the output to FIT: > > FIT > Nonlinear regression model > model: NEWY ~ PMESOR + PAMPLITUDE * cos(2 * pi * (NEWX - POFFSET)/PERIOD) > data: parent.frame() > PMESOR PAMPLITUDE POFFSET >
2007 Oct 03
2
Shading area under density curves
Hello, I have a question regarding shading regions under curves to display 95% confidence intervals. I generated bootstrap results for the slope and intercept of a simple linear regression model using the following code (borrowed from JJ Faraway 2005): > attach(allposs.nine.d) > x<-model.matrix(~log(d.dist,10))[,-1] > bcoef<-matrix(0,1000,2) > for(i in 1:1000){ +
2010 Aug 19
2
Can't read/write to _nonfi
Good afternoon, Hope you all have a wonderful day. I am glad to be here. Hope you could help me with the following errors that i have been trying to figure it all out since last week. I am using Splus from Insightful, and as i read, R and Splus are very similar. So hope you could help me. I have been continously received these error messages after i ran my small program for couple of