[R] p values for a GEE model
Hi all, I have a dataset in which the output Y is observed on two groups of patients (treatment factor T with 2 levels). Every subject in each group is observed three times (not time points but just technical replication). I am interested in estimating the treatment effect and take into account the fact that I have repeated measurements for every subject. If I do this with repeated measures ANOVA (in which the patient is considered a random effect) I got the following results: library(nlme) data-read.table(http://146.9.88.18/uploads/dataGEE.txt,header=TRUE) res-lme(Y~T,random=~1|P,data=data) summary(res) So the p-value for significance of the treatment effect is 0.069. I would like to use also as a variant analysis a Generalized Estimation Equation Model, like library(gee) summary(gee(Y~T,id=P,data=data)) Questions: A) Is the gee approach suitable in this case with the model formulae I use? B) Can I obtain a p-value for the fixed effect T ? Thanks, Laurentiu Tarca [[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
[R] passing arguments from nnet to optim
Hi everyone, According to R reference manual, the nnet function uses the BFGS method of optim to optimize the neural network parameters. I would like, when calling the function nnet to tell the optim function not to produce the tracing information on the progress of the optimization, or at least to reduce the frequency of the reports. I tried the following: a) nnet default x-rnorm(20) y-seq(0,1,length=20) s-nnet(y~x,size=1) # weights: 4 initial value 1.910932 iter 10 value 1.819382 iter 20 value 1.788736 iter 30 value 1.775778 iter 40 value 1.767771 iter 50 value 1.765063 iter 60 value 1.762631 iter 70 value 1.760670 iter 80 value 1.759349 iter 90 value 1.757801 iter 100 value 1.756290 final value 1.756290 stopped after 100 iterations Report is generated at every 10 iterations. b) passing the REPORT parameter to optim via the control argument x-rnorm(20) y-seq(0,1,length=20) s-nnet(y~x,size=1,control=list(REPORT=50)) # weights: 4 initial value 1.894905 iter 10 value 1.672337 iter 20 value 1.658612 iter 30 value 1.654824 iter 40 value 1.653465 iter 50 value 1.652785 iter 60 value 1.652343 iter 70 value 1.652116 iter 80 value 1.651860 iter 90 value 1.651525 iter 100 value 1.651292 final value 1.651292 stopped after 100 iterations Is still producing reports at each 10 iterations. Has anyone an idea how can I turn off the report generation or at least to reduce its frequency? Thanks, Adi L. TARCA __ 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
[R] nnet classification using unbalanced classes
Hi everybody, I want to obtain a classification model using the nnet function for a simple two class problem. My problem is that number of samples in the first class (n1) is about twice higher than the one in class two (n2). I would like to use the weights argument in the nnet function to equalize the prior probabilities, but I am not sure which values I should assign. My first guess would be to set the weights of samples in the larger class to n2/n1 and those for the second class to 1. Is it the best thing to do? Any suggestion would be appreciated. Laurentiu __ 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
[R] building R libraries (windows) - R CMD check problems
Hi everyone, I am trying to build a R library called nnNorm but I have some troubles checking and installing it. Here is the setup: If I don't use a inst\doc directory(with the vignettes files) in my source, the install step is working fine: C:\testRCMD INSTALL nnNorm -- Making package nnNorm adding build stamp to DESCRIPTION installing R files installing man source files installing indices installing help Building/Updating help pages for package 'nnNorm' Formats: text html latex example compNorm texthtmllatex example maNormNN texthtmllatex example nnNorm-internal texthtmllatex Building/Updating help pages for package 'nnNorm' Formats: chm adding MD5 sums * DONE I do verify the .html documentation and all looks great. However, by just adding the directory inst\doc containing the nnNorm.Rnw and nnNorm.bib files when I try to install again I receive the following error: -- Making package nnNorm adding build stamp to DESCRIPTION installing R files installing inst files FIND : format incorrect de paramètre make[2]: *** [C:/R/rw1090/library/nnNorm/inst] Error 2 make[1]: *** [all] Error 2 make: *** [pkg-nnNorm] Error 2 *** Installation of nnNorm failed *** The second trouble (perhaps related with this one) is when I perform the RCMD check. -- Making package nnNorm adding build stamp to DESCRIPTION installing R files installing inst files FIND : format incorrect de paramètre make[2]: *** [C:/test/nnNorm.Rcheck/nnNorm/inst] Error 2 make[1]: *** [all] Error 2 make: *** [pkg-nnNorm] Error 2 *** Installation of nnNorm failed *** * checking package directory ... OK * checking for portable file names ... OK * checking DESCRIPTION meta-information ... OK * checking package dependencies ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for syntax errors ... OK * checking R files for library.dynam ... OK * checking S3 generic/method consistency ... OK * checking for replacement functions with final arg not named 'value' ... OK * checking foreign function calls ... OK * checking Rd files ... ERROR Rd files with unbalanced braces: man/compNorm.Rd man/maNormNN.Rd man/nnNorm-internal.Rd Unbalanced braces are Rd syntax errors, and result in incorrect documentation. It points me to unbalanced braces, but there are no such error. I tried using simple .Rd file with like: \name{functionName} \eof but I still get the same error. The .Rwn file is ok because the vignettes creation works smoothly: C:\testRCMD build nnNorm * checking for file 'nnNorm/DESCRIPTION' ... OK * preparing 'nnNorm': * checking whether 'INDEX' is up-to-date ... OK * creating vignettes ... OK * removing junk files * building 'nnNorm_1.0.tar.gz' Has anyone an idea what the problem might be ? I am using Win XP, R 1.9.0. Thanks, Laurentiu Tarca [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] nnet function
Hi I got two questions about the nnet function in R. I would be thankful to have an answer. 1) Does the function intrinsically normalize the X and Y matrices before the training, or normalization should be done by the user. 2) I need to understand the $wts matrix. I do imagine that it is a single column transformation of the two matrices of weighs (input to hidden Ninputs+1 x Nodes) and hidden to output (Nodes+1 x Noutputs). Thanks -- Dr. Laurentiu Adi Tarca Post Doc. in Bioinformatics Forest Biology Research Center C-E-Marchand Bld, 3113 Laval University Quebec, (Qc) G1K-7P4 Tel: 656-2131 ext. 4509 e-mail: [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html