similar to: Need help on this problem!

Displaying 20 results from an estimated 100 matches similar to: "Need help on this problem!"

2004 Jul 30
0
a question about nlme
Hi, Sorry to bother those who are not interested in the question. I am using R to run a multiphase mixed-effects model. I simulated a data set by using the following model. And now I want to use R to estimate the parameters and compare the results with the true values. The equations of the models are as below: gf[ij]=b0[i]+b1[i]*age[ij]+b2[i]*max(0,(age[ij]-tau[i]))+e[ij] b0[i]=b00+e[i0]
2003 Mar 05
3
reading in tab delimited data in a loop
Dear all, I need to read in 4 sets of tab delimited data in a loop. The 4 data sets are called "simu1.dat", "simu2.dat" and so on. I know what I need on the righthand side of the read.table expression but I can't the left hand side of it to work (see the line in bold below). Can you kindly help? Many thanks. simu1 <- matrix(0,30,3) simu2 <- matrix(0,30,3) simu3
2006 May 27
1
Trouble passing list or non-list to function using ...
Hello, Simply put, I'm trying to call a function "testme" with value "age=NA". I wish to use "dotlist<-list(...)" inside the function and have dotlist become: $age [1] NA I'm modifying existing code and need to minimize changing that code so it's easiest to conform how I call the existing function. My sample code fragment, results, and R.version
2008 Jan 15
2
Looking for simpler solution to probabilistic question
Hi I have two processes which take with a certain probability (p1 and p2) x number of years to complete (age1 and age2). As soon as thge first process is completed, the second one begins. I want to calculate the time it takes for the both processes to be completed. I have the following script which gives me the answer, butI think there must be a more elegant way of doing the calculations
2006 Dec 01
1
Box Tidwell / Error Message
Dear R-Users, I used the box.tidwell () function of the car Package. When I used the following formula: semi.sub.in.mi1.boxtidwell_h<-box.tidwell(RENT_LG ~ I(age+1)+I(age2+1)+X06A + I(X08B+1) + I(X22+1) + I(X24+1) + X31A, ~B_YEAR + C_X01 + C_X14 + C_X19 + C_X29A +C_X21 + C_X23 + D_X12 + D_X17 + D_X18 + D_X25 + D_X27 + D_X30 + D_X32 + D_X35, data = semi.sub.in.mi1) everything is
2003 Apr 18
1
Help with nlme--freq weights, logit model, and more
Below you will find the output from a failed multi-level model run. I am trying to estimate the following model: Pr(PLFP=1)= logistic regression -> B1_j * bm + B2_j * wm + B3_j bf + B4_j wf + B5 yrsed+ B6 age+ B7 age^2+e_ij B1_j = G01 + G11 bmxd + d1 B2_j = G02 + G12 wmxd + d2 B3_j = G03 + G13 bfxd + d3 B4_j = G04 + G14 wfxd + d4 d1-d4 freely correlated Note that there is no
2010 Feb 17
1
Ordered Logit in R
I'm trying to run an ordered logistic regression model. I've run the following code, but the output does not provide the p-values. Is there some command to include the p-values in the output. reg2 <- polr(trade1 ~ age2 + education2 + personal2 + economy2 + partisan2 + employment2 + union2 + home2 + market2 + race2 + income2) summary(reg2) Re-fitting to get Hessian# Call:
2002 Jul 11
1
nls() singular graident matrix error
R-helpers; I used Proc Model in SAS to fit the following model to data: proc model data = dbsmv; a = a1*F**2; b = b1*F + b2*T + b3*F*T; tph2 = tph1 *((1 - exp(-a*age2)) / (1 - exp(-a*age)))**-b; fit tph2; and yielded the following estimated parameters after iterations: a1 = -0.15943, a2 = -1.8177, b1 = -0.01911, b2
2004 Jul 28
1
a question about using nlme
Hi, I am using Splus to run a multiphase mixed-effects model. The quations of the models are as below: gf[ij]=b0[i]+b1[i]*age[ij]+b2[i]*max(0,(age[ij]-tau[i]))^2+e[ij] b0[i]=b00+e[i0] b1[i]=b10+e[i1] b2[i]=b20+e[i2] tau[i]=tau+e[i3] i: 1,2,...,100 subjects j: 1,2,...,6 occasions The main scripts of Splus is: simu1<-groupedData(gf~age|id) simu.nlme<-nlme(gf~(b0 + b1 * age + b2 *
2010 Apr 13
0
Error using reshape method
To be fair I don't really understand what the error is telling me so I don't know how to correct it. I'm trying to reshape my data so that I do repeated measures ANOVA on it. The warning message: "Error in d[, timevar] <- times[1L] : subscript out of bounds" The program: library(QRMlib) library(Hmisc) ss<-5 mu<- c(0,2,3,12) mu2<- c(0,2,10,20)
2002 Nov 26
1
Reshape by multiple variables
Dear list I'm using the reshape command and want to reshape a wide data set to a long one e.g. I have the variables y1,y2,y3,age1,age2,age3,sex,ethnic I want my new long data set to consist of the variables y (which has been created from y1,y2,y3), age (which has been created from age1,age2,age3), sex and ethnic I have tried to use the command:
2013 Jan 10
1
Semi Parametric Bootstrap
Greetings to you all, I am performing a semi parametric bootstrap in R on a Gamma Distributed data and a Binomial distributed data. The main challenge am facing is the fact that the residual variance depends on the mean (if I am correct). I strongly feel that the script below may be wrong due to mean-variance relationship #####R code####### fit1s
2008 May 12
1
Standard error of combination of parameter estimates
Hi, Is there a simple command for computing the standard error of a combination of parameter estimates in a GLM? For example: riskdata$age1 <- riskdata$age riskdata$age2 <- ifelse(riskdata$age<67,0,riskdata$age-67) model <- glm(death~age1+age2+ldl, data=riskdata,family=binomial(link=logit)) And we want to find the standard error of the partial linear predictor for
2010 Apr 21
0
problem on semiparametric single index estimator
Dear R-Help, I am Deniz. I am currently trying to replicate a semiparametric sample selection paper and I am working on Klein and Spady estimator. I am using the npindex() and npindexbw() functions. The problem is, I need results for single bandwidth and when I set bandwidth computation to "FALSE" mode, R is not optimizing anything. Here is the code I am using:
2010 Apr 23
1
help with plotting lines linking two sets of points?
Hello everyone, I'm trying to plot the initial and final size of some tadpoles and look at their growth rates (slope of line). They are divided into 6 densities, and so far I have plotted the initial and final sizes (these are means for a pool), and color coded for the 6 densities, but I want a line to connect the initial and final value for each pool (also color coded by density). Any ideas?
2011 Oct 05
1
calling a variable which in turn calls many more variables
Hi all, I am running regressions with many covariates, most of which remain the same each time (control variables). Instead of writing 30 demographic variables every regression, is there a way I could call them all at once using a variable called, perhaps "demog"? I have tried: > demog <- list(age1, age2, age3) but I get an error when I try to call a list in a regression. I also
2008 Nov 06
3
unlist & dataframes
Dear all, I would like to know whether it is possible to unlist elements and keep the original format of the data. To make it more clear, let me give an exemple: I have a list l of dataframes that I created with apply but which looks like this: x1=data.frame(Name=LETTERS[1:2],Age=1:2) x2=data.frame(Name=LETTERS[3:4],Age=3:4) l=list(x1,x2) l [[1]] Name Age 1 A 1 2 B 2 [[2]] Name
2005 Aug 12
2
coercing created variables into a new data frame using na.omit()
Hi, I am an R newbie and one thing I am having trouble with binding variables that I have created within one data frame into a new data frame when using na.omit(). To illustrate this problem I will give the example I am working on and the approah I have been using:- data.frame1<-filepath.... attach(data.frame1) #create a new variable using a function new.variable<-rep(1,length(weight3))
2005 Dec 13
2
what does this warnings mean? and what should I do?
I use lmer to fit a mixed effect model.It give some warnings.what does this warnings mean? and what should I do? > (fm2.mlm <- lmer(qd ~ edu + jiankang + peixun +hunyin + cadcj + age + age2 + sex + dangyuan + Comp.1 + Comp.2+trust.cz1 +(trust.cz1|commid), data = individual,na.action = "na.exclude",family="quasibinomial")) Generalized linear mixed model fit using PQL
2008 Aug 21
1
Interpreting Logistic Regression
Hi ! This is Madhavi from Mumbai, India. Incidently this is my first post. I am working on Credit Scoring Model and using R, I have run the logistic regression. I have received following Output. I have two questions (a) What is the significance of "family = binomial(link = logit)". Why do I have to mention Binomial? Is it because my dependent variable assumes only two values 0 and 1?