search for: grouptrt

Displaying 20 results from an estimated 23 matches for "grouptrt".

2013 Feb 19
1
Small quirks in summary.(g)lm docs
...83,6.03,4.89,4.32,4.69) group <- gl(2,10,20, labels=c("Ctl","Trt")) weight <- c(ctl, trt) lm.D9 <- lm(weight ~ group + I(group != "Ctl")) lm.D9 Call: lm(formula = weight ~ group + I(group != "Ctl")) Coefficients: (Intercept) groupTrt I(group != "Ctl")TRUE 5.032 -0.371 NA summary(lm.D9)$df [1] 2 18 3 sum(!summary(lm.D9)$aliased) [1] 2 The same is true with glm(). Also, ?summary.lm seems to miss a mention that is present in ?summary.glm: > Aliased coeff...
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
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 Feb 28
3
Extract statistics from lm()
...> summary(lm.D9 <- lm(weight ~ group)) Call: lm(formula = weight ~ group) Residuals: Min 1Q Median 3Q Max -1.0710 -0.4938 0.0685 0.2462 1.3690 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 5.0320 0.2202 22.850 9.55e-15 *** groupTrt -0.3710 0.3114 -1.191 0.249 --- Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 Residual standard error: 0.6964 on 18 degrees of freedom Multiple R-squared: 0.07308, Adjusted R-squared: 0.02158 F-statistic: 1.419 on 1 and 18 DF, p-value: 0.249 Here I want to...
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]]
2001 Jun 01
1
formulas in variables in modeling functions
...so happens in lm, so I suspect the following phenomenon is universal in modeling functions. Modify the example from the lm help: model <- as.formula(weight ~ group) lm(model) The result will be printed: > lm(model) Call: lm(formula = model) ^^^^^^^^^^^^^^^^^ Coefficients: (Intercept) groupTrt 5.032 -0.371 This is because in lm, (where the return value is z) z$call is set to cl, and cl <- match.call(). My question is: would it break things to add the line cl[["formula"]] <- formula after cl <- match.call() ? The result of this is: > lm.new(model)...
2010 Jul 14
1
Add Significance Codes to Data Frame
I was hoping that there might be some way to attach significance code like the ones from summary.lm to a dataframe. Anyone know how to do something like that. Here is the function i'd like to add that functionality to: add1.coef <- function(model,scope,test="F",p.value=1,order.by.p=FALSE) { num <- length(model$coefficients) add <- add1(model,scope,test=test) sub <-
2014 Sep 26
2
summary
Grandiosa Comunidad Saludos Quiero pedirles ayuda en los siguientes puntos; .- Pregunto si puedo sacar, aumentarle al summary también los siguientes puntos Intervalo de confianza, desviación estándar? .- como puedo obtener la correlación en variables dicotómicas ej. tau de kendall? .- Como puedo cambiar los títulos del ingles al español de los encabezados de un surfit(Surv(tiempo, estado))? --
2007 Oct 02
5
Linear Regression
...en I use summary(), I got the following result: Call: lm(formula = weight ~ group - 1) Residuals: Min 1Q Median 3Q Max -1.0710 -0.4938 0.0685 0.2462 1.3690 Coefficients: Estimate Std. Error t value Pr(>|t|) groupCtl 5.0320 0.2202 22.85 9.55e-15 *** groupTrt 4.6610 0.2202 21.16 3.62e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.6964 on 18 degrees of freedom Multiple R-Squared: 0.9818, Adjusted R-squared: 0.9798 F-statistic: 485.1 on 2 and 18 D...
2008 Dec 23
1
sorting regression coefficients by p-value
Hi, Is there a way to get/extract a matrix of regression variable name, coefficient, and p values? (for lm and glm; which can be sort by p value?) thanks Dhruv [[alternative HTML version deleted]]
2005 Sep 29
5
Regression slope confidence interval
Hi list, is there any direct way to obtain confidence intervals for the regression slope from lm, predict.lm or the like? (If not, is there any reason? This is also missing in some other statistics softwares, and I thought this would be quite a standard application.) I know that it's easy to implement but it's for explanation to people who faint if they have to do their own programming...
2008 Jul 16
1
Output design question
...trt) summary(lm.D9 <- lm(weight ~ group)) gives Call: lm(formula = weight ~ group) Residuals: Min 1Q Median 3Q Max -1.0710 -0.4938 0.0685 0.2462 1.3690 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 5.0320 0.2202 22.850 9.55e-15 *** groupTrt -0.3710 0.3114 -1.191 0.249 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.6964 on 18 degrees of freedom Multiple R-squared: 0.07308, Adjusted R-squared: 0.02158 F-statistic: 1.419 on 1 and 18 DF, p...
2006 Jun 21
1
Extract information from the summary of 'lm'
Hi Everyone, I just don't know how to extract the information I want from the summary of a linear regression model fitting. For example, I fit the following simple linear regression model: results = lm(y_var ~ x_var) summary(results) gives me: Call: lm(formula = y_var ~ x_var) Residuals: Min 1Q Median 3Q Max -5.9859 -1.5849 0.4574 2.0163 4.6015 Coefficients:
2000 Sep 04
3
somebody's stolen my probabilities
gday gurus, could someone please help me with this one? Can't find it in the doco. summary of my lm object gives "Pr(>|t|)" but coef doesn't. How do I get hold of these probabilities within an object? There doesn't seem to be an appropriate attribute within the object - I was hoping for something like "my.lm$probabilies". I was hoping to grab the best t
2010 Jun 13
1
Standard error of regression coefficient
...3,6.03,4.89,4.32,4.69) group <- gl(2,10,20, labels=c("Ctl","Trt")) weight <- c(ctl, trt) The problem is that neither of these lines of code seem to show me what I'm looking for: > lm(weight ~ group) Call: lm(formula = weight ~ group) Coefficients: (Intercept) groupTrt 5.032 -0.371 > anova(lm.D9 <- lm(weight ~ group)) Analysis of Variance Table Response: weight Df Sum Sq Mean Sq F value Pr(>F) group 1 0.6882 0.6882 1.4191 0.249 Residuals 18 8.7292 0.4850 So what's the secret, then? Thanks very much R users! Josh...
2005 Jul 28
1
Displaying p-values in latex
Hi. I want to create a table in latex with regression coefficients and their corresponding p-values. My code is below. How do I format the p-values so that values less than 0.0001 are formated as <.0001 rather than just rounded to 0.0000? Thank you. model<-lm(y~x1+x2) output<-summary(model) output<-as.matrix(coefficients(output)) output<-format.df(ouput,cdec=c(2,2,2,4))
2007 Mar 09
2
Extracting the p of F statistics from lm
I need to extract the p value from a ANOVA done with lm model fitting <- lm(var ~ group) Sfitting <- summary(fitting) Sfitting[10][1] gives the F value and the degrees of freedom but I am not able to get the p value. The function df should give a p value given a F but I am not able to make it work. I found only something about aov in the R help and I am not able to make it work Massimo
2011 Aug 31
3
Converting anova/ancova summary to data frame
Hi! Can anyone tell me how to convert the anova/ancova summary output into a data frame? Thanks! Shane Phillips [[alternative HTML version deleted]]
2006 Nov 09
1
Extracting the full coefficient matrix from a gls summary?
Hi, I am trying to extract the coefficients matrix from a gls summary. Contrary to the lm function, the command fit$coefficients returns only the estimates of the model, not the whole matrix including the std errors, the t and the p values. example: 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 <-
2013 Nov 29
2
Listas en R
Hola. Me interesa meter una serie de regresiones lineales en una lista a la que voy a denominar L. El problema es que a posteriori necesito sacar valores de esas regresiones. Sin embargo, al llamar a L[1] este no es un objeto del tipo "lm" sino que es del tipo "list" y no puedo aplicarle funciones relacionadas con la regresión (tal y como puede ser hacer un summary para