search for: harwood262

Displaying 18 results from an estimated 18 matches for "harwood262".

2012 Jan 09
1
glmmPQL and predict
Is the labeling/naming of levels in the documentation for the predict.glmmPQL function "backwards"? The documentation states "Level values increase from outermost to innermost grouping, with level zero corresponding to the population predictions". Taking the sample in the documentation: fit <- glmmPQL(y ~ trt + I(week > 2), random = ~1 | ID, family =
2011 May 02
3
ID parameter in model
Hello, I am apparently confused about the use of an id parameter for an event history/survival model, and why the EHA documentation for aftreg does not specify one. All assistance and insights are appreciated. Attempting to specifiy an id variable with the documentation example generates an "overlapping intervals" error, so I sorted the original mort dataframe and set subsequent entry
2011 Dec 13
1
tcplot documentation in evd package
Hello, and please advise regarding any errors/omissions on my part. However, the documentation for R's tcplot function in the evd package appears to contain an error. I am using evd version 2.2-4 in R 2.14.0 with Windows XP. > data(portpirie) > mrlplot(portpirie) ## No Error > tlim <- c(3.6, 4.2) > tcplot(portpirie, tlim) ## Line from documentation Error in fpot(data, u[1],
2010 Jan 20
1
Line Plot with Dates on X-axis
I am trying to generate a line graph with quarterly time buckets (with nice labels) on the x-axis. The first block of code below will generate the graph with nicely formatted x-axis labels, but the "type=" and "col=" options are not recognized when factors are used for the x-axis. The second block, where the quarter values are mapped into dates, will plot the line nicely but
2011 May 08
1
Syntax for iter.max in rms
Hello, I would like to increase the number of iterations for running a Buckley-James regression model in the rms package, but something is apparently syntactically wrong. The following code initially is exactly as it appears in the help page (which runs successfully), then a "failure to converge" message (resulting from specifying an 'identity' link argument, the error message
2011 May 21
1
predict 'expected' with eha package
I am unsure what is being returned, and what is supposed to be returned, when using 'predict' with "type='expected'" for an aftreg survival model. The code below first generates a weibull model, then uses predict to create a vector of the linear predictors, then attempts to create the 'expected' vector, which is empty. The final two steps in the code generate a
2012 Jan 06
2
Dropping columns from data frame
How does R do it, and should I ever be worried? I always remove columns by index, and it works exactly as I would naively expect - but HOW? The second illustration, which deletes non contiguous columns, represents what I do all the time and have some trepidation about because I don't know the mechanics (e.g. why doesn't the column formerly-known-as-4 become 3 after column 1 is dropped:
2011 Jan 06
0
Set axis limits in mixtools plot
Hello, Can the x and y axis limits be specified in a density plot with the mixtools package for a finite mixture model? Uncommenting the xlim2/ ylim2 lines in the plot command below generates 'not a graphical parameter' warnings (and does not change the axis settings), and uncommenting the xlim/ylim lines generates a 'formal argument "ylim" matched by multiple actual
2010 Feb 12
1
Assign Name of Data Frame
Hello R Experts, How can I assign the name of a data frame with the argument of a function? Specifically I am using RODBC to build local dataframes from SAS datasets on a remote server. I would like the local dataframe have the same name as the source SAS dataset, and the function below is what I am developing. However, the "substitute(table)" on the left side of the assignment
2010 Nov 10
0
biglm and epicalc ROC curves
Hello list, I am trying to avoid "Rifying" some of my SAS code to generate ROC plots, and the logistic.display() and lroc() functions in the epicalc package do what I want. However, I must generate my logistic model with bigglm because I have 1) limited hardware, 2) ~2.5 million rows, and 4 categorical and 2 continuous independent variables. When I attempt to invoke epicalc's
2010 Dec 23
1
Reconcile Random Samples
Is there a way to generate identical random samples using R's runif function and SAS's ranuni function? I have assigned the same seed values in both software packages, but the following results show different results. Thanks! R === > set.seed(6) > random <- runif(10) > random [1] 0.6062683 0.9376420 0.2643521 0.3800939 0.8074834 0.9780757 0.9579337 [8] 0.7627319 0.5096485
2011 Sep 28
1
survexp with large dataframes
Hello, and thank you in advance. I would like to capture the expected survival from a coxph model for subjects in an observational study with recurrent events, but the survexp statement is failing due to memory. I am using R version 2.13.1 (2011-07-08) on Windows XP. My objective is to plot the fitted survival with the Kaplan-Meier plot. Below is the code with output and [unfortunately]
2008 Apr 07
2
basehaz and newdata
I am unable to get the basehaz function to apply a proportional hazards model to a new data frame. I replicated my specific situation with the example for coxph in the help, where I changed the x value of the first record from 0 to 1. Is there something incorrect in the syntax that I am using? Thanks in advance! test1 <- list(time= c(4, 3,1,1,2,2,3), status=c(1,NA,1,0,1,1,0),
2011 Jan 07
0
Error in x %*% coef(object) : non-conformable arguments
Hello, and thanks in advance! What does the error message "Error in x %*% coef(object) : non- conformable arguments" when indicate when predicting values for newdata with a model from bigglm (in package biglm), and how can I debug it? I am attempting to do Monte Carlo simulations, which may explain the somewhat interesting loop which follows. After the code I have included the output,
2009 Nov 06
1
Survival Plot in R 2.10.0
I would like to produce a complimentary log-log survival plot with only the points appearing on the graph. I am using the code below, taken from the plot.survfit page of help for the the survival package (version 2.35-7). I am running in R 2.10.0 on Windows XP, and the list of packages following the error is loaded. Is there some specific 'type= ' syntax, or an additional parameter that
2012 May 25
1
Multiple rms summary plots in a single device
I would like to incorporate multiple summary plots from the rms package into a single device and to control the titles, and also to open a new device when I reach a specified number of plots. Currently I am only getting a single "plot(summary(" graph in the upper left- hand corner of each successive device. However, in the rms documention I see instances of a loop being used with
2011 Apr 20
2
survexp with weights
Hello, I probably have a syntax error in trying to generate an expected survival curve from a weighted cox model, but I can't see it. I used the help sample code to generate a weighted model, with the addition of a "weights=albumin" argument (I only chose albumin because it had no missing values, not because of any real relevance). Below are my code with the resulting error
2011 Jan 10
1
debug biglm response error on bigglm model
G'morning What does the error message "Error in x %*% coef(object) : non- conformable arguments" indicate when calculating the response values for newdata with a model from bigglm (in package biglm), and how can I debug it? I am attempting to do Monte Carlo simulations, which may explain the loop in the code that follows. After the code I have included the output, which shows that