[R] problem installing R packages in Windows Vista

2008-12-24 Thread norman Maiwashe
** High Priority **

I have recently installed the R program in Windows Vista. However, I am 
experiencing problem installing some of the packages. Specifically, I wanted to 
install BRugs package running R as an administrator. I issued the following 
command in R and received the following error message.

 install.packages(BRugs)
Warning in install.packages(BRugs):
  argument 'lib' is missing: 'C\Users\norman\Documents/R/win-library/2.8'
Warning: unable to access index for repository 
http://cran-za.r-project.org/bin/windows/contrib/2.8 
Warning: unable to access index for repository 
http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/2.8 
Warning message: package 'BRugs' is not available

Your prompt response will be greatly appreciated.



Disclaimer\ \ This message is confidential and may be co...{{dropped:20}}

__
R-help@r-project.org 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] problem installing R packages in Windows Vista

2008-12-24 Thread Prof Brian Ripley

This is not a problem in R, but with Internet access from your system.
It is an FAQ, see
http://cran.r-project.org/bin/windows/base/rw-FAQ.html#The-Internet-download-functions-fail_002e

Another possibility is to download the file
http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/2.8/BRugs_0.4-2.zip
and use the menu item to install from a local zip file.

On Wed, 24 Dec 2008, norman Maiwashe wrote:


** High Priority **


Please make it a high priority to read the posting guide and rw-FAQ: see 
the footer to this message.


I have recently installed the R program in Windows Vista. However, I am 
experiencing problem installing some of the packages. Specifically, I 
wanted to install BRugs package running R as an administrator. I issued 
the following command in R and received the following error message.


I don't see an *error* message here.  (warning != error .)  It is warning 
you of a problem on your machine or, possibly, the system you are 
accessing.



install.packages(BRugs)

Warning in install.packages(BRugs):
 argument 'lib' is missing: 'C\Users\norman\Documents/R/win-library/2.8'
Warning: unable to access index for repository 
http://cran-za.r-project.org/bin/windows/contrib/2.8
Warning: unable to access index for repository 
http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/2.8
Warning message: package 'BRugs' is not available

Your prompt response will be greatly appreciated.



Disclaimer\ \ This message is confidential and may be co...{{dropped:20}}

__
R-help@r-project.org 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,  rip...@stats.ox.ac.uk
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

__
R-help@r-project.org 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] filling values in a vector using smaller vector

2008-12-24 Thread Patrick Burns

I believe the following does what is wanted:

desired - large
desired[large] - small


Patrick Burns
patr...@burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and A Guide for the Unwilling S User)

Milton Huang wrote:

Dear list members:

I am looking for an elegant (or efficient) way to accomplish the following:

take a large boolean vector and fill the TRUE values with the values from a 
smaller boolean vector that has a length that is the number of TRUE values of 
the large vector.


Example:

large- c(FALSE, FALSE, FALSE, TRUE, FALSE, FALSE,  TRUE, FALSE, FALSE, FALSE,  
TRUE, FALSE)


small- c(TRUE, FALSE, TRUE)

desired output = c(FALSE, FALSE, FALSE, *TRUE*, FALSE, FALSE,  *FALSE*, FALSE, 
FALSE, FALSE, *TRUE*, FALSE)


(without the asterisks! )

my first thought as someone new to R was 
ifelse(large,small, large)


but that returns: c(FALSE FALSE FALSE  TRUE FALSE FALSE  TRUE FALSE FALSE 
FALSE FALSE FALSE) because small is cycled to match the size of large instead 
of the size of the TRUE subset of large.


I am guessing that there is probably a way to do this without writing a loop, 
but I just don't know the syntax.


-mph

__
R-help@r-project.org 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@r-project.org 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] filling values in a vector using smaller vector

2008-12-24 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote:
 Milton Huang wrote:
   
 
 Dear list members:

 I am looking for an elegant (or efficient) way to accomplish the following:

 take a large boolean vector and fill the TRUE values with the values from a 
 smaller boolean vector that has a length that is the number of TRUE values 
 of 
 the large vector.

 Example:

 large- c(FALSE, FALSE, FALSE, TRUE, FALSE, FALSE,  TRUE, FALSE, FALSE, 
 FALSE,  
 TRUE, FALSE)

 small- c(TRUE, FALSE, TRUE)

 desired output = c(FALSE, FALSE, FALSE, *TRUE*, FALSE, FALSE,  *FALSE*, 
 FALSE, 
 FALSE, FALSE, *TRUE*, FALSE)


   
 replace(large, which(large), small)
   

