similar to: Aggregation of data frame with calculations of proportions

Displaying 20 results from an estimated 900 matches similar to: "Aggregation of data frame with calculations of proportions"

2009 Jun 26
2
Matching data to a new column
Hi all, I wonder if anyone can help, I have a dataframe with columns for... 'I.D' 'age' 'mothers I.D' 01 5 03 02 6 06 03 16 NA 04 8 06 05 3 NA 06 17 NA I need to create a new column for 'mothers age' which puts the age of the individual with 'mothers i.d' into the row for her offspring (so
2024 Jan 17
1
Is there any design based two proportions z test?
Hello Everyone, I was analysing big survey data using survey packages on RStudio. Survey package allows survey data analysis with the design effect.The survey package included functions for all other statistical analysis except two-proportion z tests. I was trying to calculate the difference in prevalence of Diabetes and Prediabetes between the year 2011 and 2017 (with 95%CI). I was able to
2024 Jan 17
1
Is there any design based two proportions z test?
Dear Md Kamruzzaman, To answer your second question first, you could just use the svychisq() function. The difference-of-proportion test is equivalent to a chisquare test for the 2-by-2 table. You don't say how you computed the confidence intervals for the two separate proportions, but if you have their standard errors (and if not, you should be able to infer them from the confidence
2009 Jul 10
1
prevalence in logistic regression lrm()
Hi, I am wondering if there is a way to specify the prevalence of events in logistic regression using lrm() from Design package? Linear Discriminant Analysis using lda() from MASS library has an argument "prior=" that we can use to specify the prevalent of events when the actual dataset being analyzed does not have a representative prevalence. How can we incorporate this information in
2012 Oct 03
2
Legend Truncated Using filled.contour
Hey everyone, I'm working on a contour plot depicting asymptomatic prevalence at varying durations of infectiousness and force of infection. I've been able to work everything out except for this one - my legend title keeps getting cut off. Here's what I have: filled.contour(x=seq(2,30,length.out=nrow(asym_matrix)), y=seq(1,2,length.out=ncol(asym_matrix)), asym_matrix, color =
2009 Feb 26
1
error message and convergence issues in fitting glmer in package lme4
I'm resending this message because I did not include a subject line in my first posting. Apologies for the inconvenience! Tanja > Hello, > > I'm trying to fit a generalized linear mixed model to estimate diabetes prevalence at US county level. To do this I'm using the glmer() function in package lme4. I can fit relatively simple models (i.e. few covariates) but when
2004 Sep 06
4
Cox regression for prevalence estimates
Hello, I'm an MD working in an eye clinic. I'm learning by myself to use R for use in my research works and for implementation in a software project. There are some authors who recomends the use of Cox regression as a substitute for Logistic regression (<a href="http://www.biomedcentral.com/1471-2288/3/21.pdf"> Barros AJD, Hirakata VN. BMCMedical Research Methodology, 2003;
2010 Sep 03
2
Interactions in GAM
Hello R users, I am working with the GAM to inspect the effect of some factors (year, area) and continuous variables (length, depth, latitude and longitude) on the intensity and prevalence of the common parasite Anisakis. I would like introduce interaction in my models, both "continuous variables-continuous variables" and "continuous variables-factor". I have read some
2008 Jul 08
6
Question: Beginner stuck in a R cycle
Dear All, I have a database of 200 observations named myD. In the dataframe there are a column named code (with codes varying from 1 to 77), a column named "prevalence" with some quantitative measurements are given and an column named Pr_mean, with no values. I would like to set a cycle to compute the average of prevalence values for each different code and store the averages under the
2006 Jun 28
1
Simulate dichotomous correlation matrix
Newsgroup members, Does anyone have a clever way to simulate a correlation matrix such that each column contains dichotomous variables (0,1) and where each column has different prevalence rates. For instance, I would like to simulate the following correlation matrix: > CORMAT[1:4,1:4] PUREPT PTCUT2 PHQCUT2T ALCCUTT2 PUREPT 1.0000000 0.5141552 0.1913139 0.1917923 PTCUT2
2011 Dec 29
2
sorting a data.frame (df) by a vector (which is not contained in the df) - unexpected behaviour of match and factor
Dear R colleagues, consider my data.frame named "df" with 3 columns - being level, prevalence and sensitivity - and 7 rows of data (see dump below). df <- structure(list(level = structure(1:7, .Label = c("0", "1", "10", "100", "1010", "11", "110"), class = "factor"), prevalence = structure(c(4L, 2L, 3L,
2012 Jan 05
2
Bayesian estimate of prevalence with an imperfect test
Hi all! I'm new to this forum so please excuse me if I don't conform perfectly to the protocols on this board! I'm trying to get an estimate of true prevalence based upon results from an imperfect test. I have various estimates of se/sp which could inform my priors (at least upper and lower limits even if with a uniform distribution) and found the following code on this website..
2008 Apr 09
1
read table not reading lines containing single quotes
Hi, * I am using read.table command as follow kegg<-read.table("c:/IDs.tab",header =TRUE,quote= "'", sep="\t") * Fragment of file is as follow: ID Pathway 04916 Melanogenesis 04920 Adipocytokine signaling pathway 04930 Type II diabetes mellitus 04940 Type I diabetes mellitus 04950 Maturity onset diabetes of the young 05010
2009 Feb 26
1
(no subject)
Hello, I'm trying to fit a generalized linear mixed model to estimate diabetes prevalence at US county level. To do this I'm using the glmer() function in package lme4. I can fit relatively simple models (i.e. few covariates) but when expanding the number of covariates I usually encounter the following error message. gm8 <-
2013 Feb 13
5
spearman correlation and p-value as a matrix
I have two data matrices that I want to make the correlation between each column from data1 and each column from data 2 and also calculate the p-value Matrices dont have the same size and I tried such a script. > bg <- read.table (file.choose(), header=T, row.names) > bg > Otu00022 Otu00029 Otu00039 Otu00042 Otu00101 Otu00105 Otu00125 Otu00131 Otu00137 Otu00155 Otu00158 Otu00172
2011 Jan 28
1
Problems making subsets with [] or "subset"
Hi, I'm trying to make a model in order to know wich factors got?s influence in the intensity of a infection, but just in the individuals who's got this infection. In my data I've got a variable called "prevalence" with 2 levels: 1.- Infected individual 0.- Non infected So what i'm trying to do is a subset in a model like this,
2011 Jun 16
2
Bayesian Credible Intervals for a Proportion
I am trying to calculate Bayesian Credible Intervals for a proportion (disease prevalence values to be more specific) and am having trouble using R to do this. I am working with ncredint() function but have not had success with it. Please help! Example: Positive samples = 3 Total sampled = 10 Prevalence = 0.3 pvec <- seq(1,10,by=1) npost = dbinom(pvec,10,prob=0.3, log=FALSE) ncredint(pvec,
2010 Jun 10
1
Am I having problems with codecs? or am I not receiving an invite at all from my DID provider?
Hi Guys, I have Spikko setup as provider of DID and outbound routes and I can make calls out but no inbound calls via DID can be made. I did a sip debug which is reported below. I never receive the call though, I have a catch all in my inbound routes and it doesn't hit my context at all or not sip invite comes in: FreePBX: Trunk Name: *Spikko* Peer Detail *username=MyUsername*
2012 Aug 17
3
prevalence of R in publications and institutions
On Fri, Aug 17, 2012 at 6:46 AM, Travis Perry <travis.perry at furman.edu> wrote: > Dr. Bates, > Our department is considering replacing existing statistical > software packages in our curriculum with R, at my request. To better inform > this decision we are interested to know the prevalence of R in the published > literature and its use across academic and research
2013 Feb 01
2
Help calculating p-values
I am trying to figure out how to calculate p-values for the difference in prevalence of a risk factor between men and women. For example, I find that 277 out of 710 male patients and 125 out of 305 female patients have obesity, what is the p-value for their difference? If there is a package that can calculate this in bulk, I would appreciate to learn about it! Thank you [[alternative HTML