[R] summary of linear fixed effects model is different than the HSAUR book

2007-07-22 Thread Christopher W. Ryan
Running R 2.5.1 and a newly downloaded lme4 package on WinXP

I'm trying to work my way through Everitt and Hothorn's Handbook of
Statistical Analyses Using R, c 2006.  (No, it's not homework.)

Chapter 10 discusses linear mixed effects models for longitudinal data.
 I've called my long data frame BtheB.long

Here's the model from the book, which I run.
lmer1 - lmer(bdi ~ bdi.pre + months + treatment + drug + length + (1 |
subject), data = BtheB.long, method = ML, na.action = na.omit)

Here is the summary of the model that I see:

 summary(lmer1)
Linear mixed-effects model fit by maximum likelihood
Formula: bdi ~ bdi.pre + months + treatment + drug + length + (1 | subject)
   Data: BtheB.long
  AIC  BIC logLik MLdeviance REMLdeviance
 1885 1910 -935.3   1871 1866
Random effects:
 Groups   NameVariance Std.Dev.
 subject  (Intercept) 48.299   6.9498
 Residual 25.129   5.0128
number of obs: 280, groups: subject, 97

Fixed effects:
   Estimate Std. Error t value
(Intercept) 5.943722.24915   2.643
bdi.pre 0.638190.07759   8.225
months -0.717030.14606  -4.909
treatmentBtheB -2.373111.66368  -1.426
drugYes-2.797861.71993  -1.627
length6m   0.256391.63213   0.157

Correlation of Fixed Effects:
(Intr) bdi.pr months trtmBB drugYs
bdi.pre -0.678
months  -0.264  0.023
tretmntBthB -0.389  0.121  0.022
drugYes -0.071 -0.237 -0.025 -0.323
length6m   -0.238 -0.242 -0.043  0.002  0.158


But on page 169, summary() is shown to produce additional columns in the
fixed effects section, namely degrees of freedom and the P-value (with
significance stars).

How can I produce that output?  Am I doing something wrong?  Has lme4
changed?

Thanks.

-- 
Christopher W. Ryan, MD
SUNY Upstate Medical University Clinical Campus at Binghamton
40 Arch Street, Johnson City, NY  13790
cryanatbinghamtondotedu
PGP public keys available at http://home.stny.rr.com/ryancw/

If you want to build a ship, don't drum up the men to gather wood,
divide the work and give orders. Instead, teach them to yearn for the
vast and endless sea.  [Antoine de St. Exupery]

__
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] THANK YOU: Updating R version

2007-07-13 Thread Christopher W. Ryan
This sounds like a solution I've been looking for.  With this setup now
in place, when you download and install some new packages, where will
they be put?  Into C:\myRlib ?

Thanks.

--Chris
Christopher W. Ryan, MD
SUNY Upstate Medical University Clinical Campus at Binghamton
40 Arch Street, Johnson City, NY  13790
cryanatbinghamtondotedu
PGP public keys available at http://home.stny.rr.com/ryancw/

If you want to build a ship, don't drum up the men to gather wood,
divide the work and give orders. Instead, teach them to yearn for the
vast and endless sea.  [Antoine de St. Exupery]

