Re: [R] Sampling

2015-03-29 Thread Daniel Nordlund
On 3/29/2015 11:10 PM, Partha Sinha wrote: I have 1000 data points. i want to take 30 samples and find mean. I also want to repeat this process 100 times. How to go about it? Regards Parth __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and mor

Re: [R] generating phi using function()

2015-03-29 Thread Daniel Nordlund
The argument 'K' is missing since you are only passing four arguments to the phi() function, but you defined it with five formal parameters. It looks like the argument 'j' is not necessary in the function. It is an unnecessary carry-over from the summation notation and it is never used in th

[R] Sampling

2015-03-29 Thread Partha Sinha
I have 1000 data points. i want to take 30 samples and find mean. I also want to repeat this process 100 times. How to go about it? Regards Parth __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/

Re: [R] A problem someone should know about

2015-03-29 Thread Richard M. Heiberger
This looks like a specific Macintosh error that appears at random intervals. I get it at random, and unreproducible times. I reported it (or perhaps a close relative) to the r-sig-mac list in September 2014. Rich On Sun, Mar 29, 2015 at 9:59 PM, Rolf Turner wrote: > On 30/03/15 11:52, Ian Lest

Re: [R] A problem someone should know about

2015-03-29 Thread Rolf Turner
On 30/03/15 11:52, Ian Lester wrote: I’m a novice and this message looks like it shouldn’t be ignored. Someone who knows what they’re doing should probably take a look. Thanks Ian Lester logfat.lm<-(lm(body.fat~log(BMI))) plot(logfat) Error in plot(logfat) : object 'logfat' not found plot(lo

Re: [R] Error in lm() with very small (close to zero) regressor

2015-03-29 Thread John Maindonald
There are two issues: 1) Damage was done to accuracy in the calculation of t(X) %*% X Where the mean to SD ratio is large, maybe even of the order of 100 or so, centre that column. 2) pseudo inverse() goes awry with columns of X that are of the order of large negative (or, I expect, +ve) powers of

Re: [R] Vennerable Plots for Publications

2015-03-29 Thread Dario Strbenac
That is an adequate solution. It's always better if R package authors don't hard-code graphics parameters, though. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the postin

[R] A problem someone should know about

2015-03-29 Thread Ian Lester
I’m a novice and this message looks like it shouldn’t be ignored. Someone who knows what they’re doing should probably take a look. Thanks Ian Lester >logfat.lm<-(lm(body.fat~log(BMI))) > plot(logfat) Error in plot(logfat) : object 'logfat' not found > plot(logfat.lm) Hit to see next plot: Hit

[R] Use Rstudio and RAnalyticFlow together

2015-03-29 Thread Céline b
Hi, I would like to know if someone has any idea to use RAnalyticFlow and Rstudio together, i.e., use the nice flowchart system of RAnalyticFlow within the great interface of Rstudio ? I searched on the internet but without success ... This would simplify/clarify so much my codes ! :) Thank for

Re: [R] generating phi using function()

2015-03-29 Thread Jim Lemon
Hi T., Your translation of the formula looks okay, and the error message is about a missing argument. Perhaps you have not included the necessary arguments to "phi" in the call to "mls". Jim On Sun, Mar 29, 2015 at 11:59 PM, T.Riedle wrote: > Hi everybody, > I am trying to generate the formula

Re: [R] Help w/ variable names in loop with lmer

2015-03-29 Thread Ben Bolker
David Crow cide.edu> writes: > > Hi, R users- > > I'm estimating random effects models with cross-level interactions; I want > to interact each of a vector of level-1 variables with each of a vector of > level-2 variables. Here's the code: > > > #create data frame with le

[R] Help w/ variable names in loop with lmer

2015-03-29 Thread David Crow
Hi, R users- I'm estimating random effects models with cross-level interactions; I want to interact each of a vector of level-1 variables with each of a vector of level-2 variables. Here's the code: #create data frame with level-1 variables k <- as.data.frame(cbind(robo, asa

Re: [R] Error in lm() with very small (close to zero) regressor

2015-03-29 Thread RiGui
RiGui business.uzh.ch> writes: > [snip] > I am terribly sorry for the code not being reproducible, is the > first time I am posting here, I run the code several times before I > posted, but...I forgot about the library used. Thanks for updating. > To answer to your questions: > >> How d

Re: [R] Error in lm() with very small (close to zero) regressor

2015-03-29 Thread Ben Bolker
RiGui business.uzh.ch> writes: > [snip] > I am terribly sorry for the code not being reproducible, is the > first time I am posting here, I run the code several times before I > posted, but...I forgot about the library used. Thanks for updating. > To answer to your questions: > >> How do

Re: [R] Error in lm() with very small (close to zero) regressor

2015-03-29 Thread peter dalgaard
> On 28 Mar 2015, at 18:52 , RiGui wrote: > > Thank you for your replies! > > I am terribly sorry for the code not being reproducible, is the first time I > am posting here, I run the code several times before I posted, but...I > forgot about the library used. > > To answer to your questions:

[R] generating phi using function()

2015-03-29 Thread T.Riedle
Hi everybody, I am trying to generate the formula shown in the attachment. My formula so far looks as follows: phi <- function(w1, w2, j, k, K){ zaehler <- (k/K)^(w1-1)*(1-k/K)^(w2-1) nenner <- sum( ((1:K)/K)^(w1-1)*(1-(1:K)/K)^(w2-1)) return( zaehler/nenner ) } Unfortunately something must be w

Re: [R] Error in lm() with very small (close to zero) regressor

2015-03-29 Thread RiGui
Thank you for your replies! I am terribly sorry for the code not being reproducible, is the first time I am posting here, I run the code several times before I posted, but...I forgot about the library used. To answer to your questions: How do you know this answer is "correct"? What I am doing

Re: [R] multiple break in univariate series

2015-03-29 Thread Temel İspanyolca
DR. UWE LIGGES I have sent turkish real Gdp data (1998-2013) in annex. Turkey has lived two crises in this period, in 2001 and 2008. You can see in data. My problem is to indicate these dates any statistic test as a structural change or point change. Sincerely Engin 2015-03-28 23:04 GMT+01:00 Uw

Re: [R] Categorizing by month

2015-03-29 Thread lychang
Thanks for that Ben, I appreciate it a lot. I have another question if you don't mind taking the time to answer it. I want to create a subset from dataset called "datafile5" with only the variables "Date," "PM2.5 mean concentration," "SITE_LONGITUDE," and "SITE_LATITUDE," dating only in September

Re: [R] multiple break in univariate series

2015-03-29 Thread Achim Zeileis
On Sat, 28 Mar 2015, Bert Gunter wrote: Once you have looked at the data and chosen change points to test based on the data, the tests for change points are invalid (unless you make appropriate adjustments for post hoc tests). And no, I am not making this up. Consult any competent statistician.

Re: [R] Error in lm() with very small (close to zero) regressor

2015-03-29 Thread peter dalgaard
> On 28 Mar 2015, at 18:28 , Ben Bolker wrote: > > peter dalgaard gmail.com> writes: > >> >> >>> On 28 Mar 2015, at 00:32 , RiGui business.uzh.ch> wrote: >>> >>> Hello everybody, >>> >>> I have encountered the following problem with lm(): >>> >>> When running lm() with a regressor close