I´m trying to run a logistic joinpoint regression utilising the ljr package.
I´ve been using the forward selection technique to get the number of knots for
the analysis, but I´m uncertain as to my results and the interpretation. The
documentation is rather brief ( in the package and the stats
Dear all,
I´m having trouble getting a list of regression variables back into a
dataframe.
mydf - data.frame(x1=rnorm(100), x2=rnorm(100), x3=rnorm(100))
mydf$fac-factor(sample((0:2),replace=T,100))
mydf$y- mydf$x1+0.01+mydf$x2*3-mydf$x3*19+rnorm(100)
dlply(mydf,.(fac),function(df)
:
On Aug 9, 2010, at 7:51 AM, moleps wrote:
Dear all,
I´m having trouble getting a list of regression variables back into a
dataframe.
mydf - data.frame(x1=rnorm(100), x2=rnorm(100), x3=rnorm(100))
mydf$fac-factor(sample((0:2),replace=T,100))
mydf$y- mydf$x1+0.01+mydf$x2*3-mydf$x3*19
a-colnames(lo)
b-rownames(lo)
c-length(a)
e-character(0)
r-NULL
for (x in (1:c)){
d-rep(paste(a[1:c],b[x],sep= ))
e-paste(c(e,d))
t-lo[x,]
r-c(r,t)
names(r)-e
}
return(r)
}
ldply(dl,function(x) test(x))-g
g
Regards,
Moleps
On 9. aug. 2010
correction...
Col and rows were mixed up and loop only worked when rows were less than or
equal to number of columns
//M
test-function(a){
coef(summary(a))-lo
a-colnames(lo)
b-rownames(lo)
c-length(a)
e-character(0)
r-NULL
for (x in (1:length(b))){
Dear all,
Is it possible to impute a dataset and create a summary table with summary from
Hmisc and convert it to latex? I´m mostly familiar with cem and amelia hence
the example from the documentation in cem. The imbalance command is not exactly
what I was looking for...
library (cem)
Dear all,
I just received a file from a colleague in spss. The read.spss could not finish
the file due to an error (Unrecognized record type 7, subtype 18 encountered in
system file) so instead I converted the file using stat-transfer. Looking at my
data I see that most labels are in the
],labels=names(a[[i]]))
}
}
tre
Regards,
//M
On 25. aug. 2010, at 23.05, Bert Gunter wrote:
?attr
?attributes
-- Bert Gunter
On Wed, Aug 25, 2010 at 1:26 PM, moleps mole...@gmail.com wrote:
Dear all,
I just received a file from a colleague in spss. The read.spss could
glm(A~B+C+D+E+F,family = binomial(link = logit),data=tre,na.action=na.omit)
Error in `contrasts-`(`*tmp*`, value = contr.treatment) :
contrasts can be applied only to factors with 2 or more levels
however,
glm(A~B+C+D+E,family = binomial(link = logit),data=tre,na.action=na.omit)
runs fine
Dear all,
With the latest update of Hmisc I no longer have any problems with latex.
However using the ctable option produces latex code that at least on both the
miktex distribution at work and mactex distribution at home refuses to run due
to an extra blank line inserted between the
Dear all,
I´m trying to create multiple graphs on the same page, but they are all stacked
on top of each other.
My code:
par(mfrow=c(2,2))
a-list(levels(bar$h.r)[c(1,3,6)])
print(a)
lapply(a,function(x){
a-subset(bar,h.r==x)
with(a,cdplot(wh~Age,ylab=x))
#plot.new()
(bar,h.r==x)
with(a, cdplot(wh~Age,ylab=x))
#plot.new()
})
Regards,
//M
On 8. sep. 2010, at 03.37, David Winsemius wrote:
On Sep 7, 2010, at 8:02 PM, moleps wrote:
Dear all,
I´m trying to create multiple graphs on the same page, but they are all
stacked
Dear R´ers..
In this mock dataset how can I generate a logical variable based on whether
just tes or tes3 are NA in each row??
test-sample(c(A,NA,B),100,replace=T)
test2-sample(c(A,NA,B),100,replace=T)
test3-sample(c(A,NA,B),100,replace=T)
tes-cbind(test,test2,test3)
sam-c(test,test3)
Statistical Computing Facility
Department of Statistics
UC Berkeley
spec...@stat.berkeley.edu
On Thu, 3 Jun 2010, moleps wrote:
Dear R?ers..
In this mock
Dear R´ers,
How can I create one single factor variable from two variables incorporating
all possible combinations of the values??
test-sample(c(A,NA,B),100,replace=T)
test2-sample(c(E,F,A),100,replace=T)
tes-cbind(test,test2)
pseduocode:
r-function(test,test2)
r
AE
AF
AA
NAE
NAF
NAA
I´m trying to tease out the minimum value from a row in a dataframe where all
the variables are dates.
apply(canc[,vec],1,function(x)min(x,na.rm=T))
However it only returns empty strings for the entire dataframe except for one
date value (which is not the minimum date).
I´ve also tried
Appreciate it...
//M
On 5. juni 2010, at 20.11, Joshua Wiley wrote:
On Sat, Jun 5, 2010 at 10:22 AM, moleps mole...@gmail.com wrote:
thx.
It was only the first instance that was class date. The rest were factors.
So that explains it.
If I want to change the rest in vec into class date
Dear r-listers,
I need to pass a string to a function. However the length of the string is
dependent on the length of a vector.
b-length(h)
v-paste(rep(names(ts$a[,1:b,]),ts$a[,1:b,]),sep=)
Is it possible somehow to pass this as an argument to a function later on ?
Regards,
//M
Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
project.org] On Behalf Of moleps
Sent: Sunday, June 06, 2010 1:51 PM
To: r-help@r-project.org
Subject: [R] paste together
Dear listers,
Does anyone have any experience running marginal structural models in r or can
point me in the direction of any good tutorials on this?
Regards,
//M
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
Dear R´ers
I´m trying to get a summary table using latex and summary in the rms package
to no avail. I´m running R 2.10.1, Mac OS X snow leopard and I have the mactex
2009 distribution installed. Any obvious things I´m missing?
//M
options(digits=3)
set.seed(173)
sex -
2010, Erik Iverson wrote:
moleps wrote:
Dear R´ers
I´m trying to get a summary table using latex and summary in the rms
package to no avail. I´m running R 2.10.1, Mac OS X snow leopard and
I have the mactex 2009 distribution installed. Any obvious things I´m
missing?
file587f83cb.log
On 16. juni 2010, at 20.10, Kevin E. Thorpe wrote:
moleps wrote:
Dear R´ers I´m trying to get a summary table using latex and summary in the
rms package to no avail. I´m running R 2.10.1, Mac OS X snow leopard and I
have the mactex 2009 distribution installed. Any obvious things I´m
Dear All,
I´ve been trying to find an option to scatter3D from rcmdr to remove the
individual points from the plots but to no help so far. Removing the residuals
is easy, but I cannot find a similar point option. Is there such an option that
can be set to FALSE?
Best,
//M
Dear R´ers.
I´ve got a dataset with age and year of diagnosis. In order to age-standardize
the incidence I need to transform the data into a matrix with age-groups
(divided in 5 or 10 years) along one axis and year divided into 5 years along
the other axis. Each cell should contain the number
.)
Bert Gunter
Genentech Nonclinical Biostatistics
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of moleps
Sent: Monday, April 05, 2010 11:46 AM
To: r-help@r-project.org
Subject: [R] Data manipulation problem
Dear R´ers
include.lowest and right arguments to cut
age.factor - cut(age, breaks = seq(20, 90, by = 10),
include.lowest = TRUE)
year.factor - cut(year, breaks = seq(1950, 2000, by = 10),
include.lowest = TRUE)
table(age.factor, year.factor)
moleps wrote:
I
wrote:
On Apr 6, 2010, at 9:56 AM, moleps islon wrote:
OK... next question.. Which is still a data manipulation problem so I
believe the heading is still OK.
##So now I read my population data from excel.
No, you read it from a text file and providing the first ten lines
Dear all,
I was intrigued by the ctree command and wanted to check it out. I first ran
the demo with example(ctree) and did get the survival graphs in the end. Upon
doing this with my own data and yielding a Invalid operation on a survival
time I tried to rerun example(ctree) and now I also
Forgot to mention that the ctree command is from the party library.
//M
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented,
simply upgrading R to the latest
version and see if you get an error with the latest version of
'party'. My guess is that the error will go away.
On Wed, Apr 27, 2011 at 3:40 PM, moleps mole...@gmail.com wrote:
Forgot to mention that the ctree command is from the party library.
//M
Yup, thats the culprit. Thx.
//M
On 28. apr. 2011, at 18.36, Achim Zeileis wrote:
On Thu, 28 Apr 2011, moleps wrote:
sessionInfo yields the following:
OK, the Design package causes the problem here. When you load the Design
package, it provides a new Surv() and related methods
Dear all,
I´m specifying the fisher.exact test for use with summary.formula as follows:
u-function(a,b){
j-fisher.test(a)
p-list(P=j$p.value,stat=NA,df=NA,testname=j$method,statname=)
return(p)
}
However I´m also required to specify stat df.
Allright..Works like a charm. However I do believe that the prtest vector
should have been mentioned in the catTest or conTest option. Appreciate your
time and effort.
Best,
//M
On 6. jan. 2011, at 23.24, Erik Iverson wrote:
Does the prtest argument help when you actually use the 'print'
Is it at all possible to specify this so that different tests display different
parameters,
ie have the continous test display F, df and p while tes categorical test
display only P values?
sf1 - summary(trt~sex+ascites+age,data=ex,test=T,method=reverse,catTest=u)
print(sf1, prtest = P)
//M
Dear all,
I´m trying to get a output table for age and the summary of a and b, stratified
by epo as follows using summary.formula
h-data.frame(a=sample(c(A,NA),100,replace=T),b=sample(c(B,NA),100,replace=T),age=rnorm(100,50,25),epo=sample(c(Y,N),100,T))
library(rms)
Dear all,
Is there an implementation of Simon Makuch method of plotting the survival
function with time-dependent variables. I´m only able to find event.chart in
Hmisc for the purpose and I would prefer the Simon and Makuch method. I believe
stata has it implemented for this purpose, but I
Dear all,
Given
rr-data.frame(r1-rnorm(1000,10,5),r2-rnorm(1000,220,5))
How can I add a column (rr$p) for the joint probability of each r1 r2 pair?
I know how to add the column.. I just dont know how to compute the p value for
joint probabilities given the two samples.
//M
-data.frame(r1=-rnorm(1000,10,5),r2=-rnorm(1000,220,5))
with(rr,plot(r1,r2))
Best,
//M
On 31. jan. 2011, at 23.13, Peter Ehlers wrote:
On 2011-01-31 12:42, moleps wrote:
Dear all,
Given
rr-data.frame(r1-rnorm(1000,10,5),r2-rnorm(1000,220,5))
How can I add a column (rr$p) for the joint
:31 PM, moleps wrote:
My terminology is probably way off. I´ll try again in plain english.
I´d like to generate a scatter plot of r1 r2 and color code each pair
according to the probability of observing the pair given that the two
samples (r1 r2) are drawn from two independent normal
Yes-I did look through the CRAN view and could not find any package that
featured a function whereby an MRI set was transformed into Talairach or MNI
space.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
, moleps mole...@gmail.com wrote:
Dear r-listers,
I need to pass a string to a function. However the length of the string is
dependent on the length of a vector.
b-length(h)
v-paste(rep(names(ts$a[,1:b,]),ts$a[,1:b,]),sep=)
Is it possible somehow to pass this as an argument to a function
Dear all,
I did post this more or less identical mail in a follow up to another
question I posted, but under another heading. I try again, but now
under the correct header.
upon running this code (from the Hmisc library-latex function) I
believe the call to summary.formula is allright and
I have to program this from scratch or is it possible
to use an already existing function?
//M
qta- table(cut(age,breaks = seq(0, 100, by = 10),include.lowest =
TRUE),cut(year,breaks=seq(1950,2010,by=5),include.lowest=TRUE
On Mon, Apr 5, 2010 at 10:11 PM, moleps mole...@gmail.com wrote
to add
multiple columns based on another vector so I'd be very interested in
another more general approach.
//M
On Tue, Apr 6, 2010 at 9:41 PM, David Winsemius dwinsem...@comcast.net wrote:
On Apr 6, 2010, at 3:30 PM, David Winsemius wrote:
On Apr 6, 2010, at 9:56 AM, moleps islon wrote
I did.But could only find the citation-not an implementation.
On Tuesday, January 1, 2013, David Winsemius wrote:
On Dec 31, 2012, at 4:38 PM, moleps wrote:
Dear all,
Is there an implementation of Simon Makuch method of plotting the
survival function with time-dependent variables. I´m
Dear all,
Using the SetInternet2(TRUE) option works wonders with R in my sealed
down work-environment. However, I'd like to use RCurl and apparently
the proxy settings are not carried over. Is it possible to figure out
the proxy-IP and port number from R after invoking SetInternet2?
//M
:
On Mon, 31 Jan 2011, moleps islon wrote:
Dear all,
Using the SetInternet2(TRUE) option works wonders with R in my sealed
down work-environment. However, I'd like to use RCurl and apparently
the proxy settings are not carried over. Is it possible to figure out
the proxy-IP and port number from R
Dear all,
Is there a package that allows me to run a sensitivy analysis on a
matched dataset created using MatchIt? I am aware of both rbounds and
the sensitivy function in the twang package but they do not allow
matched objects from MatchIt as input.
//M
I need to analyze multiple T1 contrast enhanced MRI studies from different
patients. They are all in DICOM format. I see that there are different
packages for loading individual studies in DICOM format, however I have had
limited luck so far researching how the different studies can be tranformed
50 matches
Mail list logo