similar to: multi-stage sampling and hierarchical models: which packages?

Displaying 20 results from an estimated 800 matches similar to: "multi-stage sampling and hierarchical models: which packages?"

2008 Nov 30
1
using survey weights for correlations
Dear list, I have a data file which includes, alongside various variables representing questionnaire scores, a variable for survey weights computed as the number of observations in the sample drawn from that group divided by the number of observations in the population in the group. I need to calculate a covariance matrix of the questionnaire scores for use in sem. How do I apply the weights?
2010 Jun 22
1
"save scores" from sem
Dear expeRts, sorry for such a newbie question - in PCA/factor analysis e.g. in SPSS it is possible to save scores from the factors. Is it analogously possible to "save" the implied scores from the latent variables in a measurement model or structural model e.g. using the sem or lavaan packages, to use in further analyses? Best wishes Steve Powell www.promente.org | skype
2007 Nov 17
1
odf and unzip: unzip not found
hi list members I am trying to use odfWeave with R 2.5.1 on Windows XP. however when running e.g. odfWeave(demoFile, outputFile) I get: Error in odfWeave(demoFile, outputFile) : Error unzipping file In addition: Warning message: unzip not found in: system(zipCmd[2], invisible = TRUE) presumably my zip and unzip are not set up correctly but I dont know how to do that. I installed zip and
2008 Aug 06
1
Warning when using survey:::svyglm
Howdy, Referencing the below exchange: https://stat.ethz.ch/pipermail/r-help/2006-April/103862.html I am still getting the same warning ("non-integer #successes in a binomial glm!") when using svyglm:::survey. Using the API data: library(survey) data(api) #stratified sample dstrat<-svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc)
2007 Sep 19
1
SEM - standardized path coefficients?
Dear list members, In sem, std.coef() will give me standardized coefficients from a sem model. But is there a trick so that path.diagram can use these coefficients rather than unstandardized ones? Thanks Steve Powell From: John Fox <jfox_at_mcmaster.ca> Date: Wed 28 Feb 2007 - 14:37:22 GMT Dear Tim, See ?standardized.coefficients (after loading the sem package). Regards, John John
2005 Oct 04
1
"Survey" package and NAMCS data... unsure of specification
Hello, all. I wanted to use the "survey" package to analyze data from the National Ambulatory Medical Care Survey, and am having some difficulty translating the analysis keywords from one package (Stata) to the other (R). The data were collected using a multistage probability sampling, and there are variables included to identify the sampling units and weights. Documentation from the
2009 Aug 06
1
Using 'field names' of a data.frame in a function
I may be doing this wrong! but I have a function which I have simplified a lot below. I want to pass some 'field names' of a data-frame to the function for it to then do some manipulation of. Here's my code: #build a simple dataset mydataset = data.frame (
2012 Feb 13
1
survey package svystat objects from predict()
Hello, I'm running R 2.14.1 on OS X (x86_64-apple-darwin9.8.0/x86_64 (64-bit)), with version 3.28 of Thomas Lumley's survey package. I was using predict() from svyglm(). E.g.: data(api) dstrat<-svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc) out <- svyglm(sch.wide~ell+mobility, design=dstrat, family=quasibinomial()) pred.df <-
2018 Mar 22
1
exporting data to stata
On Thu, Mar 22, 2018 at 4:52 AM, Raja, Dr. Edwin Amalraj <amalraj.raja at abdn.ac.uk> wrote: > Hi , > > library(foreign) > write.dta(data1, "data1.dta") > > should work. I don't think so: > library(foreign) > example(svydesign) > write.dta(dstrat, "~/Downloads/foo.dta") Error in write.dta(dstrat, "~/Downloads/foo.dta") : The
2014 Oct 15
2
Advice on package design for handling of dots in a formula
I am working on a new package, one in which the user needs to specify the role that different variables play in the analysis. Where I'm stumped is the best way to have users specify those roles. Approach #1: Separate formula for each special component First I thought to have users specify each formula separately, like: new.function(formula=y~X1+X2+X3, weights=~w,
2007 Mar 03
2
format of summary.lm for 2-way ANOVA
Hi, I am performing a two-way ANOVA (2 factors with 4 and 5 levels, respectively). If I'm interpreting the output of summary correctly, then the interaction between both factors is significant: ,---- | ## Two-way ANOVA with possible interaction: | > model1 <- aov(log(y) ~ xForce*xVel, data=mydataset) | | > summary(model1) | Df Sum Sq Mean Sq F value Pr(>F) |
2010 Mar 24
0
R-help ordinal regression
Dear colleagues, i am carrying out an ordinal regression model. I try it on SPSS but I "flirt" with R as well. I have a few questions. 1. What is the most reliable/tested/trusted package for ordinal regression in the R world? 2. Also, I have a statistical question. What is the danger of having to many 'empty cells' in ordinal regression? How many empty cells are too many? Do
2013 Jul 12
2
vegan capscale 'subscript out of bounds' error
Hi list, I am using the capscale function in vegan_2.0-7 to do a constrained principal coordinates analysis, and I kept getting the following error message: Error in Y.r[, oo, drop = FALSE] : subscript out of bounds I googled but I couldn't find an answer. Could anyone tell me why this error msg and what to do? Here is the command I used:
2012 May 16
2
replacing with NA
Dear R users, I was wondering how I can replace the values of a vector with the values from in another vector in the same row For example, how can I replace the value of x below with NA when the value of Z in the same row is NA? x <-1:20 z<- c(11, 15, 17, 2, 18, 6, 7, NA, 12, 10,21, 25, 27, 12, 28, 16,17, NA, 12, 10) Many thanks Mintewab ________________________________________ Fr?n:
2010 Jul 29
2
ggplot2 histograms... a subtle error found
Hello all, I have a peculiar and particular bug that I stumbled across with ggplot2. I cannot seem to replicate it with anything other than my specific data set. Here is the problem: - when I try to plot a histogram, allowing for ggplot2 to decide the binwidths itself, I get the following error: - stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to
2013 Mar 25
1
count NAs with aggregate
Dear members of this list, I'd like to count missing values using the aggregate function. Something like this: count_nas <- function(arg1) { return(sum(is.na(arg1))) } aggregate(cbind(var1, var2, var3) ~ subject + time, data = mydataset, count_nas) It's not working: I end up with a matrix containing zeros, although there are missings in the data frame. I'd highly
2012 Jun 28
1
SVY: variance inflation factor VIF with complex survey
Hello, Seeking a way to get the variance inflation factor VIF for a model of regression in complex survey, I have understood that without this package (SURVEY) RGui VIF obtained as follows: fit <- lm(mpg~disp+hp+wt+drat, data=mtcars) vif(fit) But I want to know if survey, Vif is obtained so vif( svyglm(api00~ell+meals+mobility, design=dstrat)) Thank you, happy day
2002 Dec 10
1
lattice barchart with "negative" bars
Dear all, I'm trying to use the lattice barchart function to obtain a bar plot of a variable for different values of two factors. The thing I'm trying to do is something like this: > barchart(MyVar ~ season | place, data=mydataset) My problem is that the column MyVar has some negative values and I would like them to be represented as bars stacking down from zero instead of what
2004 Jul 30
1
optimisation procedure with flat log-likelihood
Dear R-friends, I use optim(par=c(mystartingpoints), fn=myloglikelihoodfunction, gr=NULL, method=c("L-BFGS-B"), ## I would like to do not use any bounds control=list(trace=6, ## just to see what it's going on maxit=c(20000)), ## to be sure the it doesn't stop reaching the max iterations
2006 May 10
1
identify high dimension data point
Hi there, I am having some trouble with the Identify() function, it looks that the identify() function only works on the plot of 2-dimension data set. In high-dimension case , if I use pairs() + identify() in hope to observe all the components of the data point I selected, I get error message. Is there anyway to get around this ? Plus, I also need it to actually compare all the