# Thread: Help! I am a newbie!

1. ## Help! I am a newbie!

Hi everyone,

I am a total newbie to Splus and R. Any help would be welcomed!

Three question:
1. How do I draw log(1+x) and x on the same graph, so I can compare log(1+x) and x?

2. If Y = Z[X with subscript 1] + (1-Z)[X with subscript 2], how can I simulate 1000 realizations of Y and draw a normal plot? (X with subscript 1 and X with subscript 2 are two bivariate normally distributed r.v.s)

3. How do a test Y using a Shapiro-Wilk test?

Thanks!

2. Welcome to the world of R. As a newbie to R you would be well advised to look at some of the manuals for beginners which can be found under the R/Splus/Info for R users (Links, Manuals, Books etc).

1.Plotting two series. Use plot function for the first series and then points or lines to add the second series. To find out more about these functions and see examples just enter a ? in front of the function, e.g. ?plot ?points ?lines

2.To produce a series or results for Y you need to assign a series of values to Z instead of a single value. You can do this with functions like rnorm, runif, seq, c, or sample, depending on what values you want to assign to z and whether you already have values to randomly select from, e.g.
Z<-data.frame(Index1=rnorm(1000), Index2=rnorm(1000))

3. Have a look at ?shapiro.test

Hope this helps
Mike

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts