similar to: cygwing warming when creating a package in windows

Displaying 20 results from an estimated 900 matches similar to: "cygwing warming when creating a package in windows"

2013 Mar 12
1
Cook's distance
Dear useRs, I have some trouble with the calculation of Cook's distance in R. The formula for Cook's distance can be found for example here: http://en.wikipedia.org/wiki/Cook%27s_distance I tried to apply it in R: > y <- (1:400)^2 > x <- 1:100 > lm(y~x) -> linmod # just for the sake of a simple example >
2009 Oct 26
2
What is the most efficient practice to develop an R package?
I am reading Section 5 and 6 of http://cran.r-project.org/doc/contrib/Leisch-CreatingPackages.pdf It seems that I have to do the following two steps in order to make an R package. But when I am testing these package, these two steps will run many times, which may take a lot of time. So when I still develop the package, shall I always source('linmod.R') to test it. Once the code in
2010 Apr 27
3
Problem calculating multiple regressions on a data frame.
Hi there, I am stuck trying to solve what should be a fairly easy problem. I have a data frame that essentially consists of (ID, time as seqMonth, variable, value) and i want to find the regression coefficient of value vs time for each combination of ID and Variable. I have tried several approaches and none of them seems to work as i expected. For example, i have tried:
2006 Jan 11
1
updating formula inside function
Dear R-Helpers Given a function like foo <- function(data,var1,var2,var3) { f <- formula(paste(var1,'~',paste(var2,var3,sep='+'),sep='')) linmod <- lm(f) return(linmod) } By typing foo(mydata,'a','b','c') I get the result of the linear model a~b+c. How can I rewrite the function so that the formula can be updated inside the function,
2010 Jun 18
1
How to calculate the robust standard error of the dependent variable
Hi, folks linmod=y~x+z summary(linmod) The summary of linmod shows the standard error of the coefficients. How can we get the sd of y and the robust standard errors in R? Thanks! [[alternative HTML version deleted]]
2010 Jun 21
2
How to predict the mean and variance of the dependent variable after regression
Hi, folks, As seen in the following codes: x1=rlnorm(10) x2=rlnorm(10,mean=2) y=rlnorm(10,mean=10)### Fake dataset linmod=lm(log(y)~log(x1)+log(x2)) After the regression, I would like to know the mean of y. Since log(y) is normal and y is lognormal, I need to know the mean and variance of log(y) first. I tried mean (y) and mean(linmod), but either one is what I want. Any tips? Thanks in
2009 Sep 14
3
Eliminate cases in a subset of a dataframe
Hi folks, I created a subset of a dataframe (i.e., selected only men): subdata <- subset(data,data$gender==1) After a residual diagnostic of a regression analysis, I detected three outliers: linmod <- lm(y ~ x, data=subdata) plot(linmod) Say, the cases 11,22, and 33 were outliers. Here comes the problem: When I want to exclude these three cases in a further regression analysis, - for
2012 May 29
2
setting parameters equal in lm
Forgive me if this is a trivial question, but I couldn't find it an answer in former forums. I'm trying to reproduce some SAS results where they set two parameters equal. For example: y = b1X1 + b2X2 + b1X3 Notice that the variables X1 and X3 both have the same slope and the intercept has been removed. How do I get an estimate of this regression model? I know how to remove the intercept
2008 Mar 10
3
Weighting data when running regressions
Dear R-Help, I'm new to R and struggling with weighting data when I run regression. I've tried to use search to solve my problem but haven't found anything helpful so far. I (successfully) import data from SPSS (15) and try to run a linear regression on a subset of my data file where WEIGHT is the name of my weighting variable (numeric), e.g.: library(foreign)
2007 Dec 21
1
matrix to gal object
useR's I need transform the matrix wdat [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0 1 0 1 1 0 [2,] 1 0 0 1 1 0 [3,] 0 0 0 0 1 1 [4,] 1 1 0 0 1 0 [5,] 1 1 1 1 0 0 [6,] 0 0 1 0 0 0 to gal object. How I do with spdep? Thanks in advance for the help. Bernardo. University of Concepci?.
2007 Jul 08
2
Making Gehan-Breslow test for Survival data
Hi all, The survivals functions can be tested by the Log-rank test and others, for example the Gehan-Breslow. The graham breslow work with the alpha values. But I don't know how is the Gehan-Breslow test with R. Somebody know a type function?.. or other suggestions? Any help will be really appreciated Jos? Bustos Marine Biologist Master Apllied Stat Program University of Concepci?n
2008 Apr 21
1
Analysis of Epidemiological Data Using R
Hi everyone, I'm studying the manual name: Analysis of Epidemiological Data Using R and Epicalc, maked by: Virasakdi Chongsuvivatwong and Edward McNeil. And I can't find the data base that they use in some examples, this are the names: Chapter7.Rdata,Chapter8.Rdata,Chapter9.Rdata Somebody can tell me how can I have this files? Thk! Jos? O__ ---- Jos? Bustos M. c/ /'_ ---
2008 Jul 03
1
R-help Digest, Vol 65, Issue 4
Hi everyone, We are looking for some data sets working with relative risk mortality. so, someone know where can I find the data.mgus dataset and the data.mgus? Using 1384 records from Minnesota. Thank! O__ ---- Jos? Bustos M. c/ /'_ --- Master Apllied Stat Program (*) \(*) -- University of Concepci?n
2011 Mar 27
1
Sweave: include a multi-page-pdf plot
Hi, I'm just starting out with Sweave, and I can't get a plot(linmod) to display all four plots: << bild >>= x1 <- runif(100) x2 <- rexp(100) y <- 3 + 4*x1 + 5*x2 + rnorm(100) mod <- lm(y~x1+x2) plot(mod) @ Some Text <<fig=TRUE>>= <<bild>> @ This plots only the first image of the four-page plot.lm() result. I don't want to use
2008 Nov 03
2
Cómo convertir un objeto data frame en una tabla csv
Agradeceré me ayuden con la consulta: Cómo convertir un objeto data frame en una tabla csv que pueda a su vez ser convertida en un objeto geodata De antemano, gracias por la atención, -- Ricardo Bandin Llanos rbandin@udec.cl Estudiante - Magíster Cs. m. Pesquerías Universidad de Concepción, Región del Bio-Bio, Chile Celular: (0056-41) 97949957 [[alternative HTML version deleted]]
2009 Nov 05
2
Using a by() function to process several regression (lm()) functions
Hello, Thank you very much for looking at this. I have a "seasonal" user for R. I teach my undergrads and graduates students statistics using R and often find myself trying to solve problems to process student collected data in an efficient way. In this case, I have a data.frame with multiple observations. These are gas concentrations in a chamber and are used to measure into rates,
2006 Aug 02
0
Trying to use segmented in a function
Hi folks I wonder if anyone can help me. I want to run some simulations to see how big a sample size might be necessary to distinguish a curved bivariate relationship (e.g. something that might be best described by a quadratic model) from a relationship that is two straight lines with a sudden change in slope (e.g. something best described by a breakpoint regression). I am using
2008 Nov 17
2
How to calculate the linear distance between 2 points
Deemed colleagues I would appreciate your help with a sentence to calculate the linear distance between 2 geographical points (coordinates in UTM). In advance thnks for your attention, -- Ricardo Bandin Llanos rbandin@udec.cl Estudiante - Magíster Cs. m. Pesquerías Universidad de Concepción, Región del Bio-Bio, Chile Celular: (0056-41) 97949957 [[alternative HTML version deleted]]
2008 Nov 05
1
Applying a loop with rnorm() to eliminate duplicate coordinates in a dataframe object
Dear colleagues I found duplicate coordinates trying to convert a dataframe object (see the attached file) into a geodata one ('geoR' package is needed). My dataframe object consists of 2 columns with UTM geographical coordinates and a 3rd column with fish densities . To overcome the handicap I must add a tiny value generated by rnorm() to each geographical coordinate. And it must be in
2007 Mar 05
2
Warming up a new Searcher/Reader (Ferret 0.10.9 win32)
Hi, I have a largish index [700MB] which is updated from time to time, requiring me to close and recreate the Ferret::Search::Searcher to use the latest index. My problem is that the first few searches on the new index are slow [by comparison to before the close/recreate], I''m guessing because the new index is being loaded into RAM by my OS and into Ferret as needed. I''m