in fact, this will do:

replace(large, large, small)

vQ

__
R-help@r-project.org 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] 4 questions regarding hypothesis testing, survey package, ts on samples, plotting

2008-12-24 Thread Peter Dalgaard

Ben Bolker wrote:



Khawaja, Aman wrote:

I need to answer one of the question in my open source test is: What are
the four questions asked about the parameters in hypothesis testing?




Please check the posting guide.
* We don't answer homework questions (open source doesn't mean
that other people answer the questions for you, it means you can find
the answers outside your own head -- and in any case, we don't have
any of way of knowing that the test is really open).
* this is not an R question but a statistics question
* please don't post the same question multiple times



Besides, this is really unanswerable without access to your teaching 
material, which probably has a list of four questions somewhere...


It is a bit like the History question: Who was what in what of whom?


(Answer: King Gustav Adolf was a thorn in the eye of Christian IV)



--
   O__   Peter Dalgaard Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark  Ph:  (+45) 35327918
~~ - (p.dalga...@biostat.ku.dk)  FAX: (+45) 35327907

__
R-help@r-project.org 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] selecting a subset of a matrix based on a value occurring in 5 records

2008-12-24 Thread Veslot Jacques
 mat[,colSums(mat!=0)=5]

Jacques VESLOT

CEMAGREF - UR Hydrobiologie

Route de Cézanne - CS 40061  
13182 AIX-EN-PROVENCE Cedex 5, France

Tél.   + 0033   04 42 66 99 76
fax+ 0033   04 42 66 99 34
email   jacques.ves...@cemagref.fr  


-Message d'origine-
De : r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] De la 
part
de Bob Green
Envoyé : mercredi 24 décembre 2008 13:17
À : r-help@r-project.org
Objet : [R] selecting a subset of a matrix based on a value occurring in 5 
records


Hello,

I am hoping for some advice as to how I might create a subset of a
matrix. The matrix is  176  x 3530. The rows are individual records
and the columns words. I want to create a new matrix that only
consists of words which occur in at least 5 records.  For example,
if column 7 is charges and this only appears in 4 records/rows
this variable would not be included, whereas if column 109 was the
word monitor and occurred in 95 records it would be saved into the
new matrix. Values in the matrix are  numbers, such that if a word
does not occur in a  record the cell contains a zero, whereas if it
occurs 7 times there is a value of 7 for that record. It is the
number of records rather than the than the column total that is the
criteria for determing inclusion into the matrix.


Any suggestions on how I might reduce the size of this matrix so as
to include only those columns in which a word occurs at least in 5
records is much appreciated,

regards

Bob

__
R-help@r-project.org 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@r-project.org 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] Using 'cat' on data frame

2008-12-24 Thread David Winsemius


On Dec 24, 2008, at 2:35 AM, Gundala Viswanath wrote:


Dear all,

I have the following data frame:


raw.count

   Var1
Freq
1 AA   707
2 AC14
3 AT 3

But why when printint it using 'cat', it doesn't print
the desired string AAA ?


cat(raw.count$Var1, \n)

1 2 3

What's wrong with my cat command above.


What's wrong is that Var1 is a factor rather than a character  
vector. Veslot's answers provide the proper method for dealing with  
that situation.


--
David Winsemius





- Gundala Viswanath

__
R-help@r-project.org 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@r-project.org 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] Viewing code

2008-12-24 Thread Stephen Collins
How do you view the code for a built-in R command (i.e.,  if I want to see 
what R is doing when I run a glm() statement)?

Regards,

Stephen

[[alternative HTML version deleted]]

__
R-help@r-project.org 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] Fata; error:

2008-12-24 Thread Rowe, Brian Lee Yung (Portfolio Analytics)
Hi Antonio,

Sounds like your .RData file might be corrupt. Did you try deleting it
(or renaming it) and starting R again?

The .RData file should be in the directory where you started R.

HTH,
Brian

-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On Behalf Of Antonio Paredes
Sent: Wednesday, December 24, 2008 12:45 PM
To: r-help@r-project.org
Subject: [R] Fata; error:


