similar to: Factorial function in R?

Displaying 20 results from an estimated 2000 matches similar to: "Factorial function in R?"

2004 Jul 16
1
Does AIC() applied to a nls() object use the correct number of estimated parameters?
I'm wondering whether AIC scores extracted from nls() objects using AIC() are based on the correct number of estimated parameters. Using the example under nls() documentation: > data( DNase ) > DNase1 <- DNase[ DNase$Run == 1, ] > ## using a selfStart model > fm1DNase1 <- nls( density ~ SSlogis( log(conc), Asym, xmid, scal ), DNase1 ) Using AIC() function: >
2003 Jun 15
0
Summary: Factorial function in R
Thanks to Martin, Marc, Dennis, Rashid and Bill for comment. The short answer is there is no factorial function within the base package, so use the result that gamm(x + 1) = x!. This what the factorial() function in the package gregmisc does: factorial <- function (x) gamma(1 + x) Bill V. also writes: "Your best move is usually to use the lgamma() function (for log gamma) and do
2004 Jul 16
0
Does AIC() applied to a nls() object use the correctnumber of estimated parameters?
Thanks Adaikalavan, however the problem remains. Considering AIC() as applied to the linear model in AIC() help documentation: > data(swiss) > lm1 <- lm(Fertility ~ . , data = swiss) > AIC(lm1) [1] 326.0716 Clearly this includes the estimation of the residual standard error as an estimated parameter, as this gives the correct score: > -2*logLik(lm1) + 2*(length(coef(lm1))+1)
2003 Jun 08
6
Basic question on applying a function to each row of a dataframe
Hi, I have a function foo(x,y) and a dataframe, DF, comprised of two vectors, x & w, as follows : x w 1 1 1 2 2 1 3 3 1 4 4 1 etc I would like to apply the function foo to each 'pair' within DF e.g foo(1,1), foo(2,1), foo(3,1) etc I have tried >apply(DF,foo) >apply(DF[,],foo) >apply(DF[DF$x,DF$w],foo) However, none of the above worked. Can anyone help ?
2003 Jun 13
1
Problem with Rcmd SHLIB
Dear R-helpers, i am trying to make a shared library from a Fortran subroutine, and i therefore used (after reading the documentation): Rcmd SHLIB forfile.f #(R1.70, Win2000) And the error is: " 'perl' is not recognized as an internal or external command,operable program or batch file." So i went ahead and tried to install Perl (from the suggested website in
2003 Jun 25
2
Pairs with different colours
Does anybody know how to make pairs graphics with dots of different colours depending on the value of a categorical variable ? Thanks, Arnaud ************************* Arnaud DOWKIW Department of Primary Industries J. Bjelke-Petersen Research Station KINGAROY, QLD 4610 Australia T : + 61 7 41 600 700 T : + 61 7 41 600 728 (direct) F : + 61 7 41 600 760 **************************
2003 Jul 02
2
user mannual
Dear Sir I have successfuly downloaded R package. Kindly let me know where i will get _/*user mannual*/_ for the same. awaiting a prompt reply with regards Pankaj @#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@ Pankaj Kumar Research Scholar Climatology & Hydrometeorology Divison Indian Institute Of Tropical Meteorology Homi Bhabha Road, Pune-411008 India Phone No. +91-20-5893600 Ext. 361
2003 Jul 08
2
exporting help
i need step by step directions on how to export a text file into the r file
2003 Jul 10
1
Simple linear regression
Dear all, My friend wants to fit a model of the type z = a x^n y^m + b, where x, y, z are data and a, b, n, m are unknown parameters. How can he transform this to fit in the linear regression framework? Any help would be appreciated. With regards, Gorazd Brumen -- Mail 1: gbrumen at student.ethz.ch Mail 2: gorazd.brumen at fmf.uni-lj.si Tel.: +41 (0)1 63 34906 Homepage:
2003 Jul 17
1
Rpart question - labeling nodes with something not in x$frame
I have a tree created with tr.hh.logcas <- rpart(log(YCASSX + 1)~AGE+DRUGUSEY+SEX+OBSXNUM +WINDLE, xval = 10) I would like to label the nodes with YCASSX rather than log(YCASSX + 1). But the help file for text in library rpart says that you can only use labels that are part of x$frame, which YCASSX is not. Is there a way to do what I want? Thanks in advance Peter Peter L. Flom, PhD
2003 Aug 01
1
(no subject)
> Hello, > My question is very simple. I have installed R from the internet and I want to use it to analyse my data set. It seems that R is not able to make the > connection when I use the read.table () function since it probably doesn't know where is the required file. Where am I suppose to save my file ? > Thanks > > Marc-Antoine Vaillant > Actuarial Analyst > Les
2003 Aug 07
2
function "lme"
Thanks to everyone who replied to my first problem. Here is the second one: Is the function "lme" (Mixed Model) also in a foreign library(shouldnt, as this is a basic statistical function)? I am trying to use lme in R and it replies that it couldnt find the function lme...weird... Thanks for replying!
2003 Aug 11
2
default directory RGui for windows NT
Hello, Can anyone tell me how to change the default directory in RGui for windows NT? Thanx, Roy
2003 Aug 12
1
Princomp function in R
Hi, I want to use Princomp function in R, but com up an error as " Error: couldn't find function "princomp" ", can you help me resolve this problem? Thanks, Jixin Dai, Ph.D
2003 Sep 04
1
ANOVA/MANOVA
Hello, I have to do an ANOVA (or is it a MANOVA) with 6 Variables (called HsL, LsH, Hp, Lp, G, and) and 6 categories (OQ, Go, RC, AV, CC, Sk), the examples in the literature couldn't help me so far. Who can help me?? Thank Britta
2003 Sep 11
2
Sorting
What is the best way to sort a dataframe? For example, how would I go about sorting a dataframe (with variables V1-V5) by ascending V1, V2 and descending V3 while retaining V4 and V5. Also, is there a relatively easy way by which to re-order my columns? Thank you for your time. Marc Marc Zodet [[alternative HTML version deleted]]
2003 Oct 02
1
(no subject)
Dear Sir, I am system administrator for sun solaris 2.8. I have no idea about the functioning of the R software. I had installed. I tried testing some of the programs and functions. I read in the manual that plot(x,y) functions automatically generates a graphical window and plot. that does not happens in my installation. Please help me in this regard yours sincerely. Arunkumar
2003 Oct 06
2
installation of R
Hi, I wish to install R on my computer but I do not know how to do this. I have a Windows ME. Please advise on how to install R. Thank you. Stefanie [[alternative HTML version deleted]]
2003 Aug 13
3
Books for R
As a newbie to R, I need to learn my way around (no previous experience of S).What books, doc for R are recommended? I'm interested primarly in non linear regression and process modelling (and have downloaded the R documentation from the site). Thanks for all tips Anne
2003 Aug 20
1
Neural Networks in R
Hello! We are a group of three students at Bielefeld University currently working on a statistical projects about neural networks. Within the framework of this project we are supposed to use the nnet-function in R and explain how it works. Since anyone of us has much experience in using R we hoped to find some information on your homepage. Unfortunatelly, we haven't been very successfull so