Displaying 20 results from an estimated 6000 matches similar to: "p values when using rlm"
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)
}
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
2004 Jun 11
1
comparing regression slopes
Dear List,
I used rlm to calculate two regression models for two data sets (rlm
due to two outlying values in one of the data sets). Now I want to
compare the two regression slopes. I came across some R-code of Spencer
Graves in reply to a similar problem:
http://www.mail-archive.com/r-help at stat.math.ethz.ch/msg06666.html
The code was:
> df1 <- data.frame(x=1:10, y=1:10+rnorm(10))
2009 Jul 23
1
setting up LMER for repeated measures and how do I get a p value for my fixed effect, group?
R 2.8.1
Windows XP
I am trying to analyze repeated measures data (the data are listed at the end of this Email message) and I need help to make sure that I have properly specified my model, and would like to know why lmer does not return a p value for Group, my fixed effect.
My subjects are divided into two groups (variable GROUP), individual subjects are indicated by the variable SS, Value is
2006 May 12
4
Title of page with multiple plots
I want to place four plots on a page, and I would like to have all four
plots share a common title. I have tried the following code, but the
title is centered over the fourth graph and not centered across all four
plots. Does anyone have any suggestions?
R 2.1.1
windows xp
oldpar<-par(mfcol =c(1,4),ask=TRUE)
plot(p,varp)
plot(p,SEp)
plot(p,CVp)
plot(p,ppval)
title(paste("P and 95%CI
2005 Apr 06
2
two methods for regression, two different results
Please forgive a straight stats question, and the informal notation.
let us say we wish to perform a liner regression:
y=b0 + b1*x + b2*z
There are two ways this can be done, the usual way, as a single
regression,
fit1<-lm(y~x+z)
or by doing two regressions. In the first regression we could have y as
the dependent variable and x as the independent variable
fit2<-lm(y~x).
The second
2007 Jun 07
3
rlm results on trellis plot
How do I add to a trellis plot the best fit line from a robust fit? I
can use panel.lm to add a least squares fit, but there is no panel.rlm
function.
--
Alan S Barnett <asb at mail.nih.gov>
NIMH/CBDB
2009 Dec 30
1
boot function returns the same results every time - there appears to be not resampling of the original data.
R 2.8.1
windows XP
I am trying to learn how to use the boot function to perform a bootstrap of a regression. I have written a short trial program, shown below. Clearly I have done something wrong as the output of each of the 100 bootstrap values for the regression are exactly the same - there does not appear to be any bootstrap respampling!. What have I done wrong?
# Define function to be run.
2008 Dec 01
1
Comparing output from linear regression to output from quasipoisson to determine the model that fits best.
R 2.7
Windows XP
I have two model that have been run using exactly the same data, both fit using glm(). One model is a linear regression (gaussian(link = "identity")) the other a quasipoisson(link = "log"). I have log likelihoods from each model. Is there any way I can determine which model is a better fit to the data? anova() does not appear to work as the models have the
2007 Oct 01
3
3-dimensional graph
Windows XP
R 2.3.1
I have a funciton
fit1<-lm(y~x+z)
Is there a function that will produce a 3-dimensional plot of y,x,z?
I looked at the help files, but did not find a clean answer to my question.
Thanks,
John
John Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
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
2008 Jan 19
1
How do we get two-tailed p-values for rlm?
How do we get 2-tailed p-values for the rlm summary?
I'm using the following:
> fit <- rlm(oatRT ~ oatoacData$erp, psi=psi.bisquare, maxit=100,
na.action='na.omit')
> fitsum <- summary(fit, cor=F)
> print(fitsum)
Call: rlm(formula = oatRT ~ oatoacData$erp, psi = psi.bisquare, maxit = 100,
na.action = "na.omit")
Residuals:
Min 1Q Median
2007 Aug 28
1
FW: How to fit an linear model withou intercept
Hi Mark,
I don't know wether you recived a sufficient reply or not, so here are
my comments to your problem.
Supressing the constant term in a regression model will probably lead to
a violation of the classical assumptions for this model.
From the OLS normal equations (in matrix notation)
(1) (X'X)b=X'y
and the definition of the OLS residuals
(2) e = y-Xb
you get - by
2005 Mar 24
1
Robust multivariate regression with rlm
Dear Group,
I am having trouble with using rlm on multivariate data sets. When I
call rlm I get
Error in lm.wfit(x, y, w, method = "qr") :
incompatible dimensions
lm on the same data sets seem to work well (see code example). Am I
doing something wrong?
I have already browsed through the forums and google but could not find
any related discussions.
I use Windows XP and R
2011 Mar 14
1
discrepancy between lm and MASS:rlm
Dear R-devel,
There seems to be a discrepancy in the order in which lm and rlm evaluate their arguments. This causes rlm to sometimes produce an error where lm is just fine.
Here is a little script that illustrate the issue:
> library(MASS)
> ## create data
> n <- 100
> dat <- data.frame(x=rep(c(-1,0,1), n), y=rnorm(3*n))
>
> ## call lm, works fine
> summary(lm(y ~
2010 Nov 08
1
Add values of rlm coefficients to xyplot
Hello,
I have a simple xyplot with rlm lines.
I would like to add the a and b coefficients (y=ax+b) of the rlm calculation
in each panel.
I know I can do it 'outside' the xyplot command but I would like to do all
at the same time.
I found some posts with the same question, but no answer.
Is it impossible ?
Thanks in advance for your help.
Ptit Bleu.
x11(15,12)
xyplot(df1$col2 ~
2003 Oct 02
4
using a string as the formula in rlm
Hi,
I am trying to build a series of rlm models. I have my data frame and
the models will be built using various coulmns of the data frame.
Thus a series of models would be
m1 <- rlm(V1 ~ V2 + V3 + V4, data)
m2 <- rlm(V1 ~ V2 + V5 + V7, data)
m3 <- rlm(V1 ~ V2 + V8 + V9, data)
I would like to automate this. Is it possible to use a string in place
of the formula?
I tried doing:
fmla
2012 Jul 06
1
How to do goodness-of-fit diagnosis and model checking for rlm in R?
Hi all,
I am reading the MASS book but it doesn't give examples about the diagnosis
and model checking for rlm...
My data is highly non-Gaussian so I am using rlm instead of lm.
My questions are:
0. Are goodness-of-fit and model-checking using rlm completely the same as
usual regression?
1.
Please give me some pointers about how to do goodness-of-fit and
residual diagnosis for
2009 Dec 03
2
Avoiding singular fits in rlm
I keep coming back to this problem of singular fits in rlm (MASS library),
but cannot figure out a good solution.
I am fitting a linear model with a factor variable, like
lm( Y ~ factorVar)
and this works fine. lm knows to construct the contrast matrix the way I
would expect, which puts the first factor as the baseline level.
But when I try
rlm( Y ~ factorVar)
I get the message "'x'
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