I just installed R 2.8.1 for windows. When I try to start the software I
get
the following:

Fatal error: unable to restore saved data in .RData.

Note that on my previous section I tried to read a large dataset and I
got a
message stating that no enough memory was avaliable (I don't have the
complete log for that section)

I wanted to ask how can I go about solving this problem, or do I need to
remove and then reinstall R in order to solve the problem.

I also wanted to know if someone can provide me with a reference (pdf,
published book, or article) about the difference aspects of dealing with
memory in R.


-- 
-Tony

[[alternative HTML version deleted]]

__
R-help@r-project.org 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.

--
This message w/attachments (message) may be privileged, confidential or 
proprietary, and if you are not an intended recipient, please notify the 
sender, do not use or share it and delete it. Unless specifically indicated, 
this message is not an offer to sell or a solicitation of any investment 
products or other financial product or service, an official confirmation of any 
transaction, or an official statement of Merrill Lynch. Subject to applicable 
law, Merrill Lynch may monitor, review and retain e-communications (EC) 
traveling through its networks/systems. The laws of the country of each 
sender/recipient may impact the handling of EC, and EC may be archived, 
supervised and produced in countries other than the country in which you are 
located. This message cannot be guaranteed to be secure or error-free. This 
message is subject to terms available at the following link: 
http://www.ml.com/e-communications_terms/. By messaging with Merrill Lynch you 
consent to the foregoing.
--

__
R-help@r-project.org 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] Tick and Label Color in Plot

2008-12-24 Thread Lorenzo Isella

Dear All,
I would like to plot two quantities using two different scales along the 
two vertical y axes.
On top of this, I would like to use two different colors (let us say red 
and blue) for the two vertical axes, their labels, their ticks and the 
text for each tick.


I paste below a code snippet

x - c(4,10,50,98)
temp - c(1.3e-1,4.92e-2,9.48e-3,4.84e-3)
conc  - c(1.92,5.08,26.35,51.56)
conc2 - c(7.5e-1,1.14,2.12,4.7)

b - diff(range(temp))/diff(range(conc))
a - min(temp) - b*min(conc)

pdf(D_k_and_R_mobility.pdf)
par(mar=c(4.5,5,2,4.2)+0.1)
plot(x, temp, 
type=b,lwd=2,col=transparent,lty=2,xlab=expression(paste(k))

,ann=FALSE,yaxt=none, ylim=range(c(0.,1.4e-1)), xaxt=none,
xlim=range(c(0,100)),cex.lab=1.4,cex.axis=1.2)

lines(x, temp, col=blue,type=b,lwd=2,lty=1,pch=2)

ticks -c(0, 0.035,0.07,0.105, 0.14)
axis(side=2,at=ticks,labels=FALSE, col = blue,cex.lab=1.4,cex.axis=1.2)
mtext(side = 2, text = ticks, at = ticks, col = blue, line = 
1,cex.lab=1.4,cex.axis=1.2)
mtext(side = 2, text = expression(paste(D[k])), line = 
3,cex.lab=2.4,cex.axis=6.2, col=blue)



ticks -c(0, 25,50,75, 100)
axis(side=1,at=ticks, labels = ticks, col = 
black,cex.lab=1.4,cex.axis=1.2)


lines(x, a + b*conc, col=red,type=b,lwd=2,lty=1,pch=4)
lines(x, a + b*conc2, col=red,type=b,lwd=2,lty=1,pch=6)

ticks -c(0,10,20,30,40,50)
axis(4, at=a + b*ticks, labels=ticks,cex.lab=1.4,cex.axis=1.2, 
col=red) #this controls the 4th axis and what I want to do there!

mtext(expression(paste(R[g(m)])),cex=1.4, 4, 3, col=red)
legend(50,0.1, c(expression(paste(D[k])),
expression(paste(R[m])),expression(paste(R[g]))), 
lwd=c(2,2,2),lty=c(2,1,1),pch = c(1,4,6),col=c(blue, 
red,red),box.lwd=1,box.lty=1,

,xjust = 1, yjust = 1)

dev.off()

The result is NOT what I am looking for, since I am having a lot of 
troubles in tuning both the color and the size of the labels, tick 
locations and so on.

Can anyone fix this example? I had a look at

