Displaying 20 results from an estimated 10000 matches similar to: "fitted.values in lm function"
2011 Nov 14
2
help in fitted values in lm function
Hi,
I have a data set of 10000 rows and ran a linear regression by using the
function lmres = lm(formula,data)
then got the fitted value by using the value fit=fitted(lmres).
but the number of rows in the fitted one is about 9548,
What could be the reason for reduction in the number of rows in the fitted
one
--
View this message in context:
2011 Nov 30
3
how to call a function for each row
Hi
I have a data-frame which look like this
X1 X2 X3
1 3 5
2 4 6
3 6 1
I want to apply a formula Y=6*X1 + 7*X2 + 8*X3 for every row
Thanks in Advance
--
View this message in context: http://r.789695.n4.nabble.com/how-to-call-a-function-for-each-row-tp4122906p4122906.html
Sent from the R help mailing list archive at Nabble.com.
2012 Feb 22
4
Week number from a date
Hi
My data looks like this
startDate="2008-06-01"
dateRange =c( "2008-10-01","2008-12-01")
Is there any method to find the week number from the startDate range
-----
Thanks in Advance
Arun
--
View this message in context: http://r.789695.n4.nabble.com/Week-number-from-a-date-tp4410223p4410223.html
Sent from the R help mailing list archive at Nabble.com.
2011 Sep 19
2
Setting the Values
Hi
I have a variable str = " X", "Y" and values ("0","12")
i want to set value for X =0 and Y =12 and use inside the program.
how to do this
Please anybody help me.
--
View this message in context: http://r.789695.n4.nabble.com/Setting-the-Values-tp3823388p3823388.html
Sent from the R help mailing list archive at Nabble.com.
2012 Nov 26
3
Help in splitting the records
Hi
I have set of records seperated by a separator say "$$$" i want to get the
values in a dataframe.
eq
qwer$$12$$qwre
ewrtr$7789$ewwe
I want the output as\
V1 V2 V3
qwer 12 qwre
ewrtr 7789 ewwwe
Please help me
-----
Thanks in Advance
Arun
--
View this message in context: http://r.789695.n4.nabble.com/Help-in-splitting-the-records-tp4650827.html
Sent from
2012 Apr 03
2
Histogram classwise
Hi
I have a data class wise. I want to create a histogram class wise without
using for loop as it takes a long time
my data looks like this
x class
27 1
93 3
65 5
1 2
69 5
2 1
92 4
49 5
55 4
46 1
51 3
100 4
-----
Thanks in Advance
Arun
--
View this message in context: http://r.789695.n4.nabble.com/Histogram-classwise-tp4528624p4528624.html
Sent from the R help mailing list archive
2012 Jul 17
2
comparing three vectors
Hi
I 've a data
a=c(10,20,30)
b=c(100,200,300)
c=c(50,60,70)
I want to compare a[1]<=c[1]<b[1],......
How to compare for all the records
-----
Thanks in Advance
Arun
--
View this message in context: http://r.789695.n4.nabble.com/comparing-three-vectors-tp4636728.html
Sent from the R help mailing list archive at Nabble.com.
2012 Apr 24
2
searchina a pattern in a string
I have a long string. i want to sepearate a 10 digit phone no from it.
eg
"my no is 9876543210 is personal no and my official no is 123-456-8907. you
can use any of these"
i want to seperate the 9876543210 and 123-456-8907 from this. therev may be
many phone nos in the string. how to do it
-----
Thanks in Advance
Arun
--
View this message in context:
2012 Jan 09
6
runif with condition
Hi
I want to generate 4 random number which sum up to 100 always
Please help
-----
Thanks in Advance
Arun
--
View this message in context: http://r.789695.n4.nabble.com/runif-with-condition-tp4278704p4278704.html
Sent from the R help mailing list archive at Nabble.com.
2011 Dec 03
2
help in removal of fixed pattern
Hi
I have column name as given below
If the variable is in log(X1 + 1) pattern it should be removed and i need
only X1
Input
log(x1 + 1)
x2
log(X3 +1)
Expected Output X1 X2 X3
Please help me
--
View this message in context: http://r.789695.n4.nabble.com/help-in-removal-of-fixed-pattern-tp4152524p4152524.html
Sent from the R help mailing list archive at Nabble.com.
2012 Oct 24
3
Results not dispalying in R console
Hi
I'm not getting any results in R console when i run commands. I reinstalled
R but the results are same
-----
Thanks in Advance
Arun
--
View this message in context: http://r.789695.n4.nabble.com/Results-not-dispalying-in-R-console-tp4647271.html
Sent from the R help mailing list archive at Nabble.com.
2011 Nov 16
3
changing date format in a dataframe
Hi
I have a data frame and i need to change the date format in it.
my dataframe
X Date
1 1/1/2009
2 2/1/2009
3 3/1/2009
I need to change it to 2009-01-01
--
View this message in context: http://r.789695.n4.nabble.com/changing-date-format-in-a-dataframe-tp4076411p4076411.html
Sent from the R help mailing list archive at Nabble.com.
2012 Feb 22
3
inserting a dataframe into the table
Hi,
I have a dataset
X Y
A= 10 15
20 30
40 50
B = X Z
10 30
20 50
I have a table containing X Y Z columns
How to insert a data frame into the table without using for loop ?
now currently i'm using the for loop with using the insert command?
-----
Thanks in Advance
Arun
--
View this message in
2012 Jul 03
2
read the date format
hi
I have a data like thursday, November 20,2012. I'm not able to convert
into data format in R
Can anyone please help
-----
Thanks in Advance
Arun
--
View this message in context: http://r.789695.n4.nabble.com/read-the-date-format-tp4635245.html
Sent from the R help mailing list archive at Nabble.com.
2012 Aug 03
1
how to get a date variable from a dataset
Hi
I have a find the class of each variable of the data set which is given as
input. I can able to find the string and the numeric variable. Not able to
find if the variable is date or not
Can any one help me.
-----
Thanks in Advance
Arun
--
View this message in context: http://r.789695.n4.nabble.com/how-to-get-a-date-variable-from-a-dataset-tp4639038.html
Sent from the R help
2011 Nov 17
2
Adding a year to existing date
Hi
I need to add an year to and date field in the dataframe.
Please help me
X Date
1 2008-01-01
2 2008-02-01
3 2003-03-01
Thanks in advance
--
View this message in context: http://r.789695.n4.nabble.com/Adding-a-year-to-existing-date-tp4078930p4078930.html
Sent from the R help mailing list archive at Nabble.com.
2012 Aug 01
1
finding correlation for lagged values
Hi
I've to find the correlation of a variable and lag of other variable.
My code currently looks like this
y= 32 1 45 26 33 55 15 24 31 78
x=51 69 96 67 71 89 61 42 78 24
lagTimes=2
i want to find the correlation between y and Lag(x,1) and Y &Lag(x,2)
i'm using loop to find the lag and then finding correlation
If there are more variables and need to find the correlation lag
2012 Feb 09
3
calling the function which is stored in a list
Hi
I'm storing two functions in a list
# creating two function
function1 <- function(n) {
return(sum(n))
}
function2 <- function(n) {
return(mean(n))
}
#storing the function
function3 =c(function1,function2)
is it possible to call the stored function and used it ?
x=c(10,29)
funtion3[1](x)
Thanks
-----
Thanks in Advance
Arun
--
View this message in context:
2011 Nov 07
1
Intercepts is coming as Zero in the Mixed Models
Hi
I'm getting the intercepts of the Random effects as 0. Please help me to
understand why this is coming Zero
This is my R code
Data<- read.csv("C:/FE and RE.csv")
Formula="Y~X2+X3+X4 + (1|State) + (0+X5|State)"
fit=lmer(formula=Formula,data=Data)
ranef(fit).
My sample Data
State Year Y X2 X3 X4 X5 X6
S2 1960 27.8 397.5 42.2 50.7 78.3 65.8
S1 1960 29.9 413.3 38.1
2011 Nov 15
1
Remove thw data from the dataframe
Hi,
I want to remove the entire row from the dataset if any of the row contains
blank or NA
my dataset look like
State Year Y X2 X3 X4 X5 X6
State1 1960 27.8 397.5 42.2 50.7 78.3 65.8
State2 1960 29.9 413.3 38.1 52 79.2 66.9
State1 1961 29.8 439.2 40.3 54 79.2 67.8
State2 1961 30.8 459.7 39.5 79.2 69.6
State1 1962 31.2 492.9 37.3 54.7 77.4 68.7
State2 1962 528.6 38.1 80.2 73.6
State1 1963