Re: [R] Histogram plot help

2012-12-04 Thread YAddo
Thanks, Rui and David!



--
View this message in context: 
http://r.789695.n4.nabble.com/Histogram-plot-help-tp4651958p4652065.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] Histogram plot help

2012-12-03 Thread YAddo
Dear All:

I plotted a histogram with Abline, clipping with color codes but i run into
some problems.   The abline' does not show up at all,  and when i request
the 'prob=True' (to obtain the freqs), my clipped region colors the section
of the graph instead of the plot only.

Is there any way i can get the y-axis figures  to be in whole numbers rather
than decimals? 

Many thanks for your help.
YA

Here are the working codes i am tweaking.

Everything worked fine before i trying adding stuffs (prob=T, etc).


x - rnorm(1000)
hist(x, xlim=c(-4,4),ylab=Prevalence,prob=T,lwd=3,las=1)
lines(density(x),col=black,lwd=2)
usr - par(usr)
clip(usr[1], -2, usr[3], usr[4])
hist(x, col = 'red', add = TRUE)
clip(2, usr[2], usr[3], usr[4])
hist(x, col = 'blue', add = TRUE)
abline(v=c(-1),lty=1,lwd=3,col=black)
do.call(clip, as.list(usr))  # reset to plot region





--
View this message in context: 
http://r.789695.n4.nabble.com/Histogram-plot-help-tp4651958.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] Plot(x,y) help

2012-11-26 Thread YAddo
Dear All:

I would any appreciate any help with this plot I am struggling with.

I have 4 estimates (95% CIs) I want to plot. I want the CI lines to be
horizontal on each plotted point. I was trying to tweak some old codes  (was
for a vertical CI  lines) into horizontal but not much dice. 

Many thanks in advance for your help.

YA


My working codes:

x=c(1,1,1,1.1,1.1,1.1,2,2,2,2.1,2.1,2.1)
y=c(1.73,1.30,2.30, 1.83,1.36,2.45,1.46,1.07,2.00,1.58,1.15,2.17)

ptidx = seq(1,12,by=3)
lciidx = seq(2,12,by=3)
uciidx = seq(3,12,by=3)

plot(x,y, type=n,axes=F, xlab=PR(95% CI),ylab= )

points(x[ptidx],y[ptidx],pch=19,cex=4.5)
points(x[lciidx],y[lciidx],pch=_,cex=4.5)
points(x[uciidx],y[uciidx],pch=_,cex=4.5)
box()

for(i in 1:4)
{
 
lines(c(x[lciidx[i]],x[uciidx[i]]),c(y[lciidx[i]],y[uciidx[i]],lwd=4,cex=4.5))
  
}






--
View this message in context: 
http://r.789695.n4.nabble.com/Plot-x-y-help-tp4650874.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] Plot(x,y) help

2012-11-26 Thread YAddo
Thanks Jim and Rui.



--
View this message in context: 
http://r.789695.n4.nabble.com/Plot-x-y-help-tp4650874p4650906.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] Centering labels on X-axis

2012-10-20 Thread YAddo
Thanks Jim and Rui.

My apologies, i did not give enough info on my plot.

I am using : plot(x,y)  for a line plot.  I want to center the labels on the
x-axis for each tick.

Thanks.





--
View this message in context: 
http://r.789695.n4.nabble.com/Centering-labels-on-X-axis-tp4646761p4646888.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] Centering labels on X-axis

2012-10-19 Thread YAddo
Dear all:
I am trying to center labels on my plot with not much success. I have tried
text(), mtext() but it's not working. I think I am using the wrong function
for  my task.

 Any help will be appreciated.

My working codes.
axis(1,
at=c(1,2,3,4,5),font.lab=2,cex.axis=1.5,cex.lab=3,label=c(W0,CWH2,CWHmc,CH2,CHmc)
,text=c(1.5,2.5,3.5,4.5,5.5))

Many thanks in advance
YA



--
View this message in context: 
http://r.789695.n4.nabble.com/Centering-labels-on-X-axis-tp4646761.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] Conditional Logistic regression with random effects / 2 random effects logit models

2012-07-05 Thread YAddo
Dear All:

