Displaying 20 results from an estimated 10000 matches similar to: "mitools, multiple imputation"
2008 Oct 16
1
apply, t-test and p-values
R 2.7.2
Windows XP
I am using apply to compute a series of Student's t-test from two matrices, sample1 and sample2.
boo<-apply(sample1,1,t.test,sample2)
I want to pick of the p-values from the tests, but can't seem to get it to work. I have tried several methods to get the values including:
boo<-apply(sample1,1,t.test$t.test,sample2)
boo<-apply(sample1,1,t.test,sample2)$t.test
2009 Aug 29
1
Rcmdr installalation under Viata gives a warning. Do I need to do anything?
Windows Vista
R 2.9.1
When trying to install Rcmdr I get the message shown below. What does it mean, do I need to do anything?
The downloaded packages are in
C:\Users\John Sorkin\AppData\Local\Temp\RtmpRCLbhe\downloaded_packages
updating HTML package descriptions
Warning message:
In file.create(f.tg) :
cannot create file 'C:\PROGRA~1\R\R-29~1.1/doc/html/packages.html', reason
2006 Jul 10
1
How can I obtain the values of BIAS and STD. ERROR from a bootstrap.
R 2.3.1
Windows XP
Question: How can I obtain the values of BIAS and STD. ERROR from a
bootstrap.
Background:
I am running a bootstrap:
result2<-boot(1:400,regSEvssample,R=5000)
and obtain the following results:
Bootstrap Statistics :
original bias std. error
t1* 1.876602 -0.0001368616 0.1630380
I would like to get the values of ORIGINAL and BIAS. I can get the
value of
2007 Aug 02
1
Multivariable correlation
Given a square matrix of variables X, is there any way to compute a multivariable correlation among all the variables in the array? It is possible to calculate the correlation of all pairs of variables in the array, but I want to know the correlation of all the variables taken together, i.e. for the matrix
X=x1 x2 x3
x4 x5 x6
x7 x8 x9
I don't want the pair-wise correlations
2006 Nov 13
1
Creating data for logistic regression and Cox proportional hazards regression
I know that mvrnorm from MASS (generously provided by Profs. Venables
and Ripley) can be used to generate multivariable normal data that can
be used in a linear regression with certain desired characteristics
(e.g. a given mean for each variable as well as a given
variance-covariance pattern). Is there any similar facility that can be
used to generate data for (1) a logistic regression and (2) a
2006 Nov 21
2
sample size for linear regression
Is there an R function that can be used to calculate a sample size for a
linear regression:
i.e.
Given a linear regression:
y=f(x,z)
i.e. fit1<-lm(y~x+z)
is there a function which can be passed coef(z), SE(z), and other
parameters to determine a sample size based on z, SEz and other
information from the regression?
Thanks,
John
John Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
2024 Jan 06
0
Amelia. Imputation of time-series data
Colleagues,
I have started working with Amelia, with the aim of imputing missing data for time-series data.
Although I have succeeded in getting Amelia to perform the imputation, I have not found any documentation describing how Amelia imputes time-series data. I have read the basic Amelia documentation, but it does not address how time-series data are imputed. The documentation describes
2009 Jan 20
1
Odd behaviour of subset indexing (x:y).
R 2.8.1
windows XP
I don't understand the output from x[iS+1:iE] produced by the code below:
x = c(1,2,3,4,5)
x
[1] 1 2 3 4 5
iS=2 # start position
iE=4 # end position
[iS:iE]
[1] 2 3 4
# I don't understand the results of the command below. I would expect to see 3, 4, not 3, 4, 5, NA
x[iS+1:iE]
[1] 3 4 5 NA
Thanks,
John
John Sorkin M.D., Ph.D.
Chief, Biostatistics and
2008 Mar 02
3
emacs and R
At the suggestion of many people, I have installed emacs on my linux (Fedora 8.0) computer with the intention of using emacs as window interface to R (2.6.0). I have gone though the emacs tutorial and don't see any information about how I should use emacs to run R. Can anyone suggest a document that I might read? In the past I have used R on a Windows XP system and used the built-in windowing
2009 Feb 20
2
Problems installing RODBC as part of Rcmdr and as separate package
Fedora 10
R 2.8.1
I hope someone can tell me the meaning of error I received trying to install RODBC and how I can get around the problem.
n.b. The error originally occurred then I was installing Rcmdr. I then tried to install RODBC separately and received the same error.
checking sql.h usability... no
checking sql.h presence... no
checking for sql.h... no
checking sqlext.h usability... no
2006 Aug 03
1
Looking for transformation to overcome heterogeneity ofvariances
Peter
You question is difficult to answer without more information about the
distribution of your residuals. Different residual patterns call for
different transformations to stabilize the variance. One very common
form of heterocedasticity is increasing variance with increasing values
of an independent predictor, i.e. the variance of the residuals of y=x
increase as x increases. In this case a
2007 Apr 07
0
Coxph: solution for violation of proportional hazards assumption.
I am trying to run a Cox regression (coxph) to predict survival after surgery and xray therapy. The model violates the proportionality assumption (tested using time-dependent covariates). I have tried to use strata to solve the problem but the stratified model still violates the assumption. Does the violation of proportionality preclude use of a Kaplan-Meier analysis? Is there any other possible
2007 Jul 15
1
Complex surveys, properly computed SEs and non-parametric analyses
Can someone direct me to an R function that properly computes standard errors of data obtained from a complex survery design, i.e. perform alnalyses similiar to those that can be performed with SUDAAN, particularly for a non-parametric one-way ANOVA, e.g. signed rank test?
Thanks,
John
John Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
Baltimore VA Medical Center GRECC,
University of
2006 Oct 14
2
regression analyses using a vector of means and a variance-covariance matrix
R 2.2.0
windows XP
How can I perform a regression analyses using a vector of means, a
variance-covariance matrix? I looked at the help screen for lm and did
not see any option for using the afore mentioned structures as input to
lm.
Thanks,
John
John Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
Baltimore VA Medical Center GRECC,
University of Maryland School of Medicine Claude D.
2005 Oct 11
2
Two factor (or more) non-parametric comparison of means
Can anyone suggest a good non-parametric test, and an R implementation of the test, that allows for two or more factors? Wilcoxon signed rank allows for only one.
Thanks,
John
John Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
Baltimore VA Medical Center GRECC and
University of Maryland School of Medicine Claude Pepper OAIC
University of Maryland School of Medicine
Division of
2007 Jan 18
3
selecting rows for inclusion in lm
I am having trouble selecting rows of a dataframe that will be included
in a regression. I am trying to select those rows for which the variable
Meno equals PRE. I have used the code below:
difffitPre<-lm(data[,"diff"]~data[,"Age"]+data[,"Race"],data=data[data[,"Meno"]=="PRE",])
summary(difffitPre)
The output from the summary indicates that
2007 Nov 21
3
Packages - a great resource, but hard to find the right one.
Fellow Rers,
Please forgive me if I have posted this to the wrong R list serve.
Over the course of the years that I have used R and participated in this list server, I have noted a large number of questions and answers that direct people to specific packages. The multitude of packages is one of the great strengths of R. Unfortunately there is no (or at least I am not aware of) any single source
2007 Feb 05
2
Two ways to deal with age in Cox model
I hope one and all will allow a stats question:
When running a cox proportional hazards model ,there are two ways to
deal with age,
including age as a covariate, or to include age as part of the
follow-up time, viz,
Age as a covariate:
tetest1 <- list(time= c(4, 3,1,1,2,2,3),
status=c(1,NA,1,0,1,1,0),
age= c(0, 2,1,1,1,0,0),
2005 Jun 03
1
Load package using R code rather than GUI Package menu
Is there any way to load a package using R code rather than the Load
Package command in the Package menu? I would like to load the boot
package.
R.2.1.0 Patched
Win 2k.
Thanks,
John
John Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
Baltimore VA Medical Center GRECC and
University of Maryland School of Medicine Claude Pepper OAIC
University of Maryland School of Medicine
Division of
2005 Jul 05
1
help eliminating for loops
I am having trouble with apply. Could someone suggest changes to the
code below that will eliminate the for loops?
R 2.1.1 patched
Windows 2k
Thanks,
John
function ()
{
NaCon<-array(dim=c(10,10))
for (i in 1:10) {NaCon[i,]<-rnorm(10,10.77,0.02)}
MeanNaCon<-vector(mode="numeric",length=10)
for (j in 1:10) {MeanNaCon[j]<-mean(NaCon[j,1:10])}
print(MeanNaCon)