search for: marit

Displaying 20 results from an estimated 36 matches for "marit".

Did you mean: parit
2004 Oct 19
2
Matrix/Table col headings R 2.0.0
I have been looking at some 'table' examples in Peter Dalgaard's ISwR book, and I am confused by how to get right justification of my table headings when I use the tables() command. Compare the following: # Produces right justfified column names caff.marital=matrix(c(652,1537,598,242,36,46,38,21,218,327,106,67),nrow=3,byrow=T) colnames(caff.marital)=c("0","1-150","151-300",">300") rownames(caff.marital)=c("Married","Prev.married","Single") caff.marital class(caff.marital) #Prod...
2018 Apr 10
4
convert numeric variables to factor
You are missing a comma between "MARITAL" and "JOBSTATUS". On Tue, Apr 10, 2018 at 10:27 AM, Saif Tauheed <saif.tauheed at gmail.com> wrote: > I run this command for converting the numerical variable into factor. > However, I get the following error message. > > > cols<- c(?GrMM", "RELG...
2012 Mar 26
2
trellis plot
Hi everyone, I am just trying to figure out how to do a xyplot where in addition to dots and lines I can change dots' colors according to an individual variable (e.g., marital disruption across time, a dummy 0/1). When I use "groups" specification (see below), I get two different lines for each individual based on groups, and what I want is to get one line connecting dots, and different dots' colors according to marital disruption. Any ideas about how to...
2017 Dec 14
1
Aggregation across two variables in data.table
Dear all, I have a data.frame that includes a series of demographic variables for a set of respondents plus a dependent variable (Theta). For example: Age Education Marital Familysize Income Housing Theta 1: 50 Associate degree Divorced 4 70K+ Owned with mortgage 9.147777 2: 65 Bachelor degree Married 1 10-15K Owned without mortgage 7.345036 3: 33...
2013 Apr 16
1
assistant
Dear Sir/Ma, I Adelabu.A.A, one of the R-users from Nigeria. When am running a coxph command the below error was generated, and have try some idea but not going through. kindly please assist: > cox1 <- coxph(Surv(tmonth,status) ~ sex + age + marital + sumassure, X) Warning message: In fitter(X, Y, strats, offset, init, control, weights = weights, : Ran out of iterations and did not converge > summary(cox1, conf.int=0.95, exact = TRUE) Call: coxph(formula = Surv(tmonth, status) ~ sex + age + marital + sumassure, data = X) n= 5...
2018 Apr 10
0
convert numeric variables to factor
Thank you very much. After that I have the following error: cols<- c("GrMM", "RELG", "CASTE1", "SECTOR", "SECTOR4","AGE", "MARITAL", "JOBSTATUS", "ENG", "EDU", "PARENT_EDU", "MASSMEDIA_F", "MASSMEDIA_M", "HomeComputer", "HomeInternet") > for (I in cols) {data.frame[,i]= as.factor(data.frame[,i])} Error in sort.list(y) : 'x' mus...
2012 Jan 19
3
What does the : operator mean in glm formulas
Hi, I see the following is the credit scoreing in R guide : m2<-glm(formula = good_bad ~ checking + duration + history+ purpose +amount + savings + employed + installp + marital + coapp +age + other + depends + telephon + foreign +checking:amount What does checking:amount mean? Regards, Xiaobo Gu
2018 Apr 10
0
convert numeric variables to factor
I run this command for converting the numerical variable into factor. However, I get the following error message. > cols<- c(?GrMM", "RELG", "CASTE1", "SECTOR", "SECTOR4","AGE", "MARITAL" "JOBSTATUS", "ENG", "EDU", "PARENT_EDU", "MASSMEDIA_F", "MASSMEDIA_M", "HomeComputer", "HomeInternet") for (i in cols) {data.frame[,i]= as.factor(data.frame[,i])} Error: unexpected string constant in ?cols<...
2013 Oct 04
2
pregunta
...el paquete survival de la ayuda del R funcionan perfectamente ########################################### library(survival) library(epicalc) data(Marryage) use(Marryage) attach(Marryage) summ(Marryage) age <- endyr - birthyr label.var(age, "Age") summ(age, by = marital) age.marr <- maryr - birthyr label.var(age.marr, "Age at marriage") summ(.data[,8:9]) married <- marital == "Married" time <- ifelse(married, age.marr, age) (surv.marr <- Surv(time, married)) head(data.frame(age, age.marr, married, surv.marr)) ....
2008 Jan 29
2
A good way to store some profile-information?
What would be a good way to store profile-information, in the cases where the information can be selected from a list of choices? i.e. gender (male,female), religion or marital status. The lists don''t change, so putting that in the db doesn''t seem like a good idea, but how do i put something like this in a model? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby o...
2018 Apr 09
2
convert numeric variables to factor
Hello, Though Bert's and David's answers are what you should do, note that some R functions that need factors will coerce their input variables when necessary. Have you tried to run the code you haven't posted without coercing to factor? It might run... Hope this helps, Rui Barradas On 4/9/2018 6:11 PM, David L Carlson wrote: > Try the help files: > > ?factor >
2011 Nov 18
2
Export Tree for latex
Hello everybody. I'm trying to send the result of a decision tree for latex, but I do not get with the package(xtable), there is a package that make this export Export this for latex marital.status = Divorced | educational.num <= 12: <=50K (1795.0/90.0) | educational.num > 12 | | hours.per.week <= 41: <=50K (302.0/58.0) | | hours.per.week > 41 | | | educational.num <= 14: <=50K (160.0/59.0) | | | educational.num > 14: >50K (27.0/4...
2010 Apr 28
2
Size limitations for model.matrix?
...l.matrix(coll.1st.formula, data = coll.train) > dim(coll.1st.model.mat) [1] 581618 169 One I saw the resulting model.matrix had fewer rows than the original data.frame I played with the number of input variables in the model: > ttt <- model.matrix(~kmpleasure + vehage + age + gender + marital.status + + license.category + minor.conviction + driver.training.certificate + + admhybrid + anpol + anveh + cie + dblct + faq13c + faq20 + faq27 + faq43 + + faq5a + fra2 + frb2 + frb3 + kmaff + kmannuel + kmtravai + lima + maison + + nacp + nap + nbcond + nbcondpo + nbvt + rabmlt...
2013 Oct 04
1
pregunta
...) >> >> data(Marryage) >> >> use(Marryage) >> >> attach(Marryage) >> >> summ(Marryage) >> >> >> >> >> >> age <- endyr - birthyr >> >> label.var(age, "Age") >> >> summ(age, by = marital) >> >> >> >> age.marr <- maryr - birthyr >> >> label.var(age.marr, "Age at marriage") >> >> summ(.data[,8:9]) >> >> >> >> married <- marital == "Married" >> >> time <- ifelse(marrie...
2010 Apr 11
1
How to assign variable name (of a vector, matrix, array) from element of another vector or by using paste?
Dear All, My problem is the following > varname <- c("age","sex","edu","mrt") > varstates <- c(10,2,4,3) # 10 age groups, 2 sexes, 4 education group and 3 marital status.. Now, I want four variables (vector with length1) named nrage, nrsex, nredu, nrmrt and assing some values > for (i in 1:4) paste("nr",varname[i],sep="") <- varstates[i] #this does not work I want the following >nrage 10 >nrsex 2 .. etc Thanks in advan...
2013 Nov 04
0
Fwd: mediation analysis with R
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20131104/739bd002/attachment.pl>
2013 Oct 04
0
pregunta
...####### > > > > library(survival) > > library(epicalc) > > data(Marryage) > > use(Marryage) > > attach(Marryage) > > summ(Marryage) > > > > > > age <- endyr - birthyr > > label.var(age, "Age") > > summ(age, by = marital) > > > > age.marr <- maryr - birthyr > > label.var(age.marr, "Age at marriage") > > summ(.data[,8:9]) > > > > married <- marital == "Married" > > time <- ifelse(married, age.marr, age) > > > > (surv.marr <- S...
2006 Jan 17
1
Step.glm() question
Hi: I am using step.glm() as follows: form1 <- as.formula(haspdata ~ 1) lg.mod1 <- glm ( formula=form1, data=st.mtx, family=binomial , na.action=na.omit ) upper <- as.formula( haspdata ~ ( c5+childnm+educ1+incpov1+marital+msa+racekid+racemom+sex+shotcard )^2) lower <- as.formula(haspdata~1) lst <- list( upper=upper , lower=lower ) form1a.step <- step(lg.mod1, scope=lst , trace=T , direction="both" ) I get the following error message in R: Error in factor.scope(ffac, list(add = fadd, drop =...
2011 Aug 11
1
Subsampling data
...] "children" "student" "retired" "disabled" "homemaker" "unemployed" "employed" [15] "occupation" "residencysize" "educ" "agemean" "age" "marital" $codepage [1] 1252 > MalesData <- Datatemp[Datatemp $sex==1] > MalesData named list() > attributes(MalesData) $names character(0) Females.Data <- Datatemp[Datatemp $sex==2] *This subset extraction is not working. Is there anyone who can tell me what I d...
2004 Dec 29
1
Discrepancy between intervals.lme and coef.lme
I'm using R on Windows v2.0.1 with the nlme package (v3.1-53) and am finding some unexpected discrepancies in the output of intervals.lme and coef.lme. I've included a toy dataset at the end, but briefly, the data are longitudinal data from couples in marital therapy. Each spouse's relationship satisfaction is measured 4 times; I've fit both linear and quadratic models to the change over time. The quadratic fits show the discrpancies. Here's the call to lmList, coef, and intervals: tmp.lis1 <- lmList(dv ~ time + I(time^2)| id/sex, d...