Displaying 20 results from an estimated 400 matches similar to: "Linear Regression"
2009 Feb 28
3
Extract statistics from lm()
Hi, perhaps this question was answered previously however I could not find
them. My problem is how how to extract a particular statistic from the
result given by lm(). For e.g.
ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
group <- gl(2,10,20, labels=c("Ctl","Trt"))
weight <- c(ctl, trt)
>
2008 Jul 16
1
Output design question
Dear R-helpers,
I was curious why the output of summary (and many other functions in
R) does not add a separator between the name of a factor and the label
of a level (e.g., in the example below, 'group Trt'). If the user had
lower case labels (e.g., 'trt'), the output would be particularly hard
to read.
ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
trt
2008 Jul 03
1
*** significance with xtable
Hello everybody,
i used xtable to get some latex output, which worked pretty well with
my latex document. But somewhere i missed the part where they explain
how to get these nice significance indicating *** into my latex
table. it just stops right after Pr(> |t|)
thanks in advance
matthias
2013 Feb 19
1
Small quirks in summary.(g)lm docs
Hi!
In R 3.0.0 from current SVN, ?summary.lm says:
> Value [...]
> df degrees of freedom, a 3-vector (p, n-p, p*), the last
> being the number of non-aliased coefficients.
?summary.glm says:
> df a 3-vector of the rank of the model and the number of residual
> degrees of freedom, plus number of non-aliased coefficients.
It seems to me that the description is reversed: p is
2007 May 10
1
t value two.sided and one.sided
Hi,
on a
> summary(lm(y~x))
are the computed t-values for two.sided or one.sided. By looking on some
tables they seem like they are for two.sided. Is it possible to have them
for one.sided? If this makes sense...
Thanks.
[[alternative HTML version deleted]]
2010 Dec 02
2
How to call R-squared values from lm's?
I would like to call both p-values and R-squared values from lm's in a function. I can get the p-values from coef(summary(name.lm))[r,c], however, I cannot figure out how to call the R-squared values without manually calling the summary and inserting them in the script - which negates the value of automating the process through a function.
Thanks,
Mike
[[alternative HTML version deleted]]
2008 Oct 31
3
getting the p-value from lm as a list object
Hi,
I'm trying to get the p-value from the 'lm' regression function as a list
object. For example, I can get r^2 from the following code by entering
summary(fm)$r.squared. Is there a way to get the p-value? If not, is there
a function where I can enter the f-value and degrees of freedom to get the
p-value? Thanks.
x <- c(1,2,3,4,5,6,7,8,9,10)
y <- c(1,2,3,4,4,5,6,8,1,9)
fm
2008 Feb 24
3
Newbie: Where is lmFit function?
Hi Everyone,
I am trying to use lmFit function; however, i cannot find it function
anywhere.
I have been trying to find the function in Bioconductor and elsewhere. I
re-install bioconductor source, update package and update R as well. no luck
Is there a command in R where i can just type, and it will download it for
me?
--
View this message in context:
2011 Jan 20
2
Regression Testing
I'm new to R and some what new to the world of stats. I got frustrated
with excel and found R. Enough of that already.
I'm trying to test and correct for Heteroskedasticity
I have data in a csv file that I load and store in a dataframe.
> ds <- read.csv("book2.csv")
> df <- data.frame(ds)
I then preform a OLS regression:
> lmfit <- lm(df$y~df$x)
To
2004 Dec 20
2
problems with limma
I try to send this message To Gordon Smyth at smyth at vehi,edu.au but it bounced
back, so here it is to r-help
I am trying to use limma, just downloaded it from CRAN. I use R 2.0.1 on Win XP
see the following:
> library(RODBC)
> chan1 <- odbcConnectExcel("D:/Data/mgc/Chips/Chips4.xls")
> dd <- sqlFetch(chan1,"Raw") # all data 12000
> #
> nzw <-
2012 Mar 20
2
Constraint Linear regression
Hi there,
I am trying to use linear regression to solve the following equation -
y <- c(0.2525, 0.3448, 0.2358, 0.3696, 0.2708, 0.1667, 0.2941, 0.2333,
0.1500, 0.3077, 0.3462, 0.1667, 0.2500, 0.3214, 0.1364)
x2 <- c(0.368, 0.537, 0.379, 0.472, 0.401, 0.361, 0.644, 0.444, 0.440,
0.676, 0.679, 0.622, 0.450, 0.379, 0.620)
x1 <- 1-x2
# equation
lmFit <- lm(y ~ x1 + x2)
lmFit
Call:
2012 Nov 16
1
Interpretation of davies.test() in segmented package
My data:
I have raw data points that form a logit style curve as if they were a time
series. Which is to say they form 3 distinct lines with 3 distinct slopes
in backwards z pattern. A certain class of my data looks essentially flat
to the eye with marginal oscillation. What is important to me is the x
value at which the state change is occurring, in other words, the break
point
Use of
2007 Jul 03
4
sequences
Hi, I would like to generate a series in the following form (0.8^1, 0.8^2,
..., 0.8^600)
Could anyone tell me how can I achieve that? I am really new to R.
--
View this message in context: http://www.nabble.com/sequences-tf4019146.html#a11414836
Sent from the R help mailing list archive at Nabble.com.
2008 Feb 11
3
Difference between P.Value and adj.P.Value
Hallo,
> fit12<-lmFit(qrg[,1:2])
> t12<-toptable(fit12,adjust="fdr",number=25,genelist=qrg$genes[,1])
> t12
ID logFC t P.Value adj.P.Val B
522 PLAU_OP -6.836144 -8.420414 5.589416e-05 0.01212520 2.054965
1555 CD44_WIZ -6.569622 -8.227938 6.510169e-05 0.01212520 1.944046
Can anyone tell me what the difference is between P.Value
2007 Sep 12
2
Tick intervals
Hi, I would like to plot a histogram with the following codes, and I would
like to make the tick intervals smaller. I tried to add "lab=c(1,1,12)", but
nothing changes.
par(mfrow=c(1,1),font=1, cex=0.8)
hist (data1, seq(-0.01,0.3,0.01),freq = FALSE,
main="Figure1.",xlab="return",lab=c(1,1,12))
lines(density(data1), col="blue")
Could anyone give me sone
2009 Oct 22
1
S4 object??
Hi all,
I have loaded the LIMMA and Biobase package and tried these commands:
library(limma)
library("Biobase")
data <- read.table("c:/temp/data.txt",header=T,row.names=1)
ExpressionData <- as.matrix(data[,c(2,3,4,6,7,8)])
eset <- new("ExpressionSet", exprs = ExpressionData)
design <- cbind(WT=1,P=c(0,1,1,0,1,1),G=c(0,1,0,0,1,0))
fit <-
2011 Feb 25
1
limma function problem
Hi,
I have two data set of normalized Affymetrix CEL files, wild type vs Control
type.(each set have further three replicates).
> wild.fish
AffyBatch object
size of arrays=712x712 features (10 kb)
cdf=Zebrafish (15617 affyids)
number of samples=3
number of genes=15617
annotation=zebrafish
notes=
> Dicer.fish
AffyBatch object
size of arrays=712x712 features (10 kb)
cdf=Zebrafish (15617
2006 Sep 06
2
deleting an arow added to a graphic
I know this has got to be simple, but I have a added an arrow to a graph
with:
arrows(5,8,8, predict(lmfit,data.frame(x=8)), length=0.1)
but its in the wrong position, correcting it and running again adds an new
arrow (which is what you would expect) so how do I
a) edit the existing arrow, and
b) delete it all together
As so often seems to be the case, some of the simplist things seem also to
2007 Jul 05
3
Loop and function
Hi All, I am trying to make a loop for a function and I am using the
following codes. "p" and "var" are some matrix obtained before. I would like
to apply the function "gpdlow" for i in 1:12 and get the "returnlow" for i
in 1:12. But when I ask for "returnlow" there are warnings and it turns out
some strange result.
for (i in 1:12){
gpdlow
2014 Oct 07
3
lattice add a fit
What is the way to add an arbitrary fit from a model to a lattice conditioning plot ?
For example
xyplot(v1 ~v2 | v3,data=mydata,
panel=function(...){
panel.xyplot(...)
panel.loess(...,col.line="red")
}
)
Will add a loess smoother. Instead, I want to put a fit from lm (but not a simple straight line) and the fit has to be done for each panel