본문 바로가기
반응형

분류 전체보기123

(R)The way to save data frame in R as excel and csv files / read excel and csv files in R > library(writexl) > data_frame_2View(data_frame_2) > write_xlsx(data_frame_2,path="freshmen.xlsx") > library(writexl) > data_frame_2 write.csv(data_frame_2,file="freshmen.csv") - read_xlsx("") > library(readxl) > freshmen_data_frame View(freshmen_data_frame) - read.csv("") > freshmen_data_frame_2 View(freshmen_data_frame_2) 2020. 8. 24.
(R)Adjust line graphs' linetype, colour, shapes of points/change the variable of x-axis to factor type > View(ChickWeight) > table(ChickWeight$Diet) 1 2 3 4 220 120 120 118 > table(ChickWeight$Time) 0 2 4 6 8 10 12 14 16 18 20 21 50 50 49 49 49 49 49 48 47 47 46 45 > CW%filter(Chick==1|Chick==21|Chick==31|Chick==41)%>%filter(Time==0|Time==6|Time==12|Time==18|Time==21)> CW weight Time Chick Diet1 42 0 1 12 64 6 1 13 106 12 1 14 171 18 1 15 205 21 1 16 40 0 21 27 86 6 21 28 217 12 21 29 307 18 21 2.. 2020. 8. 21.
Maximum likelihood estimator/ exponential,poisson,binomial,bernoulli,Normal,uniform/ Invariance property/ consistency/ central limit theorem/slutsky's theorem There are two typical ways which are Maximum likelihood estimation and Methods of moments to be used in estimation for parameters. For this post, I will introduce Maximum likelihood estimator as method for estimation. Because log function is the monotonic increase function, a parameter which makes likelihood function of Θ be maximized also makes log(likelihood function of Θ) be maximized. And wh.. 2020. 8. 20.
(R)Way to make variable of line graph from continuous variable to discrete variable by using it factor type/expand the limits of the graph /aes(group=1)/xlim(), ylim(),expand_limits() > table(airquality$Month) 5 6 7 8 9 31 30 31 31 30 > airquality2%group_by(Month)%>%summarise(mean_temp=mean(Temp)) > View(airquality2) > airquality3%filter(Month!=7)> table(airquality3$Month) 5 6 8 9 31 30 31 30 > airquality3%group_by(Month)%>%summarise(mean_temp=mean(Temp))> View(airquality3) > ggplot(data=airquality3,aes(x=factor(Month),y=mean_temp))+geom_line()geom_path: Each group consists o.. 2020. 8. 20.
반응형