http://tolstoy.newcastle.edu.au/R/help/03b/2708.html
and
http://www.mail-archive.com/r-h...@stat.math.ethz.ch/msg07033.html

but obviously I am not quite there yet.
Kind Regards and merry Xmas

Lorenzo

__
R-help@r-project.org 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] Viewing code

2008-12-24 Thread jim holtman
since 'glm' is an object, just type its name at the command prompt:

 glm
function (formula, family = gaussian, data, weights, subset,
na.action, start = NULL, etastart, mustart, offset, control =
glm.control(...),
model = TRUE, method = glm.fit, x = FALSE, y = TRUE, contrasts = NULL,
...)
{
call - match.call()
if (is.character(family))
family - get(family, mode = function, envir = parent.frame())
if (is.function(family))
family - family()
if (is.null(family$family)) {
print(family)
stop('family' not recognized)
}
 ...

On Wed, Dec 24, 2008 at 12:49 PM, Stephen Collins
stephen_coll...@aon.com wrote:
 How do you view the code for a built-in R command (i.e.,  if I want to see
 what R is doing when I run a glm() statement)?

 Regards,

 Stephen

[[alternative HTML version deleted]]

 __
 R-help@r-project.org 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.




-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?

__
R-help@r-project.org 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] Non-finite finite difference error

2008-12-24 Thread Jason Augustyn
Ravi, thank you for the explanation - that makes perfect sense, and it
wouldn't have occurred to me to suspect a negative parameter based on the
error. Using the elaborated syntax from the help page yields a lovely fit.
Regards,

Jason



On Wed, Dec 24, 2008 at 10:57 AM, Ravi Varadhan rvarad...@jhmi.edu wrote:

 Hi Jason,

 The error message indicates that there was problem in estimating the
 gradient of objective function.  It has nothing to do with your second data
 point.  This could happen for a variety of reasons, but the most proximate
 cause of the problem seems due to a parameter being negative during the
 iteration.  The best solution, most often, is to provide a better (or
 atleast a different) starting value.  Look at the example in the help page
 for fitdistr:

 fitdistr(x, dgamma, list(shape = 1, rate = 0.1), lower = 0.01)

 Note that the above command specifies lower bounds on both the shape and
 the rate parameter (hence a different optimziation algorithm will be used in
 optim).

 Best,
 Ravi.
 

 Ravi Varadhan, Ph.D.
 Assistant Professor,
 Division of Geriatric Medicine and Gerontology
 School of Medicine
 Johns Hopkins University

 Ph. (410) 502-2619
 email: rvarad...@jhmi.edu


 - Original Message -
 From: js.augus...@gmail.com
 Date: Tuesday, December 23, 2008 11:27 pm
 Subject: [R] Non-finite finite difference error
 To: r-help@r-project.org


  Hello, I'm trying to use fitdistr() from the MASS package to fit a
  gamma
   distribution to a set of data. The data set is too large (1167
  values) to
   reproduce in an email, but the summary statistics are:
 
   Min. 1st Qu. Median Mean 3rd Qu. Max.
   116.7 266.7 666.7 1348.0 1642.0 16720.0
 
   The call I'm trying to make is:
   fitdistr(x,gamma)
 
   and the error is:
   Error in optim(x = c(3466.676842, 1666.749002, 2500.067852,
  1200.053892, :
   non-finite finite-difference value [2]
   In addition: Warning message:
   In dgamma(x, shape, scale, log) : NaNs produced
 
   I found a couple of other posts from folks who were getting the same
  error
   from optim(), but did not find any useful tips for my situation. The
  error
   seems to indicate a problem with value 2 in my data set
  (1666.749002), but
   nothing seems odd about that value.
 
   I'm willing to pass along the full data set as an attachment if it
  would
   help.
 
   Thank you in advance!
 
   Jason S. Augustyn, Ph.D.
 
[[alternative HTML version deleted]]
 
   __
   R-help@r-project.org mailing list
 
   PLEASE do read the posting guide
   and provide commented, minimal, self-contained, reproducible code.


[[alternative HTML version deleted]]

__
R-help@r-project.org 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] filling values in a vector using smaller vector

2008-12-24 Thread Wacek Kusnierczyk
Milton Huang wrote:
 Thank you both for such beautiful solutions.  Just what I was looking for!  I 
 love the Internet, R, and the R-list!  There is so much opportunity to learn. 
  
 In fact, looking at the replace function, I see the two solutions are the 
 same:

   
 replace
 
 function (x, list, values)
 {
 x[list] - values
 x
 }
 environment: namespace:base

   

not exactly.  an application of replace generates a local copy of the
data, and whatever you pass to replace as x will not be modified, while
if you do the assignment yourself, you'll modify the data.


 Thanks again.  You made my day.  Have a happy holiday season.
   

you too!  meRRy chRistmas and a happy new yeaR to all subscRibeRs.

vQ

__
R-help@r-project.org 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] statistical significance, nonlinear regression

