[R] select specific rows from regression output
PIKAL Petr
petr.pikal at precheza.cz
Mon Sep 3 15:54:06 CEST 2012
Hi
I am not familiar with glmer but maybe you can try to give to prediction only values with BMI>25. As you did not provide data nor any code something like (untested)
predict(fit, newdata=olddata[olddata$BMI>25,])
Regards
Petr
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Alexander Snijders
> Sent: Monday, September 03, 2012 1:13 PM
> To: r-help at r-project.org
> Subject: [R] select specific rows from regression output
>
> Hello everyone,
>
> I have a data set that contains characteristics of 25,000 patients of
> 92 different hospitals. I have run a regression to capture the
> probability these patients will have a complication after a certain
> operation. Now, I actually want to predict the probability per patient,
> using the outcome of the regression, but I just certain patients
> involved in the prediction. So, I want to use the estimated parameters
> of the full regression, but after that, I only want patients with
> certain characteristics in my prediction matrix. For example, only
> patients with BMI >25.
>
> My regressional formula looks as follows: fit = glmer(response ~
> sex+bmi+asa+ (1|center), data=data, family=binomial), and my normal
> prediction formula: pred=fit at X %*% fit at fixef. I hope someone can help
> me!
>
> Greetings, Alex
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
More information about the R-help
mailing list