[R] Categorize subjects using PCA

2017-01-26 Thread Dr.Vinay Pitchika
Hello everyone,

I have been analyzing dietary pattern data obtained via FFQ. We performed
Principal Component Analysis and decided to extract 3 dimensions (healthy,
unhealthy and mixed diet) and to adjust this in linear regression model
along with various other variables. However, our statistician was not happy
with the approach because the 3 dimensions we adjust do not have a measure.

So, I would like to classify the patients in our dataset using the PCA
results. Is it possible to classify all the patients into one of the 3
groups mentioned above?

Thank you
Vinay

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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 stop Kaplan-Meier curve at a time point

2013-11-20 Thread Dr.Vinay Pitchika
Hello R users

I have a question with Kaplan-Meier Curve with respect to my research. We
have done a retrospective study on fillings in the tooth and their survival
in relation to the many influencing factors. We had a long follow-up time
(upto 8yrs for some variables). However, we decided to stop the analysis at
the 6year follow up time, so that we can have uniform follow-up time for
all the variables.

I did play a bit with the formula and tried to stop the Kaplan-Meier curve
at my desired time (2190days)or roughly 6 years. However, my question is I
want to find the significance (log rank test) at this time point between
the two curves; because I am not able to find a way to stop the survfit at
this time point with my knowledge. Below is the code I used.

Gender2-survfit(Surv(Survival_days, Outcome)~Gender)

plot (Gender2, xmax=2190, mark.time=FALSE, col=c(1:2), xlab=Survival time
(Days), ylab=Survival probability, main=Gender) # mark.time=FALSE will
remove the censoring lines in the graph. If censoring lines are needed,
then remove the mark.time section in the formula.

legend(topright,c(Females, Males), col=(1:2), lwd=0.5)

Am sure, the code in the first line has to be modified. Please help me with
this and I will be very thankful to you.

Thanks in advance

Regards
Vinay

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