[R] How to fit an linear model withou intercept
Please could anyone help me? How can I fit a linear model where an intercept has no sense? Thanks in advance.. Michael __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] A problem with anova()
I fitted tree growth data with Chapman-Richards growth function using nls. summary(CR) Formula: HEIGHT ~ A * (1 - exp(-B * AGE))^C Parameters: Estimate Std. Error t value Pr(|t|) A 29.007627 0.270485 107.24 2e-16 *** B 0.030813 0.001095 28.13 2e-16 *** C 1.849405 0.068659 26.94 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.879 on 713 degrees of freedom Algorithm port, convergence message: relative convergence (4) When I try to run the anova90 function I get this: anova(CR) Error in anova.nls(CR) : anova is only defined for sequences of nls objects Could you tell me what the problem is? Thanks Michael [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Help on looping problem needed!
I am wondering if someone could help me out with following problem: I have written a for loop which generates a random normal distribution let us say 1000 times. When the restriction is met (mean0.01), the loop stops, prints the mean value and plots a histogram. for(i in 1:1000) { a-rnorm(1000,0,.2) b-abs(mean(a)) if(b.01) next else {print(b);hist(a);break}} How to reshape the loop when I want to find at least 5 distibutions that meet my restriction and save them (assign) under names R1R5. Could you help me please? Michael __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Classification
For all who sent help on topic Classification: Thank you very much folks. I have got some inspiration how to solve this task. Michael - Original Message - From: Marc Schwartz [EMAIL PROTECTED] To: Ing. Michal Kneifl, Ph.D. [EMAIL PROTECTED] Cc: r-help@stat.math.ethz.ch Sent: Wednesday, July 18, 2007 7:53 PM Subject: Re: [R] Classification On Wed, 2007-07-18 at 19:36 +0200, Ing. Michal Kneifl, Ph.D. wrote: Hi, I am also a quite new user of R and would like to ask you for help: I have a data frame where all columns are numeric variables. My aim is to convert one columnt in factors. Example: MD 0.2 0.1 0.8 0.3 0.7 0.6 0.01 0.2 0.5 1 1 I want to make classes: 0-0.2 A 0.21-0.4 B 0.41-0.6 C . and so on So after classification I wil get: MD A A D B . . . and so on Please could you give an advice to a newbie? Thanks a lot in advance.. Michael See ?cut You can then do something like: DF MD 1 0.20 2 0.10 3 0.80 4 0.30 5 0.70 6 0.60 7 0.01 8 0.20 9 0.50 10 1.00 11 1.00 cut(DF$MD, breaks = c(seq(0, 1, .2)), labels = LETTERS[1:5]) [1] A A D B D C A A C E E Levels: A B C D E HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Classification
Hi, I am also a quite new user of R and would like to ask you for help: I have a data frame where all columns are numeric variables. My aim is to convert one columnt in factors. Example: MD 0.2 0.1 0.8 0.3 0.7 0.6 0.01 0.2 0.5 1 1 I want to make classes: 0-0.2 A 0.21-0.4 B 0.41-0.6 C . and so on So after classification I wil get: MD A A D B . . . and so on Please could you give an advice to a newbie? Thanks a lot in advance.. Michael __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] RODBC Access
Please could you write an example of this command: table.db-sqlQuery(channel,paste(select * from table)) With real names of .mdb file and table? Thanks Michael - Original Message - From: Patrick Gonin [EMAIL PROTECTED] To: Prof Brian Ripley [EMAIL PROTECTED] Cc: r-help@stat.math.ethz.ch Sent: Friday, July 13, 2007 10:32 AM Subject: Re: [R] RODBC Access Thank you Pr Ripley, it worked well with a simple sqlQuery rather than a sqlFetch command: I paste it here in case some other users encounter a similar problem: table.db-sqlQuery(channel,paste(select * from table)) Dr Patrick Gonin Institut Gustave Roussy 94800 Villejuif France Prof Brian Ripley [EMAIL PROTECTED] wrote: This is an ODBC issue, not an R issue. Use a command-line ODBC client to find a suitable SQL invocation to retrieve the data, and run that via sqlQuery. (It might be a quoting issue: Access is not using standard SQL.) On Thu, 12 Jul 2007, Patrick Gonin wrote: Dear R users, I am trying to connect an Access database. The code I use is : channel-odbcConnectAccess(Base) table.db-sqlFetch(Base,table,colnames=T) When I look at the table in R, the table imported lacks the first 41 lines, and the column names are the values of the 42nd record. Any hints ? I am working on a WinXP pro 5.1 box, R 2.5-0 compiled from source using MINGW and R tools. I searched R archives through Jonathan Baron site... Thank you very much for your help Dr P. Gonin Institut Gustave Roussy 94805 Villejuif France - [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 - [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.