2008-12-24 Thread adam99

I am using nonlinear regression to fit a couple of variables to a set of
measurements. I would like to do some significance tests for the estimated
parameters. I am able to check the confidence intervals using the Jacobian
coming out of nonlinear regression. 

I do see in a paper which shows t-value (it says estimated by White
method??), f-value, f-test, and j-test, are these available in matlab, or I
could code them myself but I need details about these tests. I would be glad
if you could provide a reference...

Thanks
-- 
View this message in context: 
http://www.nabble.com/statistical-significance%2C-nonlinear-regression-tp21156969p21156969.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org 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] How to skip re-installing CRAN packages when updating R?

2008-12-24 Thread Sean Zhang
Dear R-helpers:

I am new to R and would like to seek your expert opinion on installation
tip. Many thanks in advance.
I want to update my R  to the newest  version and wonder the following two
questions:

Question 1:
How can I install R and its contributed packages in a way so when updating R
in the future, I do NOT need to
re-install contributed packages used by R of last version.

Question 2:
Is it an ok-practice to just install all the CRAN packages (i.e.,
install.packages(available.packages()[,1]) ). Does someone do so?
The reason I ask the second question is that if installing all available
packages does Not consume too much time (say less than 2 hours), too much
computer resource (I have big harddrive, so harddrive is probably not a
concern. I guess computing speed will not be affected but not sure...)
then, I do not need to bother Question 1 and will just install all available
packages when updating R.

Many Thanks in advance.

Merry Christmas!

-Sean

[[alternative HTML version deleted]]

__
R-help@r-project.org 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] snowfall sfInit error

2008-12-24 Thread Jochen Knaus

Dear Mr. Ripley,

snowfall 1.7 is finished, and is now working on Windows as intended - 
sorry for my oversight of that error. The given example now runs (as a 
sidenote: snow does not have to loaded explicitely, snowfall will do that).


Also the NWS startup is fixed now (thanks to M. Schmidtberger for a 
small patch) and an error in sfSapply is fixed.


Otherwise minor things were corrected or added.

I uploaded the package to CRAN yesterday and beside it is downloadable 
from our site http://www.imbi.uni-freiburg.de/parallel


Greetings, Jochen Knaus


On Sat, 6 Dec 2008, chi...@gmail.com wrote:


Dear all,

I am trying to execute the simple example in snowfall
http://cran.r-project.org/web/packages/snowfall/vignettes/snowfall.pdf 
...


require(snow)
require(snowfall)
sfInit( parallel=TRUE, cpus=2 )
sfLapply( 1:10, exp )
sfStop()

I have installed the snow and snowfall packages in R on a machine with
windows xp, however, after running the sfInit( parallel=TRUE, cpus=2 )
line I get an error ...

Error in system(whoami, intern = TRUE, ignore.stderr = TRUE) :
 whoami not found
Error in paste(sep = _, R, uname, format(Sys.time(),
%H%M%S_%m%d%y)) :
 object uname not found

I am the only (administrator) user of the computer. It has a dual core
processor, and is not networked.

I would be greatful if someone could tell me how to proceed.


Follow the posting guide (see the footer of this message) and talk to 
the maintainer of 'snowfall'.  Most likely it is not intended to be 
used on Windows, but has not declared that.  'whoami' and 'uname' are 
Unix programs, not Windows ones, but R's Sys.info() provides 
equivalent information.




Kind regards

Chibisi

[[alternative HTML version deleted]]

__
R-help@r-project.org 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@r-project.org 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] Implementing a linear restriction in lm()

2008-12-24 Thread Serguei Kaniovski


Dear All!