I am stuck on this problem and I could use some help from folks out there.  
I want to  build a conditional logistic model with random  effects or
logistic regression with 2 random effects.  I have data on mothers and their
kids.  I want to condition 1 mom predictor(0/1)  and also for sibling
clustering (multiple  kids per mom).

I would appreciate any info on a package to use, and a help on writing the
codes. 

Variables : 
MomID as random 1 ,  momcondpredictor(0/1) as random 2 , mommainpredictor +
covariate

kidoutcome(0/1)  regressed mompredictor1  + covariates  +  the 2 random
effects.

Many thanks for your help.

YA



--
View this message in context: 
http://r.789695.n4.nabble.com/Conditional-Logistic-regression-with-random-effects-2-random-effects-logit-models-tp4635528.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] calc.relimp pmvd for US R-user

2011-09-12 Thread YAddo
Dear All:

I am calculating  the relative importance of a regressor in a linear model. 
Does anyone know how I can obtain/install the 'pmvd' computation type? I am
a US user.

Regards,
Y 

--
View this message in context: 
http://r.789695.n4.nabble.com/calc-relimp-pmvd-for-US-R-user-tp3808752p3808752.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] Clearing Console; of weeks of codes!

2011-04-14 Thread YAddo
Dear All:

I do see I have weeks of codes in my console when I check with my arrow up
keys.  I have been clearing them with Control L but it seems to clear it
clear the screen temporally. I do see the previous codes again when I open R
the next day, after quitting the session! 

Q:
How do I clear this?


Thanks;

YA 

--
View this message in context: 
http://r.789695.n4.nabble.com/Clearing-Console-of-weeks-of-codes-tp3447506p3447506.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] Clearing Console- rm(list=ls(all=TRUE)) not working for me

2011-04-14 Thread YAddo
Dear all again:

I have been trying to clear weeks of codes in my R console, even after
quitting and coming back another day!.  One of you out there graciously
suggested this  rm(list=ls(all=TRUE)). I tried this but no dice. 

Codes tried.

Ctrl +L , clears for the time...  and the the latest i used ... 
rm(list=ls(all=TRUE))


Does anybody has another option of clearing the console of old codes?.


Thanks,
YA





--
View this message in context: 
http://r.789695.n4.nabble.com/Clearing-Console-rm-list-ls-all-TRUE-not-working-for-me-tp3448681p3448681.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] Clearing Console; of weeks of codes!

2011-04-14 Thread YAddo
Yep... Hitting the up arrow key upon the next initialization shows all the
previous codes.
I.e.  after  q() --- Y and re opening R console the next time.




--
View this message in context: 
http://r.789695.n4.nabble.com/Clearing-Console-of-weeks-of-codes-tp3447506p3450541.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] GAMLSS Question

2011-03-19 Thread YAddo
Dear All:

I have succeeded in fitting a GAMLSS.dist model to growth data I am working
with it.

My aim is to create a matrix of  predicted percentiles and the corresponding 
the fitted model's sigma mu nu by agebins.

Q:
How do it generate these parameters as in L M S per Cole and Green 1992?

Here are my working codes. 

  Name of fitted model is gamlssfit

 Agebin-seq(6,36,6)
centmatx
-centiles.pred(gamlssfit,xname=agemos,xvalues=Agebin,cent=c(10,25,50,75,90))

Although I got matrix of the percentiles by agebins, I want to obtain the L
M S/sigma mu nu corresponding to the same agebins.


Any help here will be appreciated.

Thanks,

Y Addo




--
View this message in context: 
http://r.789695.n4.nabble.com/GAMLSS-Question-tp3389986p3389986.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 on 'object(s) are masked from 'package:base

2011-03-15 Thread YAddo
Dear All:

I am a newbie to R.  I am trying to use the lmsqreg.fit pack, although I
have installed(I think) it I am not able to invoke it when  write the code
for it.  Here's what I got when I installed it. 

package 'lmsqreg' successfully unpacked and MD5 sums checked 


And here is what I got with library(lmsqreg):

Attaching package: 'lmsqreg'

The following object(s) are masked from 'package:base':   Version

Qs:

Has anybody encountered this problem before? 

How do I resolve this?

Thank you.


-Y Addo






--
View this message in context: 
http://r.789695.n4.nabble.com/Help-on-object-s-are-masked-from-package-base-tp3357163p3357163.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.