Raghu Naik wrote:
 Based on the feedback received, I did the following:
 
 a) moved my lib sub-directory from the existing installed R version to
 c:\myRLib
 b) installed the updated R version
 c) created .Renviron file in the home directory (C:\R-2.5.1) with the line
 R_LIBS=c:/myRLib
 d) used .libPaths() command to confirm that the new R installation was
 recognizing the myRLib sub-directory
 e) deleted my old R installation
 
 Things worked fine.
 
 Thanks you.
 
 
 
 -- Forwarded message --
 From: Raghu Naik [EMAIL PROTECTED]
 Date: Jun 2, 2007 5:13 PM
 Subject: Updating R version
 To: r-help@stat.math.ethz.ch
 
 A quick question.  I am trying to understand how I could move the installed
 packages in my R 2.3 version to the newly installed R 2.5 version, without
 having to install all the packages again. I copied the files under the old
 library subdirectory to the new library subdirectory. But still the newer
 version is not recognizing the packages that were copied over.
 
 Thanks.
 
   [[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.


[R] installing, removing, upgrading, and downgrading packages

2007-07-11 Thread Christopher W. Ryan
I'm very new to R, trying to learn it.  I started with R 2.4, but I have
since upgraded to 2.5.0, on WindowsXP.  I understand that 2.5.1 is now
available.

Last night in the course of things I loaded libraries coin and
survival.  I received warning messages that they had been built under
version 2.5.1.  However, as far as I could tell, they worked OK.  But
this brought some questions to mind:

I found the remove.packages() command.  Is there a way to revert a
package back to a previous version without removing it?  If not, and I
remove one version, how do I specify downloading a particular (earlier)
version?

Was that warning of any consequence?  Are there times when a package
will not work properly with an earlier version of R, and will this be
obvious to me when I try to use it?  Or in a more general sense, are
there foreseeable circumstances in which an older version of a package
would be necessary, rather than the newest one?

Should I keep my packages in a library folder outside of the R install
folder?  Right now, it appears that all the packages I download get
installed into a library subdirectory under my R250 directory.
Advantages and disadvantages of either method?

Thanks.
-- 
Christopher W. Ryan, MD
SUNY Upstate Medical University Clinical Campus at Binghamton
40 Arch Street, Johnson City, NY  13790
cryanatbinghamtondotedu
PGP public keys available at http://home.stny.rr.com/ryancw/

If you want to build a ship, don't drum up the men to gather wood,
divide the work and give orders. Instead, teach them to yearn for the
vast and endless sea.  [Antoine de St. Exupery]

__
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] elementary statistics with R (rkward?)

2007-07-11 Thread Christopher W. Ryan
As a fellow beginner, I also found Handbook of Statistical Analyses
Using R, by Brian Everitt, to be a very useful book.  There is an
accompanying R package, HSAUR.

Also Using R for Introductory Statistics, by John Verzani.  There is an
accompanying R package, UsingR.

Christopher W. Ryan, MD
SUNY Upstate Medical University Clinical Campus at Binghamton
40 Arch Street, Johnson City, NY  13790
cryanatbinghamtondotedu
PGP public keys available at http://home.stny.rr.com/ryancw/

If you want to build a ship, don't drum up the men to gather wood,
divide the work and give orders. Instead, teach them to yearn for the
vast and endless sea.  [Antoine de St. Exupery]

Charles Annis, P.E. wrote:
 Face the music and buy the book: _Introductory Statistics with R_ by Peter
 Dalgaard.  It's perfect for what you need.  It's clear and concise and will
 teach you statistics AND R as painlessly as such a thing can be.  It's
 inexpensive and you can get it on Amazon.com and every other major
 bookseller, including the nearest university bookstore.
 
 Charles Annis, P.E.
 
 [EMAIL PROTECTED]
 phone: 561-352-9699
 eFax:  614-455-3265
 http://www.StatisticalEngineering.com
  
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Donatas G.
 Sent: Wednesday, July 11, 2007 9:27 AM
 To: r-help@stat.math.ethz.ch
 Subject: [R] elementary statistics with R (rkward?)
 
 Hi, I am trying to learn some basic statistics stuff but I cannot find any
 elementary statistics exercises using R language. Using RKward would be even
 better...
 
 I need that in analysing sociological data, obtained through questionnairres
 -
 findind corelations between variables, relations between different types of
 data, etc.
 
 Could anyone recommend simple tutorials/exercises, available on www for me
 to
 work on?
 
 I realize it would be much simple to do this introductory stuff with spss,
 that
 everyone around me is using here in Lithuania, but I'd really like to learn
 to
 do it with R instead...


__
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] running Rcmdr

2007-06-27 Thread Christopher W. Ryan
I am very much a novice R user, and this is my first post to the List,
but given that disclaimer, perhaps you could put library(Rcmdr) as a
line in your Rprofile.site file?  I think this contains commands that
are run every time R is opened.  [At least, I noticed after I installed
my Tinn-R and got it to communicate with R, that certain R packages
necessary for use of Tinn-R now get run every time I open Tinn-R (and R
opens with it.)]

That way, typing R on the command line (might!) run Rcmdr too.

--Chris
Christopher W. Ryan, MD
SUNY Upstate Medical University Clinical Campus at Binghamton
40 Arch Street, Johnson City, NY  13790
cryanatbinghamtondotedu
PGP public keys available at http://home.stny.rr.com/ryancw/

If you want to build a ship, don't drum up the men to gather wood,
divide the work and give orders. Instead, teach them to yearn for the
vast and endless sea.  [Antoine de St. Exupery]

Manuel wrote:
 Yes, of course, i know it, and i have installed all packages i need, but 
 this is not what i am searching.
 I want to do that only with a command line without have to type only 
 first R  and after library(Rcmdr);  i only want to type something like 
 R  library(Rcmdr) but i know it´s doesn´t work and i´m looking for 
 something like that.
 I hope you have already understood my question. Thank you
 
 Felipe Carrillo escribió:
 If you have already installed Rcmdr from the internet (Cran site) then 
 when you open R window if you type library(Rcmdr) you 
 should see the R commander window and use it just like you would use R 
 command window.

 */Manuel [EMAIL PROTECTED]/* wrote:

 Thanks for your answer, but i think i dont do correctly my question.
 I need the command line to run Rmdr, like that:
 R  Rcmdr or R  loadRcmdr.R where loadRcmdr has library(Rcmdr).
 or something like that.
 I tried the last example, but when Rcmdr is executed, later it is
 closed.
 About RProfile.site, i dont know what i have to change. If you
 think its
 useful to me, please explain me.
 Thanks.

 Felipe Carrillo escribió:
  First, you need to install the Rcmdr packages and then in the R
  Command window or Tinn-R window type library(Rcmdr) without the
  quotation marks. In addition, if you want Rcmdr to start
 automatically
  everytime you start R, go to the following path C:\Program
  Files\R\R-2.5.0\etc\RProfile.site if you installed R in program
 files,
  otherwise follow your own path and type the same command
  library(Rcmdr) and the R commander window should pop up
 everytime you
  start R
 
 
  */Manuel /* wrote:
 
  Hi to all,
 
  i want to know how can run Rcmdr automatically , or how to load a
  library in the call of R
 
  greetings
 
  __
  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.
 
 
 
 
  Choose the right car based on your needs. Check out Yahoo! Autos
 new
  Car Finder tool.
 

 __
 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.


 
 Park yourself in front of a world of choices in alternative vehicles.
 Visit the Yahoo! Auto Green Center. 
 http://us.rd.yahoo.com/evt=48246/*http://autos.yahoo.com/green_center/;_ylc=X3oDMTE5cDF2bXZzBF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDZ3JlZW4tY2VudGVy
 
 __
 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.