Displaying 20 results from an estimated 1000 matches similar to: "Object item extraction"
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
2010 Feb 22
3
Re: [PATCH 0/3 V3] btrfs: a new tool to manage a btrfs filesystem
On Sun, Feb 21, 2010 at 8:40 AM, Goffredo Baroncelli <kreijack@gmail.com> wrote:
> filesystem resize [+/-]<size>[gkm]|max <filesystem>
-filesystem resize [+/-]<size>[gkm]|max <filesystem>
+filesystem resize [+/-]<size>[gkm]|max <dev>
This command works on devices, not paths.
> Resize a filesystem identified by <path>. The
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,
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,
2005 May 06
4
Change class factor to numeric
I am attempting to develop a multiple regression model using selected
model variables that should all be treated as numeric (mostly real)
values.
However, R considers one specific variable "mass" automatically to be of
class "factor", probably because "mass" consists of integer values that
are repeated.
I now want to force R to treat "mass" as a numeric
2005 Feb 24
2
Forward Stepwise regression based on partial F test
I am hoping to get some advise on the following:
I am looking for an automatic variable selection procedure to reduce the
number of potential predictor variables (~ 50) in a multiple regression
model.
I would be interested to use the forward stepwise regression using the
partial F test.
I have looked into possible R-functions but could not find this
particular approach.
There is a function
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 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)
{
2005 Jul 11
2
(no subject)
Hello,
The estimate of glm dispersion can be based on the deviance or on the
Pearson statistic.
I have compared output from R glm() to another statastical package and
it appears that R uses the Pearson statistic.
I was wondering if it is possible to make use R the deviance instead by
modifying the glm(...) function?
Thanks for your attention.
Kind regards,
Robin Smit
This e-mail and its
2003 Nov 12
4
column extraction by name ?
I have a data frame (df) with colums x, y and z.
e.g. df <- data.frame(x = sample(4), y = sample(4), z = sample(4))
I can extract column z by: df$z or df[3]
I can also extract columns x,y by: df[1:2] or by df[-3].
Is it possible to extract x,y columns in a "symbolic" fashion i.e.
by equivalent of df[-z] (which is illegal) ???
Or alternativeley, is there an equivalent of
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]]
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 ~
2005 May 06
3
conversion factor into numeric
Thank you all for your (fast) comments.
Unfortunately I could not make the advise work:
> mass
[1] 800 800 800 800 800 800 800 800 800 800 800
800 800 800 800 800 800 800 910 910 910 910 910
910 910
[26] 910 910 910 910 910 910 910 910 910 910 910
910 910 910 1,020 1,020 1,020 1,020 1,020 1,020 1,020 1,020 1,020
2005 Mar 02
1
Leaps & regsubsets
Hello
I am trying to use all subsets regression on a test dataset consisting
of 11 trails and 46 potential predictor variables.
I would like to use Mallow's Cp as a selection criterion.
The leaps function would provide the required output but does not work
with this many variables (see below).
The alternative function regsubsets should be used, but I am not able to
define the function in
2005 May 11
2
Regsubsets()
Dear List members
I am using the regsubsets function to select a few predictor variables
using Mallow's Cp:
> sel.proc.regsub.full <- regsubsets(CO2 ~ v + log(v) + v.max + sd.v +
tad + no.stops.km + av.stop.T + a + sd.a + a.max + d + sd.d + d.max +
RPA + P + perc.stop.T + perc.a.T + perc.d.T + RPS + RPSS + sd.P.acc +
P.dec + da.acc.1 + RMSACC + RDI + RPSI + P.acc + cov.v + cov.a +
2006 Feb 24
1
Extracting information from factanal()
Dear list members,
I apologize for putting this (probably) very basic question on the
mailing list. I have scanned through the R website (using search) but
did not found an answer.
(code included below)
A factor matrix is simply extracted (which can then subsequently be
exported using write.table) by FACT$loadings[1:6,].
I would also like to specifically extract and export
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