Hi all,
I am trying to detect association between a covariate and a disease outcome
using R. This covariate shows time-varying effect, I add a time-covariate
interaction item to build Cox model as follows:
COX -
coxph(as.formula(Surv(TIME,outcome)~eGFR_BASE+eGFR_BASE:TIME),ori.data);
Hello !
I am attempting to switch from being a long time SAS user to R, and would
really appreciate a bit of help ! The first thing I do in getting a large
dataset (thousands of obervations and hundreds of variables) is to run a SAS
command PROC CONTENTS VARNUM command - this provides me a table
Hello,
I have tried reading the documentation and googling for the answer but
reviewing the online matches I end up more confused than before.
My problem is apparently simple. I fit a glm model (2^k experiment), and then I
would like to predict the response variable (Throughput) for unseen
On Dec 26, 2011, at 3:02 AM, JiangGZ wrote:
Hi all,
I am trying to detect association between a covariate and a disease
outcome using R. This covariate shows time-varying effect, I add a
time-covariate interaction item to build Cox model as follows:
COX -
Hi, I'm quite new to R (1 month full time use so far). I have to run loop
regressions VERY often in my work, so I would appreciate some new
methodology that I'm not considering.
#-
Error in `[.data.frame`(x, order(x, na.last = na.last, decreasing =
decreasing)) :undefined columns selected during the execution of
following r sequence of commands
X-subset(data,select=c(V1,V2,V3,V4,V5,V6,V7,V8,V9))
y-subset(data,selcet=10)
Data = list(y=y, X=X, p=.75)
Prior =
Hi,
This might be due to the fact that factor levels are arbitary unless
they are ordinal, even that quantitative relationships between levels
are unclear. Therefore, the model has no way to predict unseen factor
levels.
Does it make sense to treat 'No_databases' as numeric instead of a
factor
You can get the ols coefficients with basic matrix operations as well (
https://files.nyu.edu/mrg217/public/ols_matrix.pdf) and by that avoid one
of the loops. I do not know how efficient this is but I have attached an
example you can paste bellow your code. Here, one x-array is used as a
right
Hello, iliketurtles (?),
for whatever strange reasons you want to regress all y-columns on all
x-columns, maybe
reg - apply( x, 2, function( xx) lm( y ~ xx))
do.call( cbind, lapply( reg, coef))
does what you want. (To understand what the code above does, check the
documentation for lm(): If
Giovanni Azua bravegag at gmail.com writes:
Hello,
I have tried reading the documentation and googling for the answer but
reviewing the online matches I end up
more confused than before.
My problem is apparently simple. I fit a glm model (2^k experiment), and then
I would like to
Dear anonymous:
1. You may be more likely to get useful tips on this list if you
sign with your real name. It's friendlier.
2. If you are using R 14 hours/day. get and read a good R book. The
CRAN site or Amazon lists many; choose one or more that suits your
needs.
3. Read the R Help files
Hi Ben,
Yes thanks you are right, I was able to fix it but first I had to fix the data
frame over which I built my model to use numeric for those and then making the
grid values also numeric it finally worked thanks!
Thank you for your help!
Best regards,
Giovanni
On Dec 26, 2011, at 4:57 PM,
I have the adjacency matrix of a graph. I'm trying to find all
triangles (embeddings of C_3). This doesn't work:
index = function(l) seq(l)[l]
pairs = do.call(rbind, lapply(seq(nrow(adj)), function(x) cbind(x,
index(adj[x,]
triangles = do.call(rbind, apply(pairs, 1, function(x) cbind(x,
?plyr::summarise seems pretty helpful to me. If you can do better,
please submit a patch - they are very much appreciated.
My failure to find it stemmed from it not being mentioned in any way in
package reshape2's help files, but maybe I was mistaken that it was meant to
be used in that
Thanks for the advice everyone. All very helpful.
@Bert
Added my information to signature, thanks.
-
Isaac
Research Assistant
Quantitative Finance Faculty, UTS
--
View this message in context:
http://r.789695.n4.nabble.com/Other-ways-to-lm-regression-non-loop-tp4234487p4235654.html
It would be very helpful to have an actual sample of your data.
As usual in R there are probably several different ways to approach the problem
but a small sample of the data or a mock-up would be most helpful.
Probably the easiest way to supply some data would be something like
df1 -
Hello,
I am having a problem with the zero-inflated negative binomial (package
pscl). I have 6 sites with plant populations, and I am trying to model the
number of seeds produced as a function of their size and their site. There
are a lot of zero's because many of my plants get eaten before
Hi,
I hope this isn't a really simple question, I've been struggling with it
for a while.
I'm looking for a way to get a function to go through a data frame line by
line, compare fields, and produce a result, kind of a transform and an if
statement combined (I tried to put them together and it
Hi Eric,
Try
# data
x - structure(list(House_number = 1:4, Inspected = structure(c(3L,
4L, 1L, 2L), .Label = c(10/31/2011, 8/3/2011, 9/2/2011,
9/4/2011), class = factor), Sold = structure(c(1L, 2L, 4L,
3L), .Label = c(10/10/2011, 10/20/2011, 11/1/2011, 8/28/2011
), class = factor)), .Names =
On 11-12-26 5:44 AM, sparandekar wrote:
Hello !
I am attempting to switch from being a long time SAS user to R, and would
really appreciate a bit of help ! The first thing I do in getting a large
dataset (thousands of obervations and hundreds of variables) is to run a SAS
command PROC CONTENTS
On Dec 26, 2011, at 7:52 PM, Eric Wolff wrote:
Hi,
I hope this isn't a really simple question, I've been struggling
with it
for a while.
I'm looking for a way to get a function to go through a data frame
line by
line, compare fields, and produce a result, kind of a transform and
an if
Dear R users,
I am looking for a package in R that will simulate binary time series
given some known value for the Hurst exponent. I see that the package
FGN allows for simulation of fGn, but it does not seem that parameters
other than sequence length and H can be manipulated. What I want to do
On Dec 26, 2011, at 5:44 AM, sparandekar wrote:
Hello !
I am attempting to switch from being a long time SAS user to R, and
would
really appreciate a bit of help ! The first thing I do in getting a
large
dataset (thousands of obervations and hundreds of variables) is to
run a SAS
Melissa Aikens mla2j at virginia.edu writes:
I am having a problem with the zero-inflated negative binomial (package
pscl). I have 6 sites with plant populations, and I am trying to model the
number of seeds produced as a function of their size and their site.
[snip]
Anyways, the code I
Hi
Can you explain rules for propagating values? I do not see any pattern.
Only when there is no Y in a line you want to fill all columns with either
T1D_noc or Ctrl_noc based on t1d_ptype.
I would start with narrowing the levels in last column as it seems to me
there is no difference between
Dear All,
I have found differences between glmnet versions 1.7 and 1.7.1 which, in
my opinion, are not cosmetic and do not appear in the ChangeLog. If I am
not mistaken, glmnet appears to return different number of selected
input variables, i.e. nonzeroCoef(fit$beta[[1]]) differes between
26 matches
Mail list logo