I want to test a coeffcient restriction beta=1 in a univariate model lm
(y~x). Entering
lm((y-x)~1) does not help since anova test requires the same dependent
variable. What is the right way to proceed?

Thank you for your help and marry xmas,
Serguei Kaniovski

Austrian Institute of Economic Research (WIFO)

P.O.Box 91  Tel.: +43-1-7982601-231
1103 Vienna, AustriaFax: +43-1-7989386

Mail: serguei.kaniov...@wifo.ac.at
http://www.wifo.ac.at/Serguei.Kaniovski
[[alternative HTML version deleted]]

__
R-help@r-project.org 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] command Polygenic gives error message concerning dimensions of data

2008-12-24 Thread Veerle Bogaert

Dear Sir/Madam,

Since a few day now I try to use the command polygenic from the GenAbel 
package. However, I keep bumping up against an error message: Error in 
polygenic(Testo, kin = kinship, data = data1) : dimension of outcome and 
kinship.matrix do not match.


My data exists of 1240 individuals with 74 markers. It mainly consists of 
small families (2 or more brothers, father and mother; otherwise only the 
brothers are given). Genotypes are provided for the largest part of the 
members, whereas the phenotype is only given for the male individuals. I 
imported the data using the convert.snp.ped and load.gwaa.data commands. The 
kinship table was constructed with makekinship. When I look at the 
dimensions of the kinship table, it is exactly the same as the number of 
individuals in my dataset.


I also provide you with the following information because maybe that gives a 
clue on where things are going wrong. When using the genetic control method 
via the qtscore command, I get the following message: 
data1.qt-qtscore(Testo~age+BMI,data1) Warning messages: 1: In qtscore(Testo 
~ age + BMI, data1) :  265 observations deleted due to missingness 2: In 
qtscore(Testo ~ age + BMI, data1) : Number of observations  100, Lambda 
estimate is unreliable. Results for only a few SNPs are returned.


Can you tell me what I'm missing?

Thank you in advance,

Kindest Regards,


Veerle Bogaert
Ghent University Hospital
Veerle Bogaert
Ghent University Hospital
Department of Endocrinology 6K12 I.E.
De Pintelaan 185
9000 Ghent
Belgium
Tel +32 9 332 34 13
Fax +32 9 332 38 86

__
R-help@r-project.org 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] overwrite title

2008-12-24 Thread whizvast

Hi, useRs-

I have a plot with a title generated automatically. 
I need to overwrite the title, but I can't figure out how to do that. 
I've tried the following:

   title( abc, bg='white')

But, that does not set the title background as white.
Now I am stuck and need your help. Thanks-
-- 
View this message in context: 
http://www.nabble.com/overwrite-title-tp21156936p21156936.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org 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] overwrite title

2008-12-24 Thread David Winsemius
Lacking specifics about what you actually did, one can only guess.  
Have you yet tried setting
..., main =  ,  within the plot call, whatever that might have  
been?


Failing that, the way to specify the color of the main argument to  
title() is not bg (which is an argument for the plot device), but  
rather col.main   At least that is how I read the par() help page.


plot(1:10)
title(main = test)

#... now
title(main=test, col.main=white)

Doesn't completely white it out on my screen display.

--
David Winsemius



On Dec 24, 2008, at 2:27 PM, whizvast wrote:



Hi, useRs-

I have a plot with a title generated automatically.
I need to overwrite the title, but I can't figure out how to do that.
I've tried the following:

  title( abc, bg='white')

But, that does not set the title background as white.
Now I am stuck and need your help. Thanks-
--
View this message in context: 
http://www.nabble.com/overwrite-title-tp21156936p21156936.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org 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@r-project.org 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] statistical significance, nonlinear regression

2008-12-24 Thread Bert Gunter
Tests of statistical significance and/or confidence intervals for individual
parameters in nonlinear regression are often meaningless and misguided.
Nonlinear regression is **inherently** different than linear regression. It
may make no physical sense whatever to eliminate *any* of the parameters
describing, say, a series of interrelated chemical interactions. Determining
what sequence of nested models to consider (which is the only thing that
makes sense) is typically difficult and subject specific. Finally,
statistical inference for nonlinear models is almost never exact, and the
standard (e.g. likelihood based) approximations can be way off for small
samples and certain data configurations.

