similar to: retrieving p-values in lm

Displaying 20 results from an estimated 1100 matches similar to: "retrieving p-values in lm"

2005 Dec 16
2
dendrogram branches with different lty
Dear r-list, I am trying to visually seperate the two main clusters of a dendrogram. The idea is to use: 'edgePar=list(lty=3)' for 'dend1[[1]]' and 'edgePar=list(lty=1)' for 'dend1[[2]]' I have not found a way to solve this. Any suggestions? Patrick hc <- hclust(dist(USArrests), "ave") (dend1 <- as.dendrogram(hc)) par(mfrow=c(2,2)) plot(dend1)
2006 Apr 13
1
assigning 'heat.colors' according to ages in 'symbols()'
Hi, I have spatial data for plants that I would like to plot according to its radius using sysmbols(). Also I would like to color the circles according to an individual's age using heat.colors(17) [ages within the whole data set range from 0:16]. I have not found an easy way to assign ages (=a) a specific heat.color. Any suggestions? Thanks, Patrick x <- c(1,3,4,6,7,3,2,8,3,6,5,5) y
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
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
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) {
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 ~
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
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
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
2006 Oct 06
2
Fitting a cumulative gaussian
Dear R-Experts, I was wondering how to fit a cumulative gaussian to a set of empirical data using R. On the R website as well as in the mail archives, I found a lot of help on how to fit a normal density function to empirical data, but unfortunately no advice on how to obtain reasonable estimates of m and sd for a gaussian ogive function. Specifically, I have data from a psychometric function
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,
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 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" "df.residual"
2011 Aug 15
2
Extracting information from lm results (multiple model runs)
Just to inform: I posted that before in R-sig-ecology but as it might be interesting also for other useRs, I post it also to the general r-user list: Hello Alexandre, thank you very much. I also found another way to extract summarizing information from lm results over e.g. 1000 repeated model runs: results2 <- t(as.data.frame(results)) summary(results2) Although some questions popped up in
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],
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
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
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 =
2005 Sep 09
2
R-help Digest, Vol 31, Issue 9
Hi: I use lm (linear model) to analyze 47 variables , 8 responses So I use loop to finish it . I want the program to show the results that P-value is less than 0.05. How can I cite the P-valus from lm result ? Ping The code: #using LM to model general fati for (j in 48:52) { for (i in 3:46){ gen.fat<-y_x[,j] gen.fat<-as.numeric(gen.fat) snp_marker<-y_x[,i] x<-colnames(y_x)