Dear list,
I am using the lrm function from the rms package to estimate a logistic
model with weights. The c-statistic (or area under the curve) is part of
the lrm output.
To understand how the weights enter the computation of the c-statistics, I
looked at the script of lrm and lrm.fit but I am o
Dear R users,
I have a list of vectors (list is called HTNlist). Each vector is of length
1 to 4 and takes only 0 and 1 as values. E.g.
head(HTNlist)
$`30008`
[1] 1 0 1 0
$`60008`
[1] 0 0 1 0
$`90008`
[1] 0 0 1 0
$`17`
[1] 1
$`130001`
[1] 0 1
$`130007`
[1] 1 0 1 0
I would like to obtain
in the formula is a compound like x4:x5 and you
> want x1:x4:x5 added you will need to do more work (look at the
> 'factors' attribute of terms()'s output) - currently it adds x1:x5.
>
>
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com
>
>
> > -Origina
Hi,
I have a list of formulae that I need to modify. For each formula, I need
to add an interaction term between the first independent variable and the
last one. I want to write a function to achieve that because the list of
formulae to modify is long.
For example, if the formula is y ~ x1 + x2 +
Hello everyone,
I want to do a meta-analysis of case-control studies on which an OR was
computed based on a continuous exposure. I have found several several
packages (metafor, rmeta, meta) but unless I misunderstood their main
functions, it seems to me that they focus on two-group comparisons (bi
Hi,
I have modified the USJudgeRatings data (available in R) to
illustrate my question.
# Use the first 4 variables of USJudgeRatings and add a group variable
with two levels
USJudgeRatings <- USJudgeRatings[,1:4]
USJudgeRatings$group <- factor(c(rep(1, 22), rep(0, 21)))
# I can draw a pairs gra
Hi,
I have a data set in which the variable 'dose' is time-varying. Currently,
the data set is in a long format, with 1 row for each time unit of follow-up
for each individual "Id". It looks like this:
orig.data <- cbind(Id = c(rep(1,4), rep(2,5)), time = c(1:4, 1:5), dose =
c(1,1,1,0,1,0,1,1,0)
Dear R users,
I have repeated measurements on individuals. I want to estimate the
time-varying effect of a factor variable X (taking three levels), e.g. a
model in the spirit of Hastie and Tibshirani (1993).
I am considering using the package "mgvc" which implements generalized
additive model
Dear R users,
I have repeated measurements on individuals. I want to estimate the
time-varying effect of a factor variable X (taking three levels), e.g. a
model in the spirit of Hastie and Tibshirani (1993).
I am considering using the package "mgvc" which implements generalized
additive models,
Dear R users,
I am writing my first R package and it finally past the R CMD check.
Before sending it to CRAN, I would like to check a few issues.
1. I created s4 classes and methods in the package but I want only 1
function (foo) to be available to users and documented in the manual
that goe
Hello R users,
I am trying to make a my first package and I get an error that I can
understand. The package is build out of three files (one for functions, 1
for s4 classes and 1 for s4 methods).
Once I source them I run
package.skeleton( name="TDC" )
within a R session and I get
Creating di
Dear R users,
I am currently writing a R package and to do so I am following the
guidelines in manual 'Writing R extensions'.
In Section 3.1, it is suggested to tidy up the code using a file
containing the following:
options(keep.source = FALSE)
source("myfuns..R")
dump(ls(all = TRUE), file = new
Dear R users,
I want to estimate a Cox PH model with time-dependent covariates so I am
using a counting process format with the following formula:
Surv(data$start, data$stop, data$event.time) ~ cluster(data$id) + G1 +
G2 + G3 + G4 + G5 +G6
Gs represent a B-spline basis functions so they s
Dear R users,
I am analysing a very large data set and I need to perform several data
manipulations. The dataset is so big that the only way I can play with it
without having memory problems (E.g. "cannot allocate vectors of size...")
is to write a batch script to:
1. cut the data into pieces
2.
Dear R users,
I was wondering if someone could suggest a few lines of code for my problem.
I want to count the number and the length of strings of NA in a vector.
For example:
vec <- c(1, 2, 1, NA, NA, 1, 2, NA, NA, NA, 3, 4, NA, NA)
has 2 strings of NA's of length 2 and 1 string of NA' of len
15 matches
Mail list logo