search for: age_cat

Displaying 4 results from an estimated 4 matches for "age_cat".

2012 Nov 12
1
R lmer & SAS glimmix
Hi, I am trying to fit a model with lmer in R and proc glimmix in SAS. I have simplified my code but I am surprised to see I get different results from the two softwares. My R code is : lmer(y~age_cat + (1|cat),data=fic,family=binomial(link = "logit"), NaGQ=1) My SAS code is : ods output Glimmix.Glimmix.ParameterEstimates=t_estimates; proc glimmix data=tab_psi method=laplace; class age_cat cat; model psi (event='1') = age_cat / solution dist=B link=logit ; random intercept /...
2010 Mar 25
3
Returning Data Frame from Function for use Outside Function
...f the factor ## values. By default R orders the factor values alphabetically ## and numerically. In some case we wish to choose different ## reference levels vcohort$GENDER <- Relevel(factor(vcohort$SEX), list("M", "F"), first=TRUE) vcohort$AGE <- Relevel(factor(vcohort$AGE_CAT), list("4", "2", "3", "1"), first=TRUE) vcohort$VISN <- Relevel(factor(vcohort$VISN2), list("8", "1", "2", "3", "4", "5", "6",...
2010 Mar 25
0
Counting a number of "elements" in an object
...is not a problem. At present I pass the function the number of variables also. For simple models this works fine, but I need to run more complex models. I have need to dynamically create my empty matrix with the number of repetitions for rows and the number of coefficients for columns (for example age_cat has 5 levels and thus 4 coefficients), so the complexity of the problem grows. I thought about taking a small sample and running it through lmer to get dummy results and use that number to create the matrix but that doesn't work because the data frame is large and I run into problems running s...
2012 Dec 03
2
How to read SPSS file in R
Dear R-users, I have som troubles with .sav file. How is it possible for us R-users to read SPSS files. I know that is possible, I tried the following: > library(foreign) > Corp<-read.spss("/Users/kama/Analysis/Corporation.sav", header=TRUE, > sep=",") Error in read.spss("/Users/kama/Analysis/Corporation.sav", header = TRUE, : unused