search for: fstatistic

Displaying 20 results from an estimated 49 matches for "fstatistic".

Did you mean: statistic
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
2009 Apr 05
4
extract the p value of F statistics from the lm class
...d 31 DF, p-value: 1.379e-09 names(x) [1] "call" "terms" "residuals" [4] "coefficients" "aliased" "sigma" [7] "df" "r.squared" "adj.r.squared" [10] "fstatistic" "cov.unscaled" x$fstatistic value numdf dendf 72.04064 1.00000 31.00000 But can not find the p value of F statistics. Thanks Ted -- View this message in context: http://www.nabble.com/extract-the-p-value-of-F-statistics-from-the-lm-class-tp22891475p22891475.h...
2008 Dec 13
2
weird pasting of ".value" when list is returned
...{ regmod <- lm(response ~ pred1 + pred2) lmsum <- summary(regmod) imbcoef<-lmsum$coefficients[2,1] retcoef<-lmsum$coefficients[3,1] imbpval<-lmsum$coefficients[2,4] retpval<-lmsum$coefficients[3,4] Fstat<-lmsum$fstatistic[1] fpval<-pf(Fstat,lmsum$fstatistic[2],lmsum$fstatistic[3],lower=FALSE) return(list(categrsp=response,pred1=pred1,pred2=pred2,regmod=regmod, rest=c("FPVAL"=fpval,"IMBCOEF"=imbcoef,"RETCOEF"=retcoef,"IMBPVAL"=imbpval,"RETPVAL"=retpval)...
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
...of it, as we can see it below: > names(sum) [1] "call" "terms" "residuals" "coefficients" "aliased" "sigma" "df" "r.squared" [9] "adj.r.squared" "fstatistic" "cov.unscaled" I thought that I could find it in the fstatistic field, but it is not: sum$fstatistic value numdf dendf 384.4675 1.0000 515.0000 Thank in advance for your time, Kind regards, Alexandre Cohen [[alternative HTML version deleted]]
2010 Apr 26
1
Error in pf(q, df1, df2, lower.tail, log.p) : Non-numeric argument to mathematical function
...mathematical function script I'm using data1<-read.table("C:\\Documents and Settings\\bogugk\\Desktop\\Update_Rory\\A_G_without_NN_Results.txt", header=TRUE) fm <- lmList(geneexpression~gvariable|snpid,data=data1) get.pval <- function(z) { x <- summary(z) pf(x$fstatistic[1L], x$fstatistic[2L], x$fstatistic[3L], lower.tail = FALSE) } sapply(fm,get.pval) Needed output snpid gene pvalue rs1040480 PTPRT 0.39 rs1040481 PTPRT 0.02 -- View this message in context: http://r.789695.n4.nabble.com/Error-in-pf-q-df1-df2-lower-tail-log-p-Non-num...
2011 Sep 28
2
apply lm function to dataset split by two variables
...n I can extract the data with this script from Peter Solymos (although I do not get the number of points used in the analysis): myFun <- function(lm) { out <- c(lm$coefficients[1], lm$coefficients[2], length(lm$run1$model$y), summary(lm)$coefficients[2,2], pf(summary(lm)$fstatistic[1], summary(lm)$fstatistic[2], summary(lm)$fstatistic[3], lower.tail = FALSE), summary(lm)$r.squared) names(out) <- c("intercept","slope","n","slope.SE","p.value","r.squared") return(out)} results <- list() for (i in 1:length(v...
2010 Nov 29
1
extracting P values from lm model
Hello I am trying to get out of an lm model the fstatistics, however after I run the model I write > names(Model) and the fstatistic does not appear only these. names(Model) [1] "coefficients" "residuals" "effects" "rank" "fitted.values" [6] "assign" "qr&quo...
1998 May 29
0
aov design questions
...erms, "intercept")) 1 else 0 ans$r.squared <- mss/(mss + rss) #0.14 : (n/(n-p)) ans$adj.r.squared <- 1 - (1 - ans$r.squared) * ((n - df.int)/(n - p)) ans$fstatistic <- c((mss/(p - df.int))/(rss/(n - p)), p - df.int, n - p) #0.14: ans$fstatistic <- c((mss/(p-1))/(rss/(n-p)),p-1,n-p) names(ans$fstatistic) <- c("value", "numdf", "dendf")...
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
2012 Jul 11
2
replacing NaN for every attribute in my data
Hi, I have a list called ds which has the following attributes: attributes(ds) $names [1] "adj.r.squared" "fstatistic" "intercept" "slope" [5] "std.error" "tstatistic" I want to replace all the NaN is ds with 0, and after searching past posts I found I can hardcode it like this: ds$adj.r.squared=replace(ds$adj.r.squared,is.nan(ds$adj.r.squared),0)...
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], fstat[3], lower.tail=FALSE) HTH, Andy > -----Original Message-...
2011 Aug 15
2
Extracting information from lm results (multiple model runs)
...t; > } > > > > #define coeficients and how to extract them from lm > > All_Model_runs <- function(lm){ > > out <- c(lm$coefficients[1], > > lm$coefficients[2], > > summary(lm)$coefficients[2,2], > > pf(summary(lm)$fstatistic[1], summary(lm)$fstatistic[2], > > summary(lm)$fstatistic[3], lower.tail = FALSE), > > summary(lm)$r.squared) > > names(out) <- > > c("intercept","slope","slope.SE","p.value","r.squared") > >...
2012 Oct 23
2
Export summary from regression output
Hi there, I tried it many times but didn't get it worked. I just want to export the summary of a OLS regression (lm() function) into a csv-file including the "call"-formula", "coefficients", "r-squared", " adjusted r-squared" and "f statistic". I know I can export: write.csv2(Regression_60d_ann$coefficients,
1999 Nov 23
1
p-value from lm
I'd like to automatically plot the p-value and r^2 of a linear model. I know that I can extract r^2 with foo <- lm(y~x) a <- summary(foo) a$r.squared I can't find any similar functionality to obtain the p-value based on the ftest a$fstatistic returns the actual f-test and df, but not the p-value. Any thoughts? Thanks, Adam using R-0.65.1 Win32 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info&quo...
2010 Apr 13
2
liner regression for multiple keys
a1 is the first key in input. second column is x-axis and 3rd is y-axis and 4th is its corresponding key. Now for every key in 1st column I would like to calculate LR that gives p value. I tried to manage with a single key. But my problem is that How could I manage multiple keys in input. Thanx in advance input a1 1 2.5 x a1 2 3.5 x a1 3 4.5 x a1 1 2.6 x a1 2 3.8 x b1 1 4.6 y
2010 Apr 28
0
small change in output
...(output). INPUT ############# V1 V2 V3 V4 A 1 2.5 P A 2 2.8 P A 3 3.2 P A 2 1.1 Q A 3 1.7 Q A 1 2.2 Q B 1 2.5 P B 2 2.9 P B 3 3.0 P SCRIPT ####### data1<-read.table("INPUT", header=TRUE) fm <- lmList(V3~V2|V1,V4 data=data1) get.pval <- function(z) { x <- summary(z) pf(x$fstatistic[1L], x$fstatistic[2L], x$fstatistic[3L], lower.tail = FALSE) } sapply(fm,get.pval) OUTPUT ######## A PVALUE[LINEAR REGRESSION] P A P........................ Q B P........................ P -- View this message in context: http://r.789695.n4.nabble.com/small-change-in-output-tp206...
2016 Apr 29
2
lm() with spearman corr option ?
...om_smooth(method = "lm", color = I("black"), ...) + theme_blank() + theme(panel.border=element_rect(fill=NA, linetype = "solid", color="black")) lmModel <- eval(substitute(lm(y ~ x, data = data), mapping)) fs <- summary(lmModel)$fstatistic pValue <- pf(fs[1], fs[2], fs[3], lower.tail = FALSE) if (pValue < 0.05) { p <- p + theme( panel.border = element_rect( color = "red", size = 3, linetype = "solid", fill = &quot...
2005 Apr 04
1
Object item extraction
Hello I am able to extract partial regression coefficients from a fitted model object "model", i.e. model <- lm(var.sel.gkm, weights = count.gkm, data = DATA) summary(model) write.table(model$coef, file = "C:/coef_CO_gkm.txt", row.names = TRUE, col.names = TRUE) I was wondering if anyone could advise me how to extract other object items such as std. error, t-values