similar to: Remove missings (quick question)

Displaying 20 results from an estimated 6000 matches similar to: "Remove missings (quick question)"

2012 Jul 05
4
Exclude missing values on only 1 variable
Hello, I have many hundred variables in my longitudinal dataset and lots of missings. In order to plot data I need to remove missings. If I do > data <- na.omit(data) that will reduce my dataset to 2% of its original size ;) So I only need to listwise delete missings on 3 variables (the ones I am plotting). data$variable1 <-na.omit(data$variable1) does not work. Thank you
2012 Oct 07
3
Robust regression for ordered data
I have two regressions to perform - one with a metric DV (-3 to 3), the other with an ordered DV (0,1,2,3). Neither normal distribution not homoscedasticity is given. I have a two questions: (1) Some sources say robust regression take care of both lack of normal distribution and heteroscedasticity, while others say only of normal distribution. What is true? (2) Are there ways of using robust
2012 Apr 24
1
Number of lines in analysis after removed missings
I have a dataset with plenty of variables and lots of missing data. As far as I understand, R automatically removes subjects with missing values. I'm trying to fit a mixed effects model, adding covariate by covariate. I suspect that my sample gets smaller and smaller each time I add a covariate, because more and more lines get deleted. Is there a way of displaying how many subjects are
2012 Nov 21
1
Regression: standardized coefficients & CI
I run 9 WLS regressions in R, with 7 predictors each. What I want to do now is compare: (1) The strength of predictors within each model (assuming all predictors are significant). That is, I want to say whether x1 is stronger than x2, and also say whether it is significantly stronger. I compare strength by simply comparing standardized beta weights, correct? How do I compare if one predictor is
2012 May 06
2
Interaction plot between 2 continuous variables
I have two very strong fixed effects in a LMM (both continuous variables). model <- lmer( y ~ time + x1+x2 + (time|subject)) Once I fit an interaction of these variables, both main effects disappear and I get a strong interaction effect. model <- lmer( y ~ time + x1*x2 + (time|subject)) I would like to plot this effect now, but have not been able to do so, reading through ggplot2 and
2012 Oct 14
2
Poisson Regression: questions about tests of assumptions
I would like to test in R what regression fits my data best. My dependent variable is a count, and has a lot of zeros. And I would need some help to determine what model and family to use (poisson or quasipoisson, or zero-inflated poisson regression), and how to test the assumptions. 1) Poisson Regression: as far as I understand, the strong assumption is that dependent variable mean = variance.
2012 Oct 22
1
glm.nb - theta, dispersion, and errors
I am running 9 negative binomial regressions with count data. The nine models use 9 different dependent variables - items of a clinical screening instrument - and use the same set of 5 predictors. Goal is to find out whether these predictors have differential effects on the items. Due to various reasons, one being that I want to avoid overfitting models, I need to employ identical types of
2012 Apr 15
2
xyplot type="l"
Probably a stupidly simple question, but I wouldn't know how to google it: xyplot(neuro ~ time | UserID, data=data_sub) creates a proper plot. However, if I add type = "l" the lines do not go first through time1, then time2, then time3 etc but in about 50% of all subjects the lines go through points seemingly random (e.g. from 1 to 4 to 2 to 5 to 3). The lines always start at time
2011 Aug 25
4
{R} How to extract correctly from vector?
Dear list, I have problem that I cannot solve and would like to ask your opinion. I tried to ask a few days ago already but got no answer and all my attempts to solve it by myself since then failed. Sorry for repeated posting! Here the problem broken down a bit. My problem basically is, that I want to use the elements of a character vector as names for objects and by recalling only the
2006 Jul 13
3
set the bahavior that R deal with missing values?
Dear Rusers, The default behavior in R when performing a regression model with missing values is to exclude any case that contains a missing value? How could i set the bahavior that R deal with missing values? e.g.: exclude cases listwise exclude cases pairwise replace with mean Thanks very much! -- Kind Regards, Zhi Jie,Zhang ,PHD Department of Epidemiology School of Public Health Fudan
2009 Apr 11
2
who happenly read these two paper Mohsen Pourahmadi (biometrika1999, 2000)
http://biomet.oxfordjournals.org/cgi/reprint/86/3/677 biometrika1999 http://biomet.oxfordjournals.org/cgi/reprint/94/4/1006 biometrika2000 Hi All: I just want to try some luck. I am currenly working on my project,one part of my project is to reanalysis the kenward cattle data by using the method in Mohsen's paper,but I found I really can get the same or close output as he did,so,any
2011 Jul 05
3
[LLVMdev] optimizer returning wrong variable?
I'm having some trouble trying to workout how to form functions from the c interface I thought I had it sorted but I guess I'm missing something or haven't understood the requirements, a case of trial and error and not really having a clue to start with! I've got binary ops, cmps, for loops, while loops working but then it hit the wall with a tail cmp loop. looking at the
2013 Feb 12
1
Exact p-values in lm() - rounding problem
I need to report exact p-values in my dissertation. Looking at my lm() results of many regressions with huge datasets I have the feeling that p-values are rounded to the smallest value of "2e-16", because this p-value is very common. Is that true or just chance? If it is true, how do I obtain the "true" unrounded p-values for these regressors? m1 <- lm(y ~ x1+x2+x3+4+x5,
2011 Jul 05
0
[LLVMdev] optimizer returning wrong variable?
Andrew Ferguson wrote: > I'm having some trouble trying to workout how to form functions from > the c interface > I thought I had it sorted but I guess I'm missing something or haven't > understood > the requirements, a case of trial and error and not really having a clue > to start with! > > I've got binary ops, cmps, for loops, while loops working but
2007 Aug 07
1
Error in as.double.default(x) : (list) object cannot be coerced to 'double'
Dear experts, I have in all 14 matrices which stands for gene expression divergence and 14 matrices which stands for gene sequence divergence. I have tried joining them by using the concatanation function giving SequenceDivergence <- c(X1,X2,X3,X4,X5,X6,X7,X8,X9,X10,X11,X12,X13,X14) ExpressionDivergence <- c(Y1,Y2,Y3,Y4,Y5,Y6,Y7,Y8,Y9,Y10,Y11,Y12,Y13,Y14) where X1,X2..X14 are the
2011 Dec 06
1
Problem with clusplot
Dear all I'm trying to run a cluster analysis with R Here are the commands: mydata <- na.omit(matrix) # listwise deletion of missing mydata <- scale(matrix) # standardize variables fit <- kmeans(mydata, 8) # 8 cluster solution # get cluster means aggregate(mydata,by=list(fit$cluster),FUN=mean) # append cluster assignment mydata <- data.frame(mydata, fit$cluster)
2013 Jan 23
2
CFA with lavaan or with SEM
Hi Sorry for the rather long message. I am trying to use the cfa command in the lavaan package to run a CFA however I am unsure over a couple of issues. I have @25 dichotomous variables, 300 observations and an EFA on a training dataset suggests a 3 factor model. After defining the model I use the command fit.dat <- cfa(model.1, data=my.dat, std.lv = T, estimator="WLSMV",
2018 May 24
0
Manipulation of data.frame into an array
This is one of those instances where a less superficial knowledge of R's technical details comes in really handy. What you need to do is convert the data frame to a single (numeric) vector for, e.g. a matrix() call. This can be easily done by noting that a data frame is also a list and using do.call(): ## imp is the data frame: do.call(c,imp) X11 X12 X13 X14 X15 X16 X17 X18 X19
2012 Nov 29
2
Confidence intervals for estimates of all independent variables in WLS regression
I would like to obtain Confidence Intervals for the estimates (unstandardized beta weights) of each predictor in a WLS regression: m1 = lm(x~ x1+x2+x3, weights=W, data=D) SPSS offers that output by default, and I am not able to find a way to do this in R. I read through predict.lm, but I do not find a way to get the CIs for multiple independent variables. Thank you Torvon [[alternative HTML
2013 Apr 08
1
qgraph: correlation matrix variable names
We aim to visualize a 17*17 correlation matrix with the package *qgraph*, consisting of 16 variables. Without variable names in the input file, that works perfectly R> qgraph(data) but we'd like variable names instead of numbers for variables. In a correlation matrix, the first row and the first column usually have variable names. We've been unsuccessful so far to read such a file