similar to: Export objects

Displaying 20 results from an estimated 6000 matches similar to: "Export objects"

2005 Feb 17
2
dumping the summary of lm to a text file
Hello list, I have a linear regression 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 <- gl(2,10,20, labels=c("Ctl","Trt")) weight <- c(ctl, trt) reg <- lm(weight ~ group) sreg <- summary(reg) and I would like to dump exactly what I see on the console with
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 <-
2010 Aug 12
3
Median abline how-to ?
Hi, I'm newbie with R and don't really know how to add a median line to each of the groups that is not all the plot long. Here is a small working code that i have adapted for my purpose. If somebody could tell me how to draw median lines on each group and not all plot long. ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt <-
2009 Feb 28
3
Extract statistics from lm()
Hi, perhaps this question was answered previously however I could not find them. My problem is how how to extract a particular statistic from the result given by lm(). For e.g. 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 <- gl(2,10,20, labels=c("Ctl","Trt")) weight <- c(ctl, trt) >
2008 Jul 16
1
Output design question
Dear R-helpers, I was curious why the output of summary (and many other functions in R) does not add a separator between the name of a factor and the label of a level (e.g., in the example below, 'group Trt'). If the user had lower case labels (e.g., 'trt'), the output would be particularly hard to read. ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt
2007 Nov 26
1
pass lm( ) a char vector as the variables to be included
Dear Everyone in list: I am writing some codes to automate the process of fitting linear models where the names of variables of models are produced and stored in character vectors. But I have problems to pass the vectors to the lm( ) because I don't know how to strip the quotation marks automatically. Here are the codes of the example of lm( ): ## Annette Dobson (1990) "An Introduction
2013 Feb 19
1
Small quirks in summary.(g)lm docs
Hi! In R 3.0.0 from current SVN, ?summary.lm says: > Value [...] > df degrees of freedom, a 3-vector (p, n-p, p*), the last > being the number of non-aliased coefficients. ?summary.glm says: > df a 3-vector of the rank of the model and the number of residual > degrees of freedom, plus number of non-aliased coefficients. It seems to me that the description is reversed: p is
2011 Jul 11
2
lm: mark sample used in estimation
Hi all, I wanted to mark the estimation sample: mark what rows (observations) are deleted by lm due to missingness. For eg, from the original example in help, I have changed one of the values in trt to be NA (missing). # code below # ---- # original 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) #
2006 Jan 16
4
Standardized beta-coefficients in regression
Hello list, I am used to give a lot of attention to the standardized regression coefficients, which in SPSS are listed automatically. Is there alternative to running the last two lines in the following example to get all the information? 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) summary( lm(ctl ~ trt) )
2014 May 12
2
Duda_TEST DE WALD
Buenos días, Gracias Carlos, siguiendo el ejemplo que comentas, esto es lo que he introducido en el Scrip de RStudio: *library(xlsx)* *library(xlsxjars)* *library(rJava)* *library(aod)* *R<-read.csv("2002.CSV", sep=";", dec=",", header=T)* *attach(R)* *group<-gl(2,670,1340,labels= c("AVE", "Log.Imports.Value.in.1000.USD"))*
2011 Dec 04
6
Problema (¿bicho?) en función lm, R 2.14.0
Hola: Al tratar de utilizar la función lm R explota, no se si se trata de un problema de mi máquina o me he dado de bruces con un bicho. Después de intentar depurar mi código he probado lo más básico, abrir R (probado en consola y Rkward) y lanzar los ejemplos de lm, esto es lo que me encuentro: ---------- Corte desde la consola ------------------- R version 2.14.0 (2011-10-31) Copyright (C)
2008 Sep 26
2
ANOVA between & within variance
hi, is there an option to calculate the 'within' & 'between' group variances for a simple ANOVA (aov) model (2 groups, 1 trait, normally distr.) ? or do I have to calculate them from the Sum Sq ? thanks for your time and greetings, gregor -- Gregor Rolshausen PhD Student; University of Freiburg, Germany e-mail: gregor.rolshausen at biologie.uni-freiburg.de tel. :
2010 Jun 16
2
error message stops "for" command
Hello all, I am using a for statement to run a loop in R but I get an error message and the loop stops. I need that the loop continues til the end. I know I can use the NEXT command but I don´t know how the sintax woul be for this particular situation. Any suggestions? Thanks, Diana Buitrago [[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...
2006 Aug 24
1
how to constrast with factorial experiment
Hello, R users, I have two factors (treat, section) anova design experiment where there are 3 replicates. The objective of the experiment is to test if there is significant difference of yield between top (section 9 to 11) and bottom (section 9 to 11) of the fruit tree under treatment. I found that there are interaction between two factors. I wonder if I can contrast means from levels of
2012 Jan 27
1
Confused with Student's sleep data description
I am confused whether Student's sleep data "show the effect of two soporific drugs" or Control against Treatment (one drug). The reason is the next: > require(stats) > data(sleep) > attach(sleep) > extra[group==1] numeric(0) > group [1] Ctl Ctl Ctl Ctl Ctl Ctl Ctl Ctl Ctl Ctl Trt Trt Trt Trt Trt Trt Trt Trt Trt [20] Trt Levels: Ctl Trt > sleep$group [1] 1 1 1 1 1
2011 Mar 02
0
R2PPT - Insert data.frame
Hi all, When using the package R2PPT I am able to create a presentation, add slides, add title, add text. But when it comes to insert data.frame with the function PPT.AddDataFrame the result is everything but nice. I may need to define the data.frame in some way that power point interprets it better, but not even the example works for me: ctl <-
2010 Jun 13
1
Standard error of regression coefficient
Hi all, This should be a very simple question for you, whereas it is proving devilish for me. How do I output the STANDARD ERROR of the regression coefficient (i.e., the standard error of b) from a simple linear regression? Consider this data, taken directly from ?lm: 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)
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))
2005 Dec 20
1
Linux command
I wonder if it's possible to run R-functions or other commands automatically by some shell-script in Linux shell. I thought that something like $ R mean(c(1,2)) $ R xy.Rdata would work, but I havent found the right way.