Displaying 20 results from an estimated 2000 matches similar to: "liner regression for multiple keys"
2010 Apr 26
1
Error in pf(q, df1, df2, lower.tail, log.p) : Non-numeric argument to mathematical function
inputfille
snpid indid genotype gvariable probeid gene geneexpression
rs1040480 CHB_NA18524 C/T 2 GI_19743926-I PTPRT 5.850586
rs1040480 CHB_NA18526 C/C 1 GI_19743926-I PTPRT 6.028641
rs1040480 CHB_NA18529 C/C 3 GI_19743926-I PTPRT 5.944392
rs1040481 CHB_NA18532 C/C 1 GI_19743926-I PTPRT 5.938578
rs1040481 CHB_NA18537 C/C 2 GI_19743926-I PTPRT 5.874439
rs1040481 CHB_NA18540 C/C 3 GI_19743926-I
2010 Aug 14
1
is it possible to map 2 plots(c and d) in a single output plot?
is it possible to map 2 plots(c and d) in a single output plot?
library(ggplot2)
c <- ggplot(mtcars, aes(qsec, wt))
d <- ggplot (mtcars, aes(qsec, wt))
c + stat_smooth(fill="darkgrey", colour="blue", size=2, alpha = 0.2)
d + stat_smooth(fill="darkgrey", colour="red", size=2, alpha = 0.2)
--
View this message in context:
2005 Dec 09
3
retrieving p-values in lm
Dear list,
I want to retrieve the p-value of a two-polynomial regression. For a
one-polynomial lm I can easily do this with:
summary(lm(b~a, data=c)[[4]][[8]].
But how do I find the final p-value in the two-polynomial regression? Under
$coefficients I don't find it
Any suggestions?
Patrick
alt <-(2260,2183,2189,1930,2435,
2000,2100,2050,2020,2470,
1700,2310,2090,1560,2060,
2011 Oct 24
3
extract the p value
OK, what is the trick to extracting the overall p value from an lm object?
It shows up in the summary(lm(model)) output but I can't seem to extract it:
> test2 = apply(aa, 1, function(x) summary(lm(x[,1] ~ 0 + x[,3] + x[,6])))
> test2[[1]]
Call:
lm(formula = x[, 1] ~ 0 + x[, 3] + x[, 6])
[omitted summary output]
F-statistic: 40.94 on 2 and 7 DF, p-value: 0.0001371
It does not seem
2016 Apr 29
2
lm() with spearman corr option ?
Hi,
A following function was kindly provided by GGally?s maintainer, Barret Schloerke.
function(data, mapping, ...) {
p <- ggplot(data = data, mapping = mapping) +
geom_point(color = I("blue")) +
geom_smooth(method = "lm", color = I("black"), ...) +
theme_blank() +
theme(panel.border=element_rect(fill=NA, linetype =
2008 Dec 13
2
weird pasting of ".value" when list is returned
could someone explain why the name of FPVAL gets " .value" concatenated
onto it when the code below is run and temp is returned.
I've been trying to figure this out for too long. It doesn't matter when
I put the FPVAL in the return statement. It happens regardless of
whether it's first or last. Thanks.
f.lmmultenhanced <-
function(response, pred1, pred2)
{
2011 Sep 28
2
apply lm function to dataset split by two variables
Dear all,
I am not fluent in R and am struggling to 1) apply a lm to a weight-size
dataset, thus the model has to run separately for each species, each
year; 2) extract coefs, r-squared, n, etc. The data look like this:
year sps cm w
2009 50 16 22
2009 50 17 42
2009 50 18 45
2009 51 15 45
2009 51 16 53
2009 51 17 73
2010 50 15 22
2010 50 16 41
2010 50 16 21
2010
2003 Jul 07
1
P-value for F from summary.lm (was RE: (no subject))
[Please use the subject line!]
In the help page for summary.lm, the "Value" section says that the returned
object has a component called "fstatistic", which has the F-statistic and
the associated numerator and denominator degrees of freedom. You can get
the p-value by something like:
fstat <- summary(speciallinearmodel)$fstatistic
pval <- pf(fstat[1], fstat[2],
2010 Apr 27
3
Problem calculating multiple regressions on a data frame.
Hi there,
I am stuck trying to solve what should be a fairly easy problem.
I have a data frame that essentially consists of (ID, time as seqMonth,
variable, value) and i want to find the regression coefficient of value vs
time for each combination of ID and Variable.
I have tried several approaches and none of them seems to work as i
expected.
For example, i have tried:
2012 Oct 26
3
regression analysis in R
Dear useRs,
i have vectors of about 27 descriptors, each having 703 elements. what i want to do is the following 1. i want to do regression analysis of these 27 vectors individually, against a dependent vector, say B, having same number of elements.2. i would like to know best 10 regression results, if i do regression analysis of dependent vector against the random combination of any 4
2009 Apr 05
4
extract the p value of F statistics from the lm class
Dear R users
I have run an regression and want to extract the p value of the F
statistics, but I can find a way to do that.
x<-summary(lm(log(RV2)~log(IV.m),data=b))
Call:
lm(formula = log(RV2) ~ log(IV.m), data = b[[11]])
Residuals:
Min 1Q Median 3Q Max
-0.26511 -0.09718 -0.01326 0.11095 0.29777
Coefficients:
Estimate Std. Error t value Pr(>|t|)
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
2009 Oct 13
2
Linear Regression Question
Dear Sir or Madam,
I am a student at MSc Probability and Finance at Paris 6 University/
Ecole Polytechnique. I am using R and I can't find an answer to the
following question. I will be very thankful if you can answer it.
I have two vectors rendements_CAC40 and rendements_AlcatelLucent.
I use the lm function as follows, and then the sumarry function:
regression=lm(rendements_CAC40 ~
2009 Nov 05
2
Using a by() function to process several regression (lm()) functions
Hello,
Thank you very much for looking at this. I have a "seasonal" user for R. I
teach my undergrads and graduates students statistics using R and often find
myself trying to solve problems to process student collected data in an
efficient way.
In this case, I have a data.frame with multiple observations. These are gas
concentrations in a chamber and are used to measure into rates,
2010 Nov 23
2
Calculating correlation
Hi guys
I have an input file with multiple columns and and rows.
Is it possible to calculate correlation of certain value of certain No (For
example x of S1 = 112) with all other values (for example start with x 112
corr a 3 of S1 = x-a 0.2 )
INPUT
*******
No S1 S2 S3 S4 Sn
a 3 4 45 34 23
x 112 0 12 23 0
b 0 1 23 12 1
n 0 1 0 1 1
2011 Mar 16
3
perl one-liner issue
I am trying to deduce the one liner for an rpm I am packaging to edit a php
configuration file from within my spec. The line I am editing looks like:
$conf['nagios_base'] = "/nagios/cgi-bin";
What are the escape requirements Perl needs from within the shell to
search for this?
As I have seen, the syntax is a mess, any pointers would be appreciated!
thanks,
jlc
2005 Jul 25
2
A one-liner to create a 3-dim array
Hi,
I would like to write a one-line R code to create a 3-dim array, B, of
dimension (n,n,m) from a matrix, A, of dimension (m,n) such that the i-th
element of the 3-dim array, B[, , i] is the outer product of the i-th row
of A.
Thanks for any help,
Ravi.
[[alternative HTML version deleted]]
2009 Apr 12
1
looking for one-liner for strsplit and regex
Hi,
I have a line such as:
myline <- " 0.100000 1.5000 0.6000 538
0.369404"
and I would like to put the numbers into a vector. Some combination of
tabs and spaces occur between the numbers.
I tried:
try1 <- strsplit(myline,"[[:blank:]]+")
> try1
[[1]]
[1] "" "0.100000" "1.5000"
2008 Jul 09
1
Need help with awk one-liner
This awk command pulls URLs from an apache config file, where $x is
the config filename.
awk '/:8008\/root/ {printf $3 "\t"}' $x
The URL that is output by the script looks something like this:
ajpv12://hostname.network.company.com:8008/root
Is there a way to alter the output so it only shows "hostname" by
itself? Do I need to pipe this through awk again to clean it
2006 Feb 16
2
fitting non-liner curves
Dear Sir/Madam,
I have two vectors say x<-c(0,0,2.73,3.42,3.95,4.26)
and y<-c(0.0,0.5,1.20,1.90,2.6,3.3). I want to fit y as a function of x and
get the equation.Do I have to use glm() ?
Rangesh
[[alternative HTML version deleted]]