Displaying 20 results from an estimated 1000 matches similar to: "Accounting for within family correlation in genetic analysis"
2008 Dec 09
1
glm error message when using family Gamma(link="inverse")
R 2.5
windows XP
I am getting an error from glm() that I don't understand. Any help or suggestions would be appreciated. N.B. 1<=AAMTCAREJ<=327900
> summary(data$AAMTCAREJ)
Min. 1st Qu. Median Mean 3rd Qu. Max.
1.0 404.3 1430.0 6567.0 5457.0 327900.0
> fitglm<-glm(AAMTCAREJ~sexcat+H_AGE+SmokeCat+InsuranceCat+MedicadeCat+
+
2007 Sep 27
1
curvilinear grid
Hello all:
A question from a new user. I have data on a geo-referenced curvilinear
grid. This is a grid with 75 rows and 51 columns, is not aligned
north-south, and the rows and columns are not straight. (And the
coordinates are in meters.) I want to make image plots of this data,
but where the grid is deformed according to the correct locations of the
grid points, instead of coming out
2012 Jul 10
1
RGL 3D curvilinear shapes
Dear useRs,
I'm trying to simply fill in the area under a curve using RGL. Here' the set
up:
x <- c(0.75,75.75,150.75,225.75,300.75,375.75,450.75,525.75,600.75,675.75,
0.5,50.5,100.5,150.5,200.5,250.5,300.5,350.5,400.5,450.5,
0.25,25.25,50.25,75.25,100.25,125.25,150.25,175.25,200.25,225.25)
y <- c(0.05,4.91,9.78,14.64,19.51,24.38,29.24,34.11,38.97,43.84,
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 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
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
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)
2005 Jul 14
1
Error running lme.
I am trying to fit lme using R 2.1.1 under Windows 2k.
I am getting the following message noted below.
Any suggestions that would help me correct my error would be greatly
appreciated.
Thanks,
John
> fit1lme<-lme(Velocity~time,data=gate)
Error in getGroups.data.frame(dataMix, groups) :
Invalid formula for groups
John Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
2005 Dec 02
1
sign and sign rank tests
R 2.1.1 on Windows 2K
I hope one and all will allow both an R question and a general stats question:
(1) Is there any function that will perform non-parametric tests such as a sign test or a signed rank test? I know I could program both but I would prefer not re-inventing the wheel.
(2) When performing a sign test, the usual practice is to drop zero values. Is there any theoretical 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
2005 Jul 17
1
printing the name of the arguments passed to a function
R2.1.1
Win 2k
I have a function, B, within a function, A.
I would like to have B print the name of the argument passed to it (not
the value of the arguments).
i.e.,
A<-function()
{
B<-function(x,y)
{
fit1<-lm(y~x,data=jo)
print(summary(fit1)
I want B to print the string "age" and the string "height".
}
B(age,height)
}
2005 Jul 15
3
Dividing a vector into ntiles
R 2.1.1
Win 2k
Would someone suggest a method (or methods) that can be used to
determine ntile cutpoints of a vector, i.e. to determine values that can
be used to divide a vector into thirds such as 0-33 centile, 34-66
centile, 67-100 centile. If for example I had a vector:
1,2,3,4,5,6,7,8,9
and wanted to divide the vector into thirds
I would have cut-points of 3, and 6.
Thanks,
John
John
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
2005 Jun 02
2
confusion with boot
I think I am doing something wrong when I try to bootstrap R square
obtained from lm. My code is included below. No matter how many times I
run the simulation, I always get exactly the same result, the bias and
std.error are always zero. I would think that these values should be
non-zero. I would appreciate any suggestions as to what I am doing
wrong, or perhaps what I fail to understand.
R 2.1.0
2006 May 14
2
apply, apply speed vs. traditional looping mechanisms
Can someone tell me why apply (and apply) are faster in performing
repeated operations than a for (or do) loop? I am looking for a
technical explanation.
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 Gerontology
2005 Sep 13
1
Fisher's exact test vs Chi-square
Timothy,
I believe you are mistaken. Fisher's exact test give the correct answer
even in the face of small expected values for the cell counts. Pearson's
Chi-square approximates Fisher's exact test and can give the wrong
answer when expected cell counts are low. Chi-square was developed
because it is computationally "simple". Fisher's exact test,
particularly with tables
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
2005 Jul 23
1
Package libblas.so.3 not found installing R2.1.1 on Linux FC4
I am trying to install
R.2.1.1 under Linux FC4 using RPM. During the installation I get the
following message:
The following package could not be found on your system. Installation
cannot continue until it is installed.
The package in question of libblas.so.3.
Does anyone know where I can get the package? Can I use RPM to intall
the package?
Thanks,
John
John Sorkin M.D., Ph.D.
Chief,