As for references -- are you kidding?! There are tons of books and papers
out there. As you did not provide your identity, we have no idea what line
of work you're in -- but you might start by looking for tutorials on the
subject pitched to your profession and level of statistical understanding.
Google is your friend here.

-- Bert Gunter
Genentech Nonclinical Statistics

-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of adam99
Sent: Wednesday, December 24, 2008 3:21 PM
To: r-help@r-project.org
Subject: [R] statistical significance, nonlinear regression


I am using nonlinear regression to fit a couple of variables to a set of
measurements. I would like to do some significance tests for the estimated
parameters. I am able to check the confidence intervals using the Jacobian
coming out of nonlinear regression. 

I do see in a paper which shows t-value (it says estimated by White
method??), f-value, f-test, and j-test, are these available in matlab, or I
could code them myself but I need details about these tests. I would be glad
if you could provide a reference...

Thanks
-- 
View this message in context:
http://www.nabble.com/statistical-significance%2C-nonlinear-regression-tp211
56969p21156969.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org 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@r-project.org 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] statistical significance, nonlinear regression

2008-12-24 Thread David Winsemius


On Dec 24, 2008, at 6:20 PM, adam99 wrote:



I am using nonlinear regression to fit a couple of variables to a  
set of
measurements. I would like to do some significance tests for the  
estimated
parameters. I am able to check the confidence intervals using the  
Jacobian

coming out of nonlinear regression.

I do see in a paper which shows t-value (it says estimated by White
method??), f-value, f-test, and j-test, are these available in  
matlab, or I
could code them myself but I need details about these tests. I would  
be glad

if you could provide a reference...


Gosset WS, On the Probable Error of the Mean. (1908), Biometrika, 6:1.
Fisher RA, The Distribution of the Partial Correlation Coefficient,  
(1924), Metron, 3: 329.


--
David Winsemius




Thanks
--
View this message in context: 
http://www.nabble.com/statistical-significance%2C-nonlinear-regression-tp21156969p21156969.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org 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@r-project.org 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] statistical significance, nonlinear regression

2008-12-24 Thread Gabor Grothendieck
See ?confint2 in the nlrwr package for confidence intervals and for more info
on hypothesis testing in nonlinear regression focused on R see the book
associated with that package.

On Wed, Dec 24, 2008 at 6:20 PM, adam99 adamquest...@gmail.com wrote:

 I am using nonlinear regression to fit a couple of variables to a set of
 measurements. I would like to do some significance tests for the estimated
 parameters. I am able to check the confidence intervals using the Jacobian
 coming out of nonlinear regression.

 I do see in a paper which shows t-value (it says estimated by White
 method??), f-value, f-test, and j-test, are these available in matlab, or I
 could code them myself but I need details about these tests. I would be glad
 if you could provide a reference...

 Thanks
 --
 View this message in context: 
 http://www.nabble.com/statistical-significance%2C-nonlinear-regression-tp21156969p21156969.html
 Sent from the R help mailing list archive at Nabble.com.

 __
 R-help@r-project.org 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@r-project.org 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] Class and object problem

2008-12-24 Thread Odette Gaston
Dear all,

I have a problem with accessing class attributes. I was unable to solve this
yet, but someone may know how to solve it.
I'm trying to extract some information from the summary, and Akaike
weight has the desired value.
Object for a model fitted using the glmmML function from the
glmmML package:
result - glmmML(cbind (y, n-y)~ x+a+b+c, family = binomial, data, 
cluster$B!K(B
library(MASS)
stepAIC(result)
Then calculated the delta AIC by hand (following is the best four).
model1 - 0.0
model2 - 1.8
model3 - 4.2
model4 - 6.2

Then followed equation as below:
*W -  exp(-0.5 * Delta) / sum(exp(-0.5 * Delta))*
However, result was always same value as [1] even each delta AIC is
different values.
I don't know why happened.

I've also tried Ben's AIC tab in the bbmle package under the Ben's
suggestion:
 summary - stepAIC(result)
 AICtab(summary)

When I try to run the code from within a package, error came up
as UseMethod(logLik) no method to use logLik.

 I've tried adding  slot -summary (result)
 slotName (slot)
but it didn't help, slotName is NULL.

Thanks for any kind of suggestions!
Odette

r-help@r-project.org

[[alternative HTML version deleted]]

__
R-help@r